Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
e87df306d8 | ||
|
|
8d2c9b29d4 | ||
|
|
52db57b8be | ||
|
|
996c6fa17a | ||
|
|
f124375fdd | ||
|
|
41de04896f | ||
|
|
559a02ef04 | ||
|
|
5517d3d9b6 | ||
|
|
eff4b8a72a | ||
|
|
3ffc196cc3 | ||
|
|
252de3b812 | ||
|
|
2a322407c5 | ||
|
|
278bf617f6 | ||
|
|
29f741f9d9 | ||
|
|
187ce9cfcf | ||
|
|
915a59584f | ||
|
|
775a6c5bc4 | ||
|
|
d81f6e9eb2 | ||
|
|
53d17dc3e5 | ||
|
|
448c1ce217 | ||
|
|
2f44cdb4bc | ||
|
|
4f100294c6 | ||
|
|
d06097deed | ||
|
|
676cfeb167 | ||
|
|
ee78a0aa31 | ||
|
|
11330cdd6a | ||
|
|
c3381e6053 | ||
|
|
2665540620 | ||
|
|
581d6cdd12 | ||
|
|
939173df5c | ||
|
|
2bf13b88d9 | ||
|
|
4e9c3d1978 | ||
|
|
08d373ea2c |
@@ -1,5 +1,53 @@
|
||||
# CHANGELOG
|
||||
|
||||
## 16.2.2 Jun 17, 2025
|
||||
|
||||
Changes:
|
||||
|
||||
- feat(types-codec): Add maximum depth limit in decodeU8a functions ([#6168](https://github.com/polkadot-js/api/pull/6168))
|
||||
- bump polkadotjs/common to 13.5.2 ([#6170](https://github.com/polkadot-js/api/pull/6170))
|
||||
|
||||
## 16.2.1 Jun 10, 2025
|
||||
|
||||
Contributed:
|
||||
|
||||
- feat(api-contract): add support for ink! v6 and pallet-revive compatibility ([#6158](https://github.com/polkadot-js/api/pull/6158))
|
||||
|
||||
|
||||
## 16.1.2 Jun 4, 2025
|
||||
|
||||
Changes:
|
||||
|
||||
- Use ExtrinsicV4 by default ([#6164](https://github.com/polkadot-js/api/pull/6164))
|
||||
|
||||
|
||||
## 16.1.1 May 29, 2025
|
||||
|
||||
Changes:
|
||||
|
||||
- Update AssetHub types to 1.5.1 release ([#6155](https://github.com/polkadot-js/api/pull/6155))
|
||||
- fix: correct BitVec length calculation from bytes to bits in codec ([#6152](https://github.com/polkadot-js/api/pull/6152))
|
||||
- Update README with metadata retrieval instructions and testing caveats ([#6156](https://github.com/polkadot-js/api/pull/6156))
|
||||
- Initialize RpcCore with configured ttl ([#6160](https://github.com/polkadot-js/api/pull/6160))
|
||||
|
||||
|
||||
## 16.0.1 May 19, 2025
|
||||
|
||||
Breaking Changes:
|
||||
- With the upgrade to Metadata v16, several fields have been removed or replaced. The following fields no longer exist in the updated metadata definitions:
|
||||
- `type`: This field has been completely removed in Metadata.
|
||||
- `version`: Previously part of `ExtrinsicMetadata`. Replaced by `versions`, which now holds an array `Vec<u8>` of supported extrinsic versions instead of a single value.
|
||||
- `extraType`: This field has been completely removed in `ExtrinsicMetadata`.
|
||||
- `signedExtensions`: Previously part of `ExtrinsicMetadata`. Replaced by `transactionExtensions`, which provides a more structured definition of extensions, and `transactionExtensionsByVersion`, mapping versions to active extensions.
|
||||
|
||||
Changes:
|
||||
|
||||
- Metadata v16 ([#6130](https://github.com/polkadot-js/api/pull/6130))
|
||||
- Add dryRunApi v2 definition ([#6144](https://github.com/polkadot-js/api/pull/6144))
|
||||
- Add type augmentation for AssetHub ([#6148](https://github.com/polkadot-js/api/pull/6148))
|
||||
- Upgrade polkadot/common to 13.5.1 ([#6150](https://github.com/polkadot-js/api/pull/6150))
|
||||
|
||||
|
||||
## 15.10.2 May 13, 2025
|
||||
|
||||
Changes:
|
||||
|
||||
+5
-4
@@ -1,9 +1,9 @@
|
||||
3512 Jaco Bump deps (#5785)
|
||||
163 Tarik Gul Improve type registry known defaults implementation to a Map (#6127)
|
||||
164 Tarik Gul Upgrade polkadot/common to 13.5.1 (#6150)
|
||||
83 Amaury Martiny StatementKind: Regular and Saft (#2303)
|
||||
42 Valentin Fernandez 16.2.2 (#6171)
|
||||
37 Keith Ingram Update contract types and rpc (#4541)
|
||||
35 Stefanie Doll Updated child storage parameters (#1709)
|
||||
30 Valentin Fernandez 15.10.2 (#6146)
|
||||
20 Luke Schoen fix: Fixes TypeError: Cannot read property 'vesting' of undefined (#1970)
|
||||
19 Xiliang Chen no warm for unknown signed extensions (#5601)
|
||||
15 Jeremías Díaz feat(types): add correct tuple type to storage key (#3054)
|
||||
@@ -21,13 +21,13 @@
|
||||
4 Alex D Use derive customAccount and customLocks for balance overrides (#3248)
|
||||
4 Alex Wang fix issue that creates duplicate providers (#983)
|
||||
4 Alexander Popiak Add asset id in signing (#4009)
|
||||
4 Arjun Porwal doc: Update README.md with metadata retrieval instructions and testing caveats (#6156)
|
||||
4 Joshy Orndorff spelling; efect -> effect (#2295)
|
||||
4 Nantian fix bigint type (#3869)
|
||||
4 Scott Twiname Add support for historical BlockNumber rpc methods (#4574)
|
||||
3 André Silva add support for ValidationCodeHash (#3640)
|
||||
3 Antoine Estienne Adapted to display moonbeam author (#3108)
|
||||
3 Arjan Zijderveld Added `Emergency` to `ElectionPhase` (#3707)
|
||||
3 Arjun Porwal Upgrade Polkadot types to v1.4.0 (#6100)
|
||||
3 Ewa Kowalska Handle no council for bounties proposals (#3062)
|
||||
3 hamidra add support for n key entries for NMaps (#3886)
|
||||
3 Hamza Tokuchi more typos (#2532)
|
||||
@@ -35,6 +35,7 @@
|
||||
3 Josep M Sobrepere docs: improve rpc-provider README (#4719)
|
||||
3 KarishmaBothara Backward compatibility thing (#3511)
|
||||
3 Miguel Hervas Adding RT4 Types (#3007)
|
||||
3 rajk93 feat(types-codec): Add maximum depth limit in `decodeU8a` functions (#6168)
|
||||
3 Shawn Tabrizi Add `isReadyOrError` when connecting to API (#2577)
|
||||
3 YJ feat: Vote interface as U8a (#1061)
|
||||
2 Alexander Krupenkin Add [u8; 33] type width for U8aFixed type (#2391)
|
||||
@@ -59,6 +60,7 @@
|
||||
2 扩散性百万甜面包 Typo, deocrateMethod -> decorateMethod (#1594)
|
||||
1 Alan Sapede Adds Eth feeHistory & maxPriorityFeePerGas rpc (#4956)
|
||||
1 Aleš Ferlan fix: use H160 for address in getTransactionCount (#5472)
|
||||
1 Alex Bean feat(api-contract): add support for ink! v6 and pallet-revive compatibility (#6158)
|
||||
1 Alisher A. Khassanov Add `offchain_localStorageClear` RPC method (#6070)
|
||||
1 Brad Larson [NEW] Support for custom headers with providers (#2423)
|
||||
1 Btwiuse Arch Add side effect check workaround (#4994) (#5009)
|
||||
@@ -125,7 +127,6 @@
|
||||
1 Qinxuan Chen Add fp_account::AccountId20 mapping (#5551)
|
||||
1 qiuhao update DeriveCustom type (#2581)
|
||||
1 r0t0r-r0t0r Fix memory leak on raw rpc call (#4505)
|
||||
1 rajk93 Update substrate types for polkadot-sdk 2503-2-rc1 (#6137)
|
||||
1 Raphael Flechtner fix: typegen disconnect ws on success (#4901)
|
||||
1 Robert Gabriel Jakabosky Fix sorting of `Option` values and error on duplicates from BTreeSet/BTreeMap. (#5731)
|
||||
1 Robert Hambrock update MMR API (#5479)
|
||||
|
||||
+4
-4
@@ -14,10 +14,10 @@
|
||||
},
|
||||
"sideEffects": false,
|
||||
"type": "module",
|
||||
"version": "15.10.2",
|
||||
"version": "16.2.2",
|
||||
"versions": {
|
||||
"git": "15.10.2",
|
||||
"npm": "15.10.2"
|
||||
"git": "16.2.2",
|
||||
"npm": "16.2.2"
|
||||
},
|
||||
"workspaces": [
|
||||
"packages/*"
|
||||
@@ -40,7 +40,7 @@
|
||||
"test:one": "polkadot-dev-run-test --env node"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@polkadot/dev": "^0.83.2",
|
||||
"@polkadot/dev": "^0.83.3",
|
||||
"@polkadot/typegen": "workspace:packages/typegen",
|
||||
"@types/node": "^22.10.5"
|
||||
},
|
||||
|
||||
@@ -18,15 +18,15 @@
|
||||
"./packageDetect.cjs"
|
||||
],
|
||||
"type": "module",
|
||||
"version": "15.10.2",
|
||||
"version": "16.2.2",
|
||||
"main": "index.js",
|
||||
"dependencies": {
|
||||
"@polkadot/api-base": "15.10.2",
|
||||
"@polkadot/rpc-augment": "15.10.2",
|
||||
"@polkadot/types": "15.10.2",
|
||||
"@polkadot/types-augment": "15.10.2",
|
||||
"@polkadot/types-codec": "15.10.2",
|
||||
"@polkadot/util": "^13.4.4",
|
||||
"@polkadot/api-base": "16.2.2",
|
||||
"@polkadot/rpc-augment": "16.2.2",
|
||||
"@polkadot/types": "16.2.2",
|
||||
"@polkadot/types-augment": "16.2.2",
|
||||
"@polkadot/types-codec": "16.2.2",
|
||||
"@polkadot/util": "^13.5.2",
|
||||
"tslib": "^2.8.1"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,621 @@
|
||||
// Auto-generated via `yarn polkadot-types-from-chain`, do not edit
|
||||
/* eslint-disable */
|
||||
|
||||
// import type lookup before we augment - in some environments
|
||||
// this is required to allow for ambient/previous definitions
|
||||
import '@polkadot/api-base/types/consts';
|
||||
|
||||
import type { ApiTypes, AugmentedConst } from '@polkadot/api-base/types';
|
||||
import type { Bytes, Option, u128, u16, u32, u64, u8 } from '@polkadot/types-codec';
|
||||
import type { Codec } from '@polkadot/types-codec/types';
|
||||
import type { Permill } from '@polkadot/types/interfaces/runtime';
|
||||
import type { FrameSupportPalletId, FrameSystemLimitsBlockLength, FrameSystemLimitsBlockWeights, SpVersionRuntimeVersion, SpWeightsRuntimeDbWeight, SpWeightsWeightV2Weight, StagingXcmV4Location } from '@polkadot/types/lookup';
|
||||
|
||||
export type __AugmentedConst<ApiType extends ApiTypes> = AugmentedConst<ApiType>;
|
||||
|
||||
declare module '@polkadot/api-base/types/consts' {
|
||||
interface AugmentedConsts<ApiType extends ApiTypes> {
|
||||
assetConversion: {
|
||||
/**
|
||||
* A fee to withdraw the liquidity.
|
||||
**/
|
||||
liquidityWithdrawalFee: Permill & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* A % the liquidity providers will take of every swap. Represents 10ths of a percent.
|
||||
**/
|
||||
lpFee: u32 & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* The max number of hops in a swap.
|
||||
**/
|
||||
maxSwapPathLength: u32 & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* The minimum LP token amount that could be minted. Ameliorates rounding errors.
|
||||
**/
|
||||
mintMinLiquidity: u128 & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* The pallet's id, used for deriving its sovereign account ID.
|
||||
**/
|
||||
palletId: FrameSupportPalletId & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* A one-time fee to setup the pool.
|
||||
**/
|
||||
poolSetupFee: u128 & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* Asset class from [`Config::Assets`] used to pay the [`Config::PoolSetupFee`].
|
||||
**/
|
||||
poolSetupFeeAsset: StagingXcmV4Location & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* Generic const
|
||||
**/
|
||||
[key: string]: Codec;
|
||||
};
|
||||
assets: {
|
||||
/**
|
||||
* The amount of funds that must be reserved when creating a new approval.
|
||||
**/
|
||||
approvalDeposit: u128 & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* The amount of funds that must be reserved for a non-provider asset account to be
|
||||
* maintained.
|
||||
**/
|
||||
assetAccountDeposit: u128 & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* The basic amount of funds that must be reserved for an asset.
|
||||
**/
|
||||
assetDeposit: u128 & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* The basic amount of funds that must be reserved when adding metadata to your asset.
|
||||
**/
|
||||
metadataDepositBase: u128 & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* The additional funds that must be reserved for the number of bytes you store in your
|
||||
* metadata.
|
||||
**/
|
||||
metadataDepositPerByte: u128 & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* Max number of items to destroy per `destroy_accounts` and `destroy_approvals` call.
|
||||
*
|
||||
* Must be configured to result in a weight that makes each call fit in a block.
|
||||
**/
|
||||
removeItemsLimit: u32 & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* The maximum length of a name or symbol stored on-chain.
|
||||
**/
|
||||
stringLimit: u32 & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* Generic const
|
||||
**/
|
||||
[key: string]: Codec;
|
||||
};
|
||||
aura: {
|
||||
/**
|
||||
* The slot duration Aura should run with, expressed in milliseconds.
|
||||
* The effective value of this type should not change while the chain is running.
|
||||
*
|
||||
* For backwards compatibility either use [`MinimumPeriodTimesTwo`] or a const.
|
||||
**/
|
||||
slotDuration: u64 & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* Generic const
|
||||
**/
|
||||
[key: string]: Codec;
|
||||
};
|
||||
balances: {
|
||||
/**
|
||||
* The minimum amount required to keep an account open. MUST BE GREATER THAN ZERO!
|
||||
*
|
||||
* If you *really* need it to be zero, you can enable the feature `insecure_zero_ed` for
|
||||
* this pallet. However, you do so at your own risk: this will open up a major DoS vector.
|
||||
* In case you have multiple sources of provider references, you may also get unexpected
|
||||
* behaviour if you set this to zero.
|
||||
*
|
||||
* Bottom line: Do yourself a favour and make it at least one!
|
||||
**/
|
||||
existentialDeposit: u128 & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* The maximum number of individual freeze locks that can exist on an account at any time.
|
||||
**/
|
||||
maxFreezes: u32 & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* The maximum number of locks that should exist on an account.
|
||||
* Not strictly enforced, but used for weight estimation.
|
||||
*
|
||||
* Use of locks is deprecated in favour of freezes. See `https://github.com/paritytech/substrate/pull/12951/`
|
||||
**/
|
||||
maxLocks: u32 & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* The maximum number of named reserves that can exist on an account.
|
||||
*
|
||||
* Use of reserves is deprecated in favour of holds. See `https://github.com/paritytech/substrate/pull/12951/`
|
||||
**/
|
||||
maxReserves: u32 & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* Generic const
|
||||
**/
|
||||
[key: string]: Codec;
|
||||
};
|
||||
foreignAssets: {
|
||||
/**
|
||||
* The amount of funds that must be reserved when creating a new approval.
|
||||
**/
|
||||
approvalDeposit: u128 & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* The amount of funds that must be reserved for a non-provider asset account to be
|
||||
* maintained.
|
||||
**/
|
||||
assetAccountDeposit: u128 & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* The basic amount of funds that must be reserved for an asset.
|
||||
**/
|
||||
assetDeposit: u128 & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* The basic amount of funds that must be reserved when adding metadata to your asset.
|
||||
**/
|
||||
metadataDepositBase: u128 & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* The additional funds that must be reserved for the number of bytes you store in your
|
||||
* metadata.
|
||||
**/
|
||||
metadataDepositPerByte: u128 & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* Max number of items to destroy per `destroy_accounts` and `destroy_approvals` call.
|
||||
*
|
||||
* Must be configured to result in a weight that makes each call fit in a block.
|
||||
**/
|
||||
removeItemsLimit: u32 & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* The maximum length of a name or symbol stored on-chain.
|
||||
**/
|
||||
stringLimit: u32 & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* Generic const
|
||||
**/
|
||||
[key: string]: Codec;
|
||||
};
|
||||
messageQueue: {
|
||||
/**
|
||||
* The size of the page; this implies the maximum message size which can be sent.
|
||||
*
|
||||
* A good value depends on the expected message sizes, their weights, the weight that is
|
||||
* available for processing them and the maximal needed message size. The maximal message
|
||||
* size is slightly lower than this as defined by [`MaxMessageLenOf`].
|
||||
**/
|
||||
heapSize: u32 & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* The maximum amount of weight (if any) to be used from remaining weight `on_idle` which
|
||||
* should be provided to the message queue for servicing enqueued items `on_idle`.
|
||||
* Useful for parachains to process messages at the same block they are received.
|
||||
*
|
||||
* If `None`, it will not call `ServiceQueues::service_queues` in `on_idle`.
|
||||
**/
|
||||
idleMaxServiceWeight: Option<SpWeightsWeightV2Weight> & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* The maximum number of stale pages (i.e. of overweight messages) allowed before culling
|
||||
* can happen. Once there are more stale pages than this, then historical pages may be
|
||||
* dropped, even if they contain unprocessed overweight messages.
|
||||
**/
|
||||
maxStale: u32 & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* The amount of weight (if any) which should be provided to the message queue for
|
||||
* servicing enqueued items `on_initialize`.
|
||||
*
|
||||
* This may be legitimately `None` in the case that you will call
|
||||
* `ServiceQueues::service_queues` manually or set [`Self::IdleMaxServiceWeight`] to have
|
||||
* it run in `on_idle`.
|
||||
**/
|
||||
serviceWeight: Option<SpWeightsWeightV2Weight> & 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: u32 & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* Generic const
|
||||
**/
|
||||
[key: string]: Codec;
|
||||
};
|
||||
nftFractionalization: {
|
||||
/**
|
||||
* The deposit paid by the user locking an NFT. The deposit is returned to the original NFT
|
||||
* owner when the asset is unified and the NFT is unlocked.
|
||||
**/
|
||||
deposit: u128 & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* The newly created asset's name.
|
||||
**/
|
||||
newAssetName: Bytes & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* The newly created asset's symbol.
|
||||
**/
|
||||
newAssetSymbol: Bytes & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* The pallet's id, used for deriving its sovereign account ID.
|
||||
**/
|
||||
palletId: FrameSupportPalletId & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* The maximum length of a name or symbol stored on-chain.
|
||||
**/
|
||||
stringLimit: u32 & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* Generic const
|
||||
**/
|
||||
[key: string]: Codec;
|
||||
};
|
||||
nfts: {
|
||||
/**
|
||||
* The maximum approvals an item could have.
|
||||
**/
|
||||
approvalsLimit: u32 & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* The basic amount of funds that must be reserved when adding an attribute to an item.
|
||||
**/
|
||||
attributeDepositBase: u128 & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* The basic amount of funds that must be reserved for collection.
|
||||
**/
|
||||
collectionDeposit: u128 & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* The additional funds that must be reserved for the number of bytes store in metadata,
|
||||
* either "normal" metadata or attribute metadata.
|
||||
**/
|
||||
depositPerByte: u128 & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* Disables some of pallet's features.
|
||||
**/
|
||||
features: u64 & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* The maximum attributes approvals an item could have.
|
||||
**/
|
||||
itemAttributesApprovalsLimit: u32 & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* The basic amount of funds that must be reserved for an item.
|
||||
**/
|
||||
itemDeposit: u128 & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* The maximum length of an attribute key.
|
||||
**/
|
||||
keyLimit: u32 & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* The max number of attributes a user could set per call.
|
||||
**/
|
||||
maxAttributesPerCall: u32 & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* The max duration in blocks for deadlines.
|
||||
**/
|
||||
maxDeadlineDuration: u32 & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* The max number of tips a user could send.
|
||||
**/
|
||||
maxTips: u32 & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* The basic amount of funds that must be reserved when adding metadata to your item.
|
||||
**/
|
||||
metadataDepositBase: u128 & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* The maximum length of data stored on-chain.
|
||||
**/
|
||||
stringLimit: u32 & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* The maximum length of an attribute value.
|
||||
**/
|
||||
valueLimit: u32 & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* Generic const
|
||||
**/
|
||||
[key: string]: Codec;
|
||||
};
|
||||
parachainSystem: {
|
||||
/**
|
||||
* Returns the parachain ID we are running with.
|
||||
**/
|
||||
selfParaId: u32 & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* Generic const
|
||||
**/
|
||||
[key: string]: Codec;
|
||||
};
|
||||
poolAssets: {
|
||||
/**
|
||||
* The amount of funds that must be reserved when creating a new approval.
|
||||
**/
|
||||
approvalDeposit: u128 & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* The amount of funds that must be reserved for a non-provider asset account to be
|
||||
* maintained.
|
||||
**/
|
||||
assetAccountDeposit: u128 & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* The basic amount of funds that must be reserved for an asset.
|
||||
**/
|
||||
assetDeposit: u128 & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* The basic amount of funds that must be reserved when adding metadata to your asset.
|
||||
**/
|
||||
metadataDepositBase: u128 & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* The additional funds that must be reserved for the number of bytes you store in your
|
||||
* metadata.
|
||||
**/
|
||||
metadataDepositPerByte: u128 & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* Max number of items to destroy per `destroy_accounts` and `destroy_approvals` call.
|
||||
*
|
||||
* Must be configured to result in a weight that makes each call fit in a block.
|
||||
**/
|
||||
removeItemsLimit: u32 & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* The maximum length of a name or symbol stored on-chain.
|
||||
**/
|
||||
stringLimit: u32 & 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;
|
||||
};
|
||||
stateTrieMigration: {
|
||||
/**
|
||||
* Maximal number of bytes that a key can have.
|
||||
*
|
||||
* FRAME itself does not limit the key length.
|
||||
* The concrete value must therefore depend on your storage usage.
|
||||
* A [`frame_support::storage::StorageNMap`] for example can have an arbitrary number of
|
||||
* keys which are then hashed and concatenated, resulting in arbitrarily long keys.
|
||||
*
|
||||
* Use the *state migration RPC* to retrieve the length of the longest key in your
|
||||
* storage: <https://github.com/paritytech/substrate/issues/11642>
|
||||
*
|
||||
* The migration will halt with a `Halted` event if this value is too small.
|
||||
* Since there is no real penalty from over-estimating, it is advised to use a large
|
||||
* value. The default is 512 byte.
|
||||
*
|
||||
* Some key lengths for reference:
|
||||
* - [`frame_support::storage::StorageValue`]: 32 byte
|
||||
* - [`frame_support::storage::StorageMap`]: 64 byte
|
||||
* - [`frame_support::storage::StorageDoubleMap`]: 96 byte
|
||||
*
|
||||
* For more info see
|
||||
* <https://www.shawntabrizi.com/blog/substrate/querying-substrate-storage-via-rpc/>
|
||||
**/
|
||||
maxKeyLen: 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: SpWeightsRuntimeDbWeight & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* The designated SS58 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 in-code version.
|
||||
**/
|
||||
version: SpVersionRuntimeVersion & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* Generic const
|
||||
**/
|
||||
[key: string]: Codec;
|
||||
};
|
||||
timestamp: {
|
||||
/**
|
||||
* The minimum period between blocks.
|
||||
*
|
||||
* Be aware 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. For example, in the Aura pallet it will be double this
|
||||
* period on default settings.
|
||||
**/
|
||||
minimumPeriod: u64 & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* Generic const
|
||||
**/
|
||||
[key: string]: Codec;
|
||||
};
|
||||
transactionPayment: {
|
||||
/**
|
||||
* A fee multiplier for `Operational` extrinsics to compute "virtual tip" to boost their
|
||||
* `priority`
|
||||
*
|
||||
* This value is multiplied 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>;
|
||||
/**
|
||||
* Generic const
|
||||
**/
|
||||
[key: string]: Codec;
|
||||
};
|
||||
uniques: {
|
||||
/**
|
||||
* The basic amount of funds that must be reserved when adding an attribute to an item.
|
||||
**/
|
||||
attributeDepositBase: u128 & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* The basic amount of funds that must be reserved for collection.
|
||||
**/
|
||||
collectionDeposit: u128 & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* The additional funds that must be reserved for the number of bytes store in metadata,
|
||||
* either "normal" metadata or attribute metadata.
|
||||
**/
|
||||
depositPerByte: u128 & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* The basic amount of funds that must be reserved for an item.
|
||||
**/
|
||||
itemDeposit: u128 & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* The maximum length of an attribute key.
|
||||
**/
|
||||
keyLimit: u32 & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* The basic amount of funds that must be reserved when adding metadata to your item.
|
||||
**/
|
||||
metadataDepositBase: u128 & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* The maximum length of data stored on-chain.
|
||||
**/
|
||||
stringLimit: u32 & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* The maximum length of an attribute value.
|
||||
**/
|
||||
valueLimit: 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;
|
||||
};
|
||||
xcmpQueue: {
|
||||
/**
|
||||
* Maximal number of outbound XCMP channels that can have messages queued at the same time.
|
||||
*
|
||||
* If this is reached, then no further messages can be sent to channels that do not yet
|
||||
* have a message queued. This should be set to the expected maximum of outbound channels
|
||||
* which is determined by [`Self::ChannelInfo`]. It is important to set this large enough,
|
||||
* since otherwise the congestion control protocol will not work as intended and messages
|
||||
* may be dropped. This value increases the PoV and should therefore not be picked too
|
||||
* high. Governance needs to pay attention to not open more channels than this value.
|
||||
**/
|
||||
maxActiveOutboundChannels: u32 & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* The maximum number of inbound XCMP channels that can be suspended simultaneously.
|
||||
*
|
||||
* Any further channel suspensions will fail and messages may get dropped without further
|
||||
* notice. Choosing a high value (1000) is okay; the trade-off that is described in
|
||||
* [`InboundXcmpSuspended`] still applies at that scale.
|
||||
**/
|
||||
maxInboundSuspended: u32 & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* The maximal page size for HRMP message pages.
|
||||
*
|
||||
* A lower limit can be set dynamically, but this is the hard-limit for the PoV worst case
|
||||
* benchmarking. The limit for the size of a message is slightly below this, since some
|
||||
* overhead is incurred for encoding the format.
|
||||
**/
|
||||
maxPageSize: u32 & 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,11 @@
|
||||
// Copyright 2017-2025 @polkadot/api-augment authors & contributors
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
import '../base.js';
|
||||
import './consts.js';
|
||||
import './errors.js';
|
||||
import './events.js';
|
||||
import './query.js';
|
||||
import './registry.js';
|
||||
import './runtime.js';
|
||||
import './tx.js';
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,4 @@
|
||||
// Copyright 2017-2025 @polkadot/api-augment authors & contributors
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
import '@polkadot/types-augment/registry/assetHubKusama';
|
||||
@@ -0,0 +1,313 @@
|
||||
// Auto-generated via `yarn polkadot-types-from-chain`, do not edit
|
||||
/* eslint-disable */
|
||||
|
||||
// import type lookup before we augment - in some environments
|
||||
// this is required to allow for ambient/previous definitions
|
||||
import '@polkadot/api-base/types/calls';
|
||||
|
||||
import type { ApiTypes, AugmentedCall, DecoratedCallBase } from '@polkadot/api-base/types';
|
||||
import type { Bytes, Null, Option, Result, Text, Vec, bool, u128, u32 } from '@polkadot/types-codec';
|
||||
import type { AnyNumber, IMethod, ITuple } from '@polkadot/types-codec/types';
|
||||
import type { Extrinsic } from '@polkadot/types/interfaces/extrinsics';
|
||||
import type { OpaqueMetadata } from '@polkadot/types/interfaces/metadata';
|
||||
import type { AccountId32, H256, RuntimeCall, Slot, SlotDuration } from '@polkadot/types/interfaces/runtime';
|
||||
import type { AssetHubKusamaRuntimeOriginCaller, AssetsCommonRuntimeApiFungiblesAccessError, CumulusPrimitivesCoreCollationInfo, PalletTransactionPaymentFeeDetails, PalletTransactionPaymentRuntimeDispatchInfo, SpConsensusAuraSr25519AppSr25519Public, SpCoreCryptoKeyTypeId, SpInherentsCheckInherentsResult, SpInherentsInherentData, SpRuntimeBlock, SpRuntimeDispatchError, SpRuntimeExtrinsicInclusionMode, SpRuntimeHeader, SpRuntimeTransactionValidityTransactionSource, SpRuntimeTransactionValidityTransactionValidityError, SpRuntimeTransactionValidityValidTransaction, SpVersionRuntimeVersion, SpWeightsWeightV2Weight, StagingXcmV4Location, XcmRuntimeApisConversionsError, XcmRuntimeApisDryRunCallDryRunEffects, XcmRuntimeApisDryRunError, XcmRuntimeApisDryRunXcmDryRunEffects, XcmRuntimeApisFeesError, XcmVersionedAssetId, XcmVersionedAssets, XcmVersionedLocation, XcmVersionedXcm } from '@polkadot/types/lookup';
|
||||
import type { IExtrinsic, Observable } from '@polkadot/types/types';
|
||||
|
||||
export type __AugmentedCall<ApiType extends ApiTypes> = AugmentedCall<ApiType>;
|
||||
export type __DecoratedCallBase<ApiType extends ApiTypes> = DecoratedCallBase<ApiType>;
|
||||
|
||||
declare module '@polkadot/api-base/types/calls' {
|
||||
interface AugmentedCalls<ApiType extends ApiTypes> {
|
||||
/** 0xbc9d89904f5b923f/ */
|
||||
accountNonceApi: {
|
||||
/**
|
||||
* Get current account nonce of given `AccountId`.
|
||||
**/
|
||||
accountNonce: AugmentedCall<ApiType, (account: AccountId32 | string | Uint8Array) => Observable<u32>>;
|
||||
/**
|
||||
* Generic call
|
||||
**/
|
||||
[key: string]: DecoratedCallBase<ApiType>;
|
||||
};
|
||||
/** 0x8a8047a53a8277ec/ */
|
||||
assetConversionApi: {
|
||||
/**
|
||||
* Returns the size of the liquidity pool for the given asset pair.
|
||||
**/
|
||||
getReserves: AugmentedCall<ApiType, (asset1: StagingXcmV4Location | { parents?: any; interior?: any } | string | Uint8Array, asset2: StagingXcmV4Location | { parents?: any; interior?: any } | string | Uint8Array) => Observable<Option<ITuple<[u128, u128]>>>>;
|
||||
/**
|
||||
* Provides a quote for [`Pallet::swap_exact_tokens_for_tokens`].,, Note that the price may have changed by the time the transaction is executed., (Use `amount_out_min` to control slippage.)
|
||||
**/
|
||||
quotePriceExactTokensForTokens: AugmentedCall<ApiType, (asset1: StagingXcmV4Location | { parents?: any; interior?: any } | string | Uint8Array, asset2: StagingXcmV4Location | { parents?: any; interior?: any } | string | Uint8Array, amount: u128 | AnyNumber | Uint8Array, include_fee: bool | boolean | Uint8Array) => Observable<Option<u128>>>;
|
||||
/**
|
||||
* Provides a quote for [`Pallet::swap_tokens_for_exact_tokens`].,, Note that the price may have changed by the time the transaction is executed., (Use `amount_in_max` to control slippage.)
|
||||
**/
|
||||
quotePriceTokensForExactTokens: AugmentedCall<ApiType, (asset1: StagingXcmV4Location | { parents?: any; interior?: any } | string | Uint8Array, asset2: StagingXcmV4Location | { parents?: any; interior?: any } | string | Uint8Array, amount: u128 | AnyNumber | Uint8Array, include_fee: bool | boolean | Uint8Array) => Observable<Option<u128>>>;
|
||||
/**
|
||||
* Generic call
|
||||
**/
|
||||
[key: string]: DecoratedCallBase<ApiType>;
|
||||
};
|
||||
/** 0xdd718d5cc53262d4/ */
|
||||
auraApi: {
|
||||
/**
|
||||
* Return the current set of authorities.
|
||||
**/
|
||||
authorities: AugmentedCall<ApiType, () => Observable<Vec<SpConsensusAuraSr25519AppSr25519Public>>>;
|
||||
/**
|
||||
* Returns the slot duration for Aura.,, Currently, only the value provided by this type at genesis will be used.
|
||||
**/
|
||||
slotDuration: AugmentedCall<ApiType, () => Observable<SlotDuration>>;
|
||||
/**
|
||||
* Generic call
|
||||
**/
|
||||
[key: string]: DecoratedCallBase<ApiType>;
|
||||
};
|
||||
/** 0xd7bdd8a272ca0d65/ */
|
||||
auraUnincludedSegmentApi: {
|
||||
/**
|
||||
* Whether it is legal to extend the chain, assuming the given block is the most, recently included one as-of the relay parent that will be built against, and, the given slot.,, This should be consistent with the logic the runtime uses when validating blocks to, avoid issues.,, When the unincluded segment is empty, i.e. `included_hash == at`, where at is the block, whose state we are querying against, this must always return `true` as long as the slot, is more recent than the included block itself.
|
||||
**/
|
||||
canBuildUpon: AugmentedCall<ApiType, (included_hash: H256 | string | Uint8Array, slot: Slot | AnyNumber | Uint8Array) => Observable<bool>>;
|
||||
/**
|
||||
* Generic call
|
||||
**/
|
||||
[key: string]: DecoratedCallBase<ApiType>;
|
||||
};
|
||||
/** 0x40fe3ad401f8959a/ */
|
||||
blockBuilder: {
|
||||
/**
|
||||
* Apply the given extrinsic.,, Returns an inclusion outcome which specifies if this extrinsic is included in, this block or not.
|
||||
**/
|
||||
applyExtrinsic: AugmentedCall<ApiType, (extrinsic: Extrinsic | IExtrinsic | string | Uint8Array) => Observable<Result<Result<Null, SpRuntimeDispatchError>, SpRuntimeTransactionValidityTransactionValidityError>>>;
|
||||
/**
|
||||
* Check that the inherents are valid. The inherent data will vary from chain to chain.
|
||||
**/
|
||||
checkInherents: AugmentedCall<ApiType, (block: SpRuntimeBlock | { header?: any; extrinsics?: any } | string | Uint8Array, data: SpInherentsInherentData | { data?: any } | string | Uint8Array) => Observable<SpInherentsCheckInherentsResult>>;
|
||||
/**
|
||||
* Finish the current block.
|
||||
**/
|
||||
finalizeBlock: AugmentedCall<ApiType, () => Observable<SpRuntimeHeader>>;
|
||||
/**
|
||||
* Generate inherent extrinsics. The inherent data will vary from chain to chain.
|
||||
**/
|
||||
inherentExtrinsics: AugmentedCall<ApiType, (inherent: SpInherentsInherentData | { data?: any } | string | Uint8Array) => Observable<Vec<Bytes>>>;
|
||||
/**
|
||||
* Generic call
|
||||
**/
|
||||
[key: string]: DecoratedCallBase<ApiType>;
|
||||
};
|
||||
/** 0xea93e3f16f3d6962/ */
|
||||
collectCollationInfo: {
|
||||
/**
|
||||
* Collect information about a collation.,, The given `header` is the header of the built block for that, we are collecting the collation info for.
|
||||
**/
|
||||
collectCollationInfo: AugmentedCall<ApiType, (header: SpRuntimeHeader | { parentHash?: any; number?: any; stateRoot?: any; extrinsicsRoot?: any; digest?: any } | string | Uint8Array) => Observable<CumulusPrimitivesCoreCollationInfo>>;
|
||||
/**
|
||||
* Generic call
|
||||
**/
|
||||
[key: string]: DecoratedCallBase<ApiType>;
|
||||
};
|
||||
/** 0xdf6acb689907609b/ */
|
||||
core: {
|
||||
/**
|
||||
* Execute the given block.
|
||||
**/
|
||||
executeBlock: AugmentedCall<ApiType, (block: SpRuntimeBlock | { header?: any; extrinsics?: any } | string | Uint8Array) => Observable<Null>>;
|
||||
/**
|
||||
* Initialize a block with the given header and return the runtime executive mode.
|
||||
**/
|
||||
initializeBlock: AugmentedCall<ApiType, (header: SpRuntimeHeader | { parentHash?: any; number?: any; stateRoot?: any; extrinsicsRoot?: any; digest?: any } | string | Uint8Array) => Observable<SpRuntimeExtrinsicInclusionMode>>;
|
||||
/**
|
||||
* Returns the version of the runtime.
|
||||
**/
|
||||
version: AugmentedCall<ApiType, () => Observable<SpVersionRuntimeVersion>>;
|
||||
/**
|
||||
* Generic call
|
||||
**/
|
||||
[key: string]: DecoratedCallBase<ApiType>;
|
||||
};
|
||||
/** 0x91b1c8b16328eb92/ */
|
||||
dryRunApi: {
|
||||
/**
|
||||
* Dry run call V2.
|
||||
**/
|
||||
dryRunCall: AugmentedCall<ApiType, (origin: AssetHubKusamaRuntimeOriginCaller | { system: any } | { PolkadotXcm: any } | { CumulusXcm: any } | string | Uint8Array, call: RuntimeCall | IMethod | string | Uint8Array, result_xcms_version: u32 | AnyNumber | Uint8Array) => Observable<Result<XcmRuntimeApisDryRunCallDryRunEffects, XcmRuntimeApisDryRunError>>>;
|
||||
/**
|
||||
* Dry run XCM program
|
||||
**/
|
||||
dryRunXcm: AugmentedCall<ApiType, (origin_location: XcmVersionedLocation | { V3: any } | { V4: any } | { V5: any } | string | Uint8Array, xcm: XcmVersionedXcm | { V3: any } | { V4: any } | { V5: any } | string | Uint8Array) => Observable<Result<XcmRuntimeApisDryRunXcmDryRunEffects, XcmRuntimeApisDryRunError>>>;
|
||||
/**
|
||||
* Generic call
|
||||
**/
|
||||
[key: string]: DecoratedCallBase<ApiType>;
|
||||
};
|
||||
/** 0xde92b8a0426b9bf6/ */
|
||||
fungiblesApi: {
|
||||
/**
|
||||
* Returns the list of all [`Asset`] that an `AccountId` has.
|
||||
**/
|
||||
queryAccountBalances: AugmentedCall<ApiType, (account: AccountId32 | string | Uint8Array) => Observable<Result<XcmVersionedAssets, AssetsCommonRuntimeApiFungiblesAccessError>>>;
|
||||
/**
|
||||
* Generic call
|
||||
**/
|
||||
[key: string]: DecoratedCallBase<ApiType>;
|
||||
};
|
||||
/** 0xfbc577b9d747efd6/ */
|
||||
genesisBuilder: {
|
||||
/**
|
||||
* Build `RuntimeGenesisConfig` from a JSON blob not using any defaults and store it in the, storage.,, In the case of a FRAME-based runtime, this function deserializes the full, `RuntimeGenesisConfig` from the given JSON blob and puts it into the storage. If the, provided JSON blob is incorrect or incomplete or the deserialization fails, an error, is returned.,, Please note that provided JSON blob must contain all `RuntimeGenesisConfig` fields, no, defaults will be used.
|
||||
**/
|
||||
buildState: AugmentedCall<ApiType, (json: Bytes | string | Uint8Array) => Observable<Result<Null, Text>>>;
|
||||
/**
|
||||
* Returns a JSON blob representation of the built-in `RuntimeGenesisConfig` identified by, `id`.,, If `id` is `None` the function should return JSON blob representation of the default, `RuntimeGenesisConfig` struct of the runtime. Implementation must provide default, `RuntimeGenesisConfig`.,, Otherwise function returns a JSON representation of the built-in, named, `RuntimeGenesisConfig` preset identified by `id`, or `None` if such preset does not, exist. Returned `Vec<u8>` contains bytes of JSON blob (patch) which comprises a list of, (potentially nested) key-value pairs that are intended for customizing the default, runtime genesis config. The patch shall be merged (rfc7386) with the JSON representation, of the default `RuntimeGenesisConfig` to create a comprehensive genesis config that can, be used in `build_state` method.
|
||||
**/
|
||||
getPreset: AugmentedCall<ApiType, (id: Option<Text> | null | Uint8Array | Text | string) => Observable<Option<Bytes>>>;
|
||||
/**
|
||||
* Returns a list of identifiers for available builtin `RuntimeGenesisConfig` presets.,, The presets from the list can be queried with [`GenesisBuilder::get_preset`] method. If, no named presets are provided by the runtime the list is empty.
|
||||
**/
|
||||
presetNames: AugmentedCall<ApiType, () => Observable<Vec<Text>>>;
|
||||
/**
|
||||
* Generic call
|
||||
**/
|
||||
[key: string]: DecoratedCallBase<ApiType>;
|
||||
};
|
||||
/** 0x9ffb505aa738d69c/ */
|
||||
locationToAccountApi: {
|
||||
/**
|
||||
* Converts `Location` to `AccountId`.
|
||||
**/
|
||||
convertLocation: AugmentedCall<ApiType, (location: XcmVersionedLocation | { V3: any } | { V4: any } | { V5: any } | string | Uint8Array) => Observable<Result<AccountId32, XcmRuntimeApisConversionsError>>>;
|
||||
/**
|
||||
* Generic call
|
||||
**/
|
||||
[key: string]: DecoratedCallBase<ApiType>;
|
||||
};
|
||||
/** 0x37e397fc7c91f5e4/ */
|
||||
metadata: {
|
||||
/**
|
||||
* Returns the metadata of a runtime.
|
||||
**/
|
||||
metadata: AugmentedCall<ApiType, () => Observable<OpaqueMetadata>>;
|
||||
/**
|
||||
* Returns the metadata at a given version.,, If the given `version` isn't supported, this will return `None`., Use [`Self::metadata_versions`] to find out about supported metadata version of the runtime.
|
||||
**/
|
||||
metadataAtVersion: AugmentedCall<ApiType, (version: u32 | AnyNumber | Uint8Array) => Observable<Option<OpaqueMetadata>>>;
|
||||
/**
|
||||
* Returns the supported metadata versions.,, This can be used to call `metadata_at_version`.
|
||||
**/
|
||||
metadataVersions: AugmentedCall<ApiType, () => Observable<Vec<u32>>>;
|
||||
/**
|
||||
* Generic call
|
||||
**/
|
||||
[key: string]: DecoratedCallBase<ApiType>;
|
||||
};
|
||||
/** 0xf78b278be53f454c/ */
|
||||
offchainWorkerApi: {
|
||||
/**
|
||||
* Starts the off-chain task for given block header.
|
||||
**/
|
||||
offchainWorker: AugmentedCall<ApiType, (header: SpRuntimeHeader | { parentHash?: any; number?: any; stateRoot?: any; extrinsicsRoot?: any; digest?: any } | string | Uint8Array) => Observable<Null>>;
|
||||
/**
|
||||
* Generic call
|
||||
**/
|
||||
[key: string]: DecoratedCallBase<ApiType>;
|
||||
};
|
||||
/** 0xab3c0572291feb8b/ */
|
||||
sessionKeys: {
|
||||
/**
|
||||
* Decode the given public session keys.,, Returns the list of public raw public keys + key type.
|
||||
**/
|
||||
decodeSessionKeys: AugmentedCall<ApiType, (encoded: Bytes | string | Uint8Array) => Observable<Option<Vec<ITuple<[Bytes, SpCoreCryptoKeyTypeId]>>>>>;
|
||||
/**
|
||||
* Generate a set of session keys with optionally using the given seed., The keys should be stored within the keystore exposed via runtime, externalities.,, The seed needs to be a valid `utf8` string.,, Returns the concatenated SCALE encoded public keys.
|
||||
**/
|
||||
generateSessionKeys: AugmentedCall<ApiType, (seed: Option<Bytes> | null | Uint8Array | Bytes | string) => Observable<Bytes>>;
|
||||
/**
|
||||
* Generic call
|
||||
**/
|
||||
[key: string]: DecoratedCallBase<ApiType>;
|
||||
};
|
||||
/** 0xd2bc9897eed08f15/ */
|
||||
taggedTransactionQueue: {
|
||||
/**
|
||||
* Validate the transaction.,, This method is invoked by the transaction pool to learn details about given transaction., The implementation should make sure to verify the correctness of the transaction, against current state. The given `block_hash` corresponds to the hash of the block, that is used as current state.,, Note that this call may be performed by the pool multiple times and transactions, might be verified in any possible order.
|
||||
**/
|
||||
validateTransaction: AugmentedCall<ApiType, (source: SpRuntimeTransactionValidityTransactionSource | 'InBlock' | 'Local' | 'External' | number | Uint8Array, tx: Extrinsic | IExtrinsic | string | Uint8Array, block_hash: H256 | string | Uint8Array) => Observable<Result<SpRuntimeTransactionValidityValidTransaction, SpRuntimeTransactionValidityTransactionValidityError>>>;
|
||||
/**
|
||||
* Generic call
|
||||
**/
|
||||
[key: string]: DecoratedCallBase<ApiType>;
|
||||
};
|
||||
/** 0x37c8bb1350a9a2a8/ */
|
||||
transactionPaymentApi: {
|
||||
/**
|
||||
*
|
||||
**/
|
||||
queryFeeDetails: AugmentedCall<ApiType, (uxt: Extrinsic | IExtrinsic | string | Uint8Array, len: u32 | AnyNumber | Uint8Array) => Observable<PalletTransactionPaymentFeeDetails>>;
|
||||
/**
|
||||
*
|
||||
**/
|
||||
queryInfo: AugmentedCall<ApiType, (uxt: Extrinsic | IExtrinsic | string | Uint8Array, len: u32 | AnyNumber | Uint8Array) => Observable<PalletTransactionPaymentRuntimeDispatchInfo>>;
|
||||
/**
|
||||
*
|
||||
**/
|
||||
queryLengthToFee: AugmentedCall<ApiType, (length: u32 | AnyNumber | Uint8Array) => Observable<u128>>;
|
||||
/**
|
||||
*
|
||||
**/
|
||||
queryWeightToFee: AugmentedCall<ApiType, (weight: SpWeightsWeightV2Weight | { refTime?: any; proofSize?: any } | string | Uint8Array) => Observable<u128>>;
|
||||
/**
|
||||
* Generic call
|
||||
**/
|
||||
[key: string]: DecoratedCallBase<ApiType>;
|
||||
};
|
||||
/** 0xf3ff14d5ab527059/ */
|
||||
transactionPaymentCallApi: {
|
||||
/**
|
||||
* Query fee details of a given encoded `Call`.
|
||||
**/
|
||||
queryCallFeeDetails: AugmentedCall<ApiType, (call: RuntimeCall | IMethod | string | Uint8Array, len: u32 | AnyNumber | Uint8Array) => Observable<PalletTransactionPaymentFeeDetails>>;
|
||||
/**
|
||||
* Query information of a dispatch class, weight, and fee of a given encoded `Call`.
|
||||
**/
|
||||
queryCallInfo: AugmentedCall<ApiType, (call: RuntimeCall | IMethod | string | Uint8Array, len: u32 | AnyNumber | Uint8Array) => Observable<PalletTransactionPaymentRuntimeDispatchInfo>>;
|
||||
/**
|
||||
* Query the output of the current `LengthToFee` given some input.
|
||||
**/
|
||||
queryLengthToFee: AugmentedCall<ApiType, (length: u32 | AnyNumber | Uint8Array) => Observable<u128>>;
|
||||
/**
|
||||
* Query the output of the current `WeightToFee` given some input.
|
||||
**/
|
||||
queryWeightToFee: AugmentedCall<ApiType, (weight: SpWeightsWeightV2Weight | { refTime?: any; proofSize?: any } | string | Uint8Array) => Observable<u128>>;
|
||||
/**
|
||||
* Generic call
|
||||
**/
|
||||
[key: string]: DecoratedCallBase<ApiType>;
|
||||
};
|
||||
/** 0x6ff52ee858e6c5bd/ */
|
||||
xcmPaymentApi: {
|
||||
/**
|
||||
* Returns a list of acceptable payment assets.,, # Arguments,, * `xcm_version`: Version.
|
||||
**/
|
||||
queryAcceptablePaymentAssets: AugmentedCall<ApiType, (xcm_version: u32 | AnyNumber | Uint8Array) => Observable<Result<Vec<XcmVersionedAssetId>, XcmRuntimeApisFeesError>>>;
|
||||
/**
|
||||
* Get delivery fees for sending a specific `message` to a `destination`., These always come in a specific asset, defined by the chain.,, # Arguments, * `message`: The message that'll be sent, necessary because most delivery fees are based on the, size of the message., * `destination`: The destination to send the message to. Different destinations may use, different senders that charge different fees.
|
||||
**/
|
||||
queryDeliveryFees: AugmentedCall<ApiType, (destination: XcmVersionedLocation | { V3: any } | { V4: any } | { V5: any } | string | Uint8Array, message: XcmVersionedXcm | { V3: any } | { V4: any } | { V5: any } | string | Uint8Array) => Observable<Result<XcmVersionedAssets, XcmRuntimeApisFeesError>>>;
|
||||
/**
|
||||
* Converts a weight into a fee for the specified `AssetId`.,, # Arguments,, * `weight`: convertible `Weight`., * `asset`: `VersionedAssetId`.
|
||||
**/
|
||||
queryWeightToAssetFee: AugmentedCall<ApiType, (weight: SpWeightsWeightV2Weight | { refTime?: any; proofSize?: any } | string | Uint8Array, asset: XcmVersionedAssetId | { V3: any } | { V4: any } | { V5: any } | string | Uint8Array) => Observable<Result<u128, XcmRuntimeApisFeesError>>>;
|
||||
/**
|
||||
* Returns a weight needed to execute a XCM.,, # Arguments,, * `message`: `VersionedXcm`.
|
||||
**/
|
||||
queryXcmWeight: AugmentedCall<ApiType, (message: XcmVersionedXcm | { V3: any } | { V4: any } | { V5: any } | string | Uint8Array) => Observable<Result<SpWeightsWeightV2Weight, XcmRuntimeApisFeesError>>>;
|
||||
/**
|
||||
* Generic call
|
||||
**/
|
||||
[key: string]: DecoratedCallBase<ApiType>;
|
||||
};
|
||||
} // AugmentedCalls
|
||||
} // declare module
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,594 @@
|
||||
// Auto-generated via `yarn polkadot-types-from-chain`, do not edit
|
||||
/* eslint-disable */
|
||||
|
||||
// import type lookup before we augment - in some environments
|
||||
// this is required to allow for ambient/previous definitions
|
||||
import '@polkadot/api-base/types/consts';
|
||||
|
||||
import type { ApiTypes, AugmentedConst } from '@polkadot/api-base/types';
|
||||
import type { Option, u128, u16, u32, u64, u8 } from '@polkadot/types-codec';
|
||||
import type { Codec } from '@polkadot/types-codec/types';
|
||||
import type { Permill } from '@polkadot/types/interfaces/runtime';
|
||||
import type { FrameSupportPalletId, FrameSystemLimitsBlockLength, FrameSystemLimitsBlockWeights, SpVersionRuntimeVersion, SpWeightsRuntimeDbWeight, SpWeightsWeightV2Weight, StagingXcmV4Location } from '@polkadot/types/lookup';
|
||||
|
||||
export type __AugmentedConst<ApiType extends ApiTypes> = AugmentedConst<ApiType>;
|
||||
|
||||
declare module '@polkadot/api-base/types/consts' {
|
||||
interface AugmentedConsts<ApiType extends ApiTypes> {
|
||||
assetConversion: {
|
||||
/**
|
||||
* A fee to withdraw the liquidity.
|
||||
**/
|
||||
liquidityWithdrawalFee: Permill & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* A % the liquidity providers will take of every swap. Represents 10ths of a percent.
|
||||
**/
|
||||
lpFee: u32 & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* The max number of hops in a swap.
|
||||
**/
|
||||
maxSwapPathLength: u32 & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* The minimum LP token amount that could be minted. Ameliorates rounding errors.
|
||||
**/
|
||||
mintMinLiquidity: u128 & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* The pallet's id, used for deriving its sovereign account ID.
|
||||
**/
|
||||
palletId: FrameSupportPalletId & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* A one-time fee to setup the pool.
|
||||
**/
|
||||
poolSetupFee: u128 & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* Asset class from [`Config::Assets`] used to pay the [`Config::PoolSetupFee`].
|
||||
**/
|
||||
poolSetupFeeAsset: StagingXcmV4Location & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* Generic const
|
||||
**/
|
||||
[key: string]: Codec;
|
||||
};
|
||||
assets: {
|
||||
/**
|
||||
* The amount of funds that must be reserved when creating a new approval.
|
||||
**/
|
||||
approvalDeposit: u128 & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* The amount of funds that must be reserved for a non-provider asset account to be
|
||||
* maintained.
|
||||
**/
|
||||
assetAccountDeposit: u128 & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* The basic amount of funds that must be reserved for an asset.
|
||||
**/
|
||||
assetDeposit: u128 & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* The basic amount of funds that must be reserved when adding metadata to your asset.
|
||||
**/
|
||||
metadataDepositBase: u128 & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* The additional funds that must be reserved for the number of bytes you store in your
|
||||
* metadata.
|
||||
**/
|
||||
metadataDepositPerByte: u128 & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* Max number of items to destroy per `destroy_accounts` and `destroy_approvals` call.
|
||||
*
|
||||
* Must be configured to result in a weight that makes each call fit in a block.
|
||||
**/
|
||||
removeItemsLimit: u32 & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* The maximum length of a name or symbol stored on-chain.
|
||||
**/
|
||||
stringLimit: u32 & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* Generic const
|
||||
**/
|
||||
[key: string]: Codec;
|
||||
};
|
||||
aura: {
|
||||
/**
|
||||
* The slot duration Aura should run with, expressed in milliseconds.
|
||||
* The effective value of this type should not change while the chain is running.
|
||||
*
|
||||
* For backwards compatibility either use [`MinimumPeriodTimesTwo`] or a const.
|
||||
**/
|
||||
slotDuration: u64 & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* Generic const
|
||||
**/
|
||||
[key: string]: Codec;
|
||||
};
|
||||
balances: {
|
||||
/**
|
||||
* The minimum amount required to keep an account open. MUST BE GREATER THAN ZERO!
|
||||
*
|
||||
* If you *really* need it to be zero, you can enable the feature `insecure_zero_ed` for
|
||||
* this pallet. However, you do so at your own risk: this will open up a major DoS vector.
|
||||
* In case you have multiple sources of provider references, you may also get unexpected
|
||||
* behaviour if you set this to zero.
|
||||
*
|
||||
* Bottom line: Do yourself a favour and make it at least one!
|
||||
**/
|
||||
existentialDeposit: u128 & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* The maximum number of individual freeze locks that can exist on an account at any time.
|
||||
**/
|
||||
maxFreezes: u32 & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* The maximum number of locks that should exist on an account.
|
||||
* Not strictly enforced, but used for weight estimation.
|
||||
*
|
||||
* Use of locks is deprecated in favour of freezes. See `https://github.com/paritytech/substrate/pull/12951/`
|
||||
**/
|
||||
maxLocks: u32 & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* The maximum number of named reserves that can exist on an account.
|
||||
*
|
||||
* Use of reserves is deprecated in favour of holds. See `https://github.com/paritytech/substrate/pull/12951/`
|
||||
**/
|
||||
maxReserves: u32 & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* Generic const
|
||||
**/
|
||||
[key: string]: Codec;
|
||||
};
|
||||
foreignAssets: {
|
||||
/**
|
||||
* The amount of funds that must be reserved when creating a new approval.
|
||||
**/
|
||||
approvalDeposit: u128 & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* The amount of funds that must be reserved for a non-provider asset account to be
|
||||
* maintained.
|
||||
**/
|
||||
assetAccountDeposit: u128 & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* The basic amount of funds that must be reserved for an asset.
|
||||
**/
|
||||
assetDeposit: u128 & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* The basic amount of funds that must be reserved when adding metadata to your asset.
|
||||
**/
|
||||
metadataDepositBase: u128 & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* The additional funds that must be reserved for the number of bytes you store in your
|
||||
* metadata.
|
||||
**/
|
||||
metadataDepositPerByte: u128 & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* Max number of items to destroy per `destroy_accounts` and `destroy_approvals` call.
|
||||
*
|
||||
* Must be configured to result in a weight that makes each call fit in a block.
|
||||
**/
|
||||
removeItemsLimit: u32 & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* The maximum length of a name or symbol stored on-chain.
|
||||
**/
|
||||
stringLimit: u32 & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* Generic const
|
||||
**/
|
||||
[key: string]: Codec;
|
||||
};
|
||||
messageQueue: {
|
||||
/**
|
||||
* The size of the page; this implies the maximum message size which can be sent.
|
||||
*
|
||||
* A good value depends on the expected message sizes, their weights, the weight that is
|
||||
* available for processing them and the maximal needed message size. The maximal message
|
||||
* size is slightly lower than this as defined by [`MaxMessageLenOf`].
|
||||
**/
|
||||
heapSize: u32 & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* The maximum amount of weight (if any) to be used from remaining weight `on_idle` which
|
||||
* should be provided to the message queue for servicing enqueued items `on_idle`.
|
||||
* Useful for parachains to process messages at the same block they are received.
|
||||
*
|
||||
* If `None`, it will not call `ServiceQueues::service_queues` in `on_idle`.
|
||||
**/
|
||||
idleMaxServiceWeight: Option<SpWeightsWeightV2Weight> & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* The maximum number of stale pages (i.e. of overweight messages) allowed before culling
|
||||
* can happen. Once there are more stale pages than this, then historical pages may be
|
||||
* dropped, even if they contain unprocessed overweight messages.
|
||||
**/
|
||||
maxStale: u32 & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* The amount of weight (if any) which should be provided to the message queue for
|
||||
* servicing enqueued items `on_initialize`.
|
||||
*
|
||||
* This may be legitimately `None` in the case that you will call
|
||||
* `ServiceQueues::service_queues` manually or set [`Self::IdleMaxServiceWeight`] to have
|
||||
* it run in `on_idle`.
|
||||
**/
|
||||
serviceWeight: Option<SpWeightsWeightV2Weight> & 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: u32 & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* Generic const
|
||||
**/
|
||||
[key: string]: Codec;
|
||||
};
|
||||
nfts: {
|
||||
/**
|
||||
* The maximum approvals an item could have.
|
||||
**/
|
||||
approvalsLimit: u32 & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* The basic amount of funds that must be reserved when adding an attribute to an item.
|
||||
**/
|
||||
attributeDepositBase: u128 & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* The basic amount of funds that must be reserved for collection.
|
||||
**/
|
||||
collectionDeposit: u128 & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* The additional funds that must be reserved for the number of bytes store in metadata,
|
||||
* either "normal" metadata or attribute metadata.
|
||||
**/
|
||||
depositPerByte: u128 & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* Disables some of pallet's features.
|
||||
**/
|
||||
features: u64 & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* The maximum attributes approvals an item could have.
|
||||
**/
|
||||
itemAttributesApprovalsLimit: u32 & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* The basic amount of funds that must be reserved for an item.
|
||||
**/
|
||||
itemDeposit: u128 & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* The maximum length of an attribute key.
|
||||
**/
|
||||
keyLimit: u32 & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* The max number of attributes a user could set per call.
|
||||
**/
|
||||
maxAttributesPerCall: u32 & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* The max duration in blocks for deadlines.
|
||||
**/
|
||||
maxDeadlineDuration: u32 & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* The max number of tips a user could send.
|
||||
**/
|
||||
maxTips: u32 & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* The basic amount of funds that must be reserved when adding metadata to your item.
|
||||
**/
|
||||
metadataDepositBase: u128 & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* The maximum length of data stored on-chain.
|
||||
**/
|
||||
stringLimit: u32 & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* The maximum length of an attribute value.
|
||||
**/
|
||||
valueLimit: u32 & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* Generic const
|
||||
**/
|
||||
[key: string]: Codec;
|
||||
};
|
||||
parachainSystem: {
|
||||
/**
|
||||
* Returns the parachain ID we are running with.
|
||||
**/
|
||||
selfParaId: u32 & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* Generic const
|
||||
**/
|
||||
[key: string]: Codec;
|
||||
};
|
||||
poolAssets: {
|
||||
/**
|
||||
* The amount of funds that must be reserved when creating a new approval.
|
||||
**/
|
||||
approvalDeposit: u128 & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* The amount of funds that must be reserved for a non-provider asset account to be
|
||||
* maintained.
|
||||
**/
|
||||
assetAccountDeposit: u128 & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* The basic amount of funds that must be reserved for an asset.
|
||||
**/
|
||||
assetDeposit: u128 & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* The basic amount of funds that must be reserved when adding metadata to your asset.
|
||||
**/
|
||||
metadataDepositBase: u128 & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* The additional funds that must be reserved for the number of bytes you store in your
|
||||
* metadata.
|
||||
**/
|
||||
metadataDepositPerByte: u128 & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* Max number of items to destroy per `destroy_accounts` and `destroy_approvals` call.
|
||||
*
|
||||
* Must be configured to result in a weight that makes each call fit in a block.
|
||||
**/
|
||||
removeItemsLimit: u32 & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* The maximum length of a name or symbol stored on-chain.
|
||||
**/
|
||||
stringLimit: u32 & 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;
|
||||
};
|
||||
stateTrieMigration: {
|
||||
/**
|
||||
* Maximal number of bytes that a key can have.
|
||||
*
|
||||
* FRAME itself does not limit the key length.
|
||||
* The concrete value must therefore depend on your storage usage.
|
||||
* A [`frame_support::storage::StorageNMap`] for example can have an arbitrary number of
|
||||
* keys which are then hashed and concatenated, resulting in arbitrarily long keys.
|
||||
*
|
||||
* Use the *state migration RPC* to retrieve the length of the longest key in your
|
||||
* storage: <https://github.com/paritytech/substrate/issues/11642>
|
||||
*
|
||||
* The migration will halt with a `Halted` event if this value is too small.
|
||||
* Since there is no real penalty from over-estimating, it is advised to use a large
|
||||
* value. The default is 512 byte.
|
||||
*
|
||||
* Some key lengths for reference:
|
||||
* - [`frame_support::storage::StorageValue`]: 32 byte
|
||||
* - [`frame_support::storage::StorageMap`]: 64 byte
|
||||
* - [`frame_support::storage::StorageDoubleMap`]: 96 byte
|
||||
*
|
||||
* For more info see
|
||||
* <https://www.shawntabrizi.com/blog/substrate/querying-substrate-storage-via-rpc/>
|
||||
**/
|
||||
maxKeyLen: 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: SpWeightsRuntimeDbWeight & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* The designated SS58 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 in-code version.
|
||||
**/
|
||||
version: SpVersionRuntimeVersion & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* Generic const
|
||||
**/
|
||||
[key: string]: Codec;
|
||||
};
|
||||
timestamp: {
|
||||
/**
|
||||
* The minimum period between blocks.
|
||||
*
|
||||
* Be aware 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. For example, in the Aura pallet it will be double this
|
||||
* period on default settings.
|
||||
**/
|
||||
minimumPeriod: u64 & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* Generic const
|
||||
**/
|
||||
[key: string]: Codec;
|
||||
};
|
||||
transactionPayment: {
|
||||
/**
|
||||
* A fee multiplier for `Operational` extrinsics to compute "virtual tip" to boost their
|
||||
* `priority`
|
||||
*
|
||||
* This value is multiplied 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>;
|
||||
/**
|
||||
* Generic const
|
||||
**/
|
||||
[key: string]: Codec;
|
||||
};
|
||||
uniques: {
|
||||
/**
|
||||
* The basic amount of funds that must be reserved when adding an attribute to an item.
|
||||
**/
|
||||
attributeDepositBase: u128 & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* The basic amount of funds that must be reserved for collection.
|
||||
**/
|
||||
collectionDeposit: u128 & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* The additional funds that must be reserved for the number of bytes store in metadata,
|
||||
* either "normal" metadata or attribute metadata.
|
||||
**/
|
||||
depositPerByte: u128 & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* The basic amount of funds that must be reserved for an item.
|
||||
**/
|
||||
itemDeposit: u128 & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* The maximum length of an attribute key.
|
||||
**/
|
||||
keyLimit: u32 & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* The basic amount of funds that must be reserved when adding metadata to your item.
|
||||
**/
|
||||
metadataDepositBase: u128 & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* The maximum length of data stored on-chain.
|
||||
**/
|
||||
stringLimit: u32 & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* The maximum length of an attribute value.
|
||||
**/
|
||||
valueLimit: 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;
|
||||
};
|
||||
xcmpQueue: {
|
||||
/**
|
||||
* Maximal number of outbound XCMP channels that can have messages queued at the same time.
|
||||
*
|
||||
* If this is reached, then no further messages can be sent to channels that do not yet
|
||||
* have a message queued. This should be set to the expected maximum of outbound channels
|
||||
* which is determined by [`Self::ChannelInfo`]. It is important to set this large enough,
|
||||
* since otherwise the congestion control protocol will not work as intended and messages
|
||||
* may be dropped. This value increases the PoV and should therefore not be picked too
|
||||
* high. Governance needs to pay attention to not open more channels than this value.
|
||||
**/
|
||||
maxActiveOutboundChannels: u32 & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* The maximum number of inbound XCMP channels that can be suspended simultaneously.
|
||||
*
|
||||
* Any further channel suspensions will fail and messages may get dropped without further
|
||||
* notice. Choosing a high value (1000) is okay; the trade-off that is described in
|
||||
* [`InboundXcmpSuspended`] still applies at that scale.
|
||||
**/
|
||||
maxInboundSuspended: u32 & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* The maximal page size for HRMP message pages.
|
||||
*
|
||||
* A lower limit can be set dynamically, but this is the hard-limit for the PoV worst case
|
||||
* benchmarking. The limit for the size of a message is slightly below this, since some
|
||||
* overhead is incurred for encoding the format.
|
||||
**/
|
||||
maxPageSize: u32 & 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,11 @@
|
||||
// Copyright 2017-2025 @polkadot/api-augment authors & contributors
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
import '../base.js';
|
||||
import './consts.js';
|
||||
import './errors.js';
|
||||
import './events.js';
|
||||
import './query.js';
|
||||
import './registry.js';
|
||||
import './runtime.js';
|
||||
import './tx.js';
|
||||
@@ -0,0 +1,979 @@
|
||||
// Auto-generated via `yarn polkadot-types-from-chain`, do not edit
|
||||
/* eslint-disable */
|
||||
|
||||
// import type lookup before we augment - in some environments
|
||||
// this is required to allow for ambient/previous definitions
|
||||
import '@polkadot/api-base/types/storage';
|
||||
|
||||
import type { ApiTypes, AugmentedQuery, QueryableStorageEntry } from '@polkadot/api-base/types';
|
||||
import type { BTreeMap, BTreeSet, Bytes, Null, Option, Struct, U8aFixed, Vec, bool, u128, u16, u32, u64, u8 } from '@polkadot/types-codec';
|
||||
import type { AnyNumber, ITuple } from '@polkadot/types-codec/types';
|
||||
import type { AccountId32, H256 } from '@polkadot/types/interfaces/runtime';
|
||||
import type { AssetHubPolkadotRuntimeRuntimeHoldReason, AssetHubPolkadotRuntimeSessionKeys, BpXcmBridgeHubRouterBridgeState, CumulusPalletParachainSystemRelayStateSnapshotMessagingStateSnapshot, CumulusPalletParachainSystemUnincludedSegmentAncestor, CumulusPalletParachainSystemUnincludedSegmentSegmentTracker, CumulusPalletXcmpQueueOutboundChannelDetails, CumulusPalletXcmpQueueQueueConfigData, CumulusPrimitivesCoreAggregateMessageOrigin, FrameSupportDispatchPerDispatchClassWeight, FrameSupportTokensMiscIdAmount, FrameSystemAccountInfo, FrameSystemCodeUpgradeAuthorization, FrameSystemEventRecord, FrameSystemLastRuntimeUpgradeInfo, FrameSystemPhase, PalletAssetConversionPoolInfo, PalletAssetsApproval, PalletAssetsAssetAccount, PalletAssetsAssetDetails, PalletAssetsAssetMetadata, PalletBalancesAccountData, PalletBalancesBalanceLock, PalletBalancesReserveData, PalletCollatorSelectionCandidateInfo, PalletMessageQueueBookState, PalletMessageQueuePage, PalletMultisigMultisig, PalletNftsAttributeDeposit, PalletNftsAttributeNamespace, PalletNftsCollectionConfig, PalletNftsCollectionDetails, PalletNftsCollectionMetadata, PalletNftsItemConfig, PalletNftsItemDetails, PalletNftsItemMetadata, PalletNftsPendingSwap, PalletProxyAnnouncement, PalletProxyProxyDefinition, PalletStateTrieMigrationMigrationLimits, PalletStateTrieMigrationMigrationTask, PalletTransactionPaymentReleases, PalletUniquesCollectionDetails, PalletUniquesCollectionMetadata, PalletUniquesItemDetails, PalletUniquesItemMetadata, PalletVestingReleases, PalletVestingVestingInfo, PalletXcmQueryStatus, PalletXcmRemoteLockedFungibleRecord, PalletXcmVersionMigrationStage, PolkadotCorePrimitivesOutboundHrmpMessage, PolkadotPrimitivesV8AbridgedHostConfiguration, PolkadotPrimitivesV8PersistedValidationData, PolkadotPrimitivesV8UpgradeGoAhead, PolkadotPrimitivesV8UpgradeRestriction, SpConsensusAuraEd25519AppEd25519Public, SpCoreCryptoKeyTypeId, SpRuntimeDigest, SpTrieStorageProof, SpWeightsWeightV2Weight, StagingXcmV4Location, StagingXcmV5Instruction, XcmVersionedAssetId, XcmVersionedLocation } from '@polkadot/types/lookup';
|
||||
import type { Observable } from '@polkadot/types/types';
|
||||
|
||||
export type __AugmentedQuery<ApiType extends ApiTypes> = AugmentedQuery<ApiType, () => unknown>;
|
||||
export type __QueryableStorageEntry<ApiType extends ApiTypes> = QueryableStorageEntry<ApiType>;
|
||||
|
||||
declare module '@polkadot/api-base/types/storage' {
|
||||
interface AugmentedQueries<ApiType extends ApiTypes> {
|
||||
assetConversion: {
|
||||
/**
|
||||
* Stores the `PoolAssetId` that is going to be used for the next lp token.
|
||||
* This gets incremented whenever a new lp pool is created.
|
||||
**/
|
||||
nextPoolAssetId: AugmentedQuery<ApiType, () => Observable<Option<u32>>, []> & QueryableStorageEntry<ApiType, []>;
|
||||
/**
|
||||
* Map from `PoolAssetId` to `PoolInfo`. This establishes whether a pool has been officially
|
||||
* created rather than people sending tokens directly to a pool's public account.
|
||||
**/
|
||||
pools: AugmentedQuery<ApiType, (arg: ITuple<[StagingXcmV4Location, StagingXcmV4Location]> | [StagingXcmV4Location | { parents?: any; interior?: any } | string | Uint8Array, StagingXcmV4Location | { parents?: any; interior?: any } | string | Uint8Array]) => Observable<Option<PalletAssetConversionPoolInfo>>, [ITuple<[StagingXcmV4Location, StagingXcmV4Location]>]> & QueryableStorageEntry<ApiType, [ITuple<[StagingXcmV4Location, StagingXcmV4Location]>]>;
|
||||
/**
|
||||
* Generic query
|
||||
**/
|
||||
[key: string]: QueryableStorageEntry<ApiType>;
|
||||
};
|
||||
assets: {
|
||||
/**
|
||||
* The holdings of a specific account for a specific asset.
|
||||
**/
|
||||
account: AugmentedQuery<ApiType, (arg1: u32 | AnyNumber | Uint8Array, arg2: AccountId32 | string | Uint8Array) => Observable<Option<PalletAssetsAssetAccount>>, [u32, AccountId32]> & QueryableStorageEntry<ApiType, [u32, AccountId32]>;
|
||||
/**
|
||||
* Approved balance transfers. First balance is the amount approved for transfer. Second
|
||||
* is the amount of `T::Currency` reserved for storing this.
|
||||
* First key is the asset ID, second key is the owner and third key is the delegate.
|
||||
**/
|
||||
approvals: AugmentedQuery<ApiType, (arg1: u32 | AnyNumber | Uint8Array, arg2: AccountId32 | string | Uint8Array, arg3: AccountId32 | string | Uint8Array) => Observable<Option<PalletAssetsApproval>>, [u32, AccountId32, AccountId32]> & QueryableStorageEntry<ApiType, [u32, AccountId32, AccountId32]>;
|
||||
/**
|
||||
* Details of an asset.
|
||||
**/
|
||||
asset: AugmentedQuery<ApiType, (arg: u32 | AnyNumber | Uint8Array) => Observable<Option<PalletAssetsAssetDetails>>, [u32]> & QueryableStorageEntry<ApiType, [u32]>;
|
||||
/**
|
||||
* Metadata of an asset.
|
||||
**/
|
||||
metadata: AugmentedQuery<ApiType, (arg: u32 | AnyNumber | Uint8Array) => Observable<{
|
||||
readonly deposit: u128;
|
||||
readonly name: Bytes;
|
||||
readonly symbol: Bytes;
|
||||
readonly decimals: u8;
|
||||
readonly isFrozen: bool;
|
||||
} & Struct>, [u32]> & QueryableStorageEntry<ApiType, [u32]>;
|
||||
/**
|
||||
* The asset ID enforced for the next asset creation, if any present. Otherwise, this storage
|
||||
* item has no effect.
|
||||
*
|
||||
* This can be useful for setting up constraints for IDs of the new assets. For example, by
|
||||
* providing an initial [`NextAssetId`] and using the [`crate::AutoIncAssetId`] callback, an
|
||||
* auto-increment model can be applied to all new asset IDs.
|
||||
*
|
||||
* The initial next asset ID can be set using the [`GenesisConfig`] or the
|
||||
* [SetNextAssetId](`migration::next_asset_id::SetNextAssetId`) migration.
|
||||
**/
|
||||
nextAssetId: AugmentedQuery<ApiType, () => Observable<Option<u32>>, []> & QueryableStorageEntry<ApiType, []>;
|
||||
/**
|
||||
* Generic query
|
||||
**/
|
||||
[key: string]: QueryableStorageEntry<ApiType>;
|
||||
};
|
||||
aura: {
|
||||
/**
|
||||
* The current authority set.
|
||||
**/
|
||||
authorities: AugmentedQuery<ApiType, () => Observable<Vec<SpConsensusAuraEd25519AppEd25519Public>>, []> & QueryableStorageEntry<ApiType, []>;
|
||||
/**
|
||||
* The current slot of this block.
|
||||
*
|
||||
* This will be set in `on_initialize`.
|
||||
**/
|
||||
currentSlot: AugmentedQuery<ApiType, () => Observable<u64>, []> & QueryableStorageEntry<ApiType, []>;
|
||||
/**
|
||||
* Generic query
|
||||
**/
|
||||
[key: string]: QueryableStorageEntry<ApiType>;
|
||||
};
|
||||
auraExt: {
|
||||
/**
|
||||
* Serves as cache for the authorities.
|
||||
*
|
||||
* The authorities in AuRa are overwritten in `on_initialize` when we switch to a new session,
|
||||
* but we require the old authorities to verify the seal when validating a PoV. This will
|
||||
* always be updated to the latest AuRa authorities in `on_finalize`.
|
||||
**/
|
||||
authorities: AugmentedQuery<ApiType, () => Observable<Vec<SpConsensusAuraEd25519AppEd25519Public>>, []> & QueryableStorageEntry<ApiType, []>;
|
||||
/**
|
||||
* Current slot paired with a number of authored blocks.
|
||||
*
|
||||
* Updated on each block initialization.
|
||||
**/
|
||||
slotInfo: AugmentedQuery<ApiType, () => Observable<Option<ITuple<[u64, u32]>>>, []> & QueryableStorageEntry<ApiType, []>;
|
||||
/**
|
||||
* Generic query
|
||||
**/
|
||||
[key: string]: QueryableStorageEntry<ApiType>;
|
||||
};
|
||||
authorship: {
|
||||
/**
|
||||
* Author of current block.
|
||||
**/
|
||||
author: AugmentedQuery<ApiType, () => Observable<Option<AccountId32>>, []> & QueryableStorageEntry<ApiType, []>;
|
||||
/**
|
||||
* Generic query
|
||||
**/
|
||||
[key: string]: QueryableStorageEntry<ApiType>;
|
||||
};
|
||||
balances: {
|
||||
/**
|
||||
* The Balances pallet example of storing the balance of an account.
|
||||
*
|
||||
* # Example
|
||||
*
|
||||
* ```nocompile
|
||||
* impl pallet_balances::Config for Runtime {
|
||||
* type AccountStore = StorageMapShim<Self::Account<Runtime>, frame_system::Provider<Runtime>, AccountId, Self::AccountData<Balance>>
|
||||
* }
|
||||
* ```
|
||||
*
|
||||
* You can also store the balance of an account in the `System` pallet.
|
||||
*
|
||||
* # Example
|
||||
*
|
||||
* ```nocompile
|
||||
* impl pallet_balances::Config for Runtime {
|
||||
* type AccountStore = System
|
||||
* }
|
||||
* ```
|
||||
*
|
||||
* But this comes with tradeoffs, storing account balances in the system pallet stores
|
||||
* `frame_system` data alongside the account data contrary to storing account balances in the
|
||||
* `Balances` pallet, which uses a `StorageMap` to store balances data only.
|
||||
* NOTE: This is only used in the case that this pallet is used to store balances.
|
||||
**/
|
||||
account: AugmentedQuery<ApiType, (arg: AccountId32 | string | Uint8Array) => Observable<PalletBalancesAccountData>, [AccountId32]> & QueryableStorageEntry<ApiType, [AccountId32]>;
|
||||
/**
|
||||
* Freeze locks on account balances.
|
||||
**/
|
||||
freezes: AugmentedQuery<ApiType, (arg: AccountId32 | string | Uint8Array) => Observable<Vec<FrameSupportTokensMiscIdAmount>>, [AccountId32]> & QueryableStorageEntry<ApiType, [AccountId32]>;
|
||||
/**
|
||||
* Holds on account balances.
|
||||
**/
|
||||
holds: AugmentedQuery<ApiType, (arg: AccountId32 | string | Uint8Array) => Observable<Vec<{
|
||||
readonly id: AssetHubPolkadotRuntimeRuntimeHoldReason;
|
||||
readonly amount: u128;
|
||||
} & Struct>>, [AccountId32]> & QueryableStorageEntry<ApiType, [AccountId32]>;
|
||||
/**
|
||||
* The total units of outstanding deactivated balance in the system.
|
||||
**/
|
||||
inactiveIssuance: AugmentedQuery<ApiType, () => Observable<u128>, []> & QueryableStorageEntry<ApiType, []>;
|
||||
/**
|
||||
* Any liquidity locks on some account balances.
|
||||
* NOTE: Should only be accessed when setting, changing and freeing a lock.
|
||||
*
|
||||
* Use of locks is deprecated in favour of freezes. See `https://github.com/paritytech/substrate/pull/12951/`
|
||||
**/
|
||||
locks: AugmentedQuery<ApiType, (arg: AccountId32 | string | Uint8Array) => Observable<Vec<PalletBalancesBalanceLock>>, [AccountId32]> & QueryableStorageEntry<ApiType, [AccountId32]>;
|
||||
/**
|
||||
* Named reserves on some account balances.
|
||||
*
|
||||
* Use of reserves is deprecated in favour of holds. See `https://github.com/paritytech/substrate/pull/12951/`
|
||||
**/
|
||||
reserves: AugmentedQuery<ApiType, (arg: AccountId32 | string | Uint8Array) => Observable<Vec<PalletBalancesReserveData>>, [AccountId32]> & QueryableStorageEntry<ApiType, [AccountId32]>;
|
||||
/**
|
||||
* The total units issued in the system.
|
||||
**/
|
||||
totalIssuance: AugmentedQuery<ApiType, () => Observable<u128>, []> & QueryableStorageEntry<ApiType, []>;
|
||||
/**
|
||||
* Generic query
|
||||
**/
|
||||
[key: string]: QueryableStorageEntry<ApiType>;
|
||||
};
|
||||
collatorSelection: {
|
||||
/**
|
||||
* Fixed amount to deposit to become a collator.
|
||||
*
|
||||
* When a collator calls `leave_intent` they immediately receive the deposit back.
|
||||
**/
|
||||
candidacyBond: AugmentedQuery<ApiType, () => Observable<u128>, []> & QueryableStorageEntry<ApiType, []>;
|
||||
/**
|
||||
* The (community, limited) collation candidates. `Candidates` and `Invulnerables` should be
|
||||
* mutually exclusive.
|
||||
*
|
||||
* This list is sorted in ascending order by deposit and when the deposits are equal, the least
|
||||
* recently updated is considered greater.
|
||||
**/
|
||||
candidateList: AugmentedQuery<ApiType, () => Observable<Vec<PalletCollatorSelectionCandidateInfo>>, []> & QueryableStorageEntry<ApiType, []>;
|
||||
/**
|
||||
* Desired number of candidates.
|
||||
*
|
||||
* This should ideally always be less than [`Config::MaxCandidates`] for weights to be correct.
|
||||
**/
|
||||
desiredCandidates: AugmentedQuery<ApiType, () => Observable<u32>, []> & QueryableStorageEntry<ApiType, []>;
|
||||
/**
|
||||
* The invulnerable, permissioned collators. This list must be sorted.
|
||||
**/
|
||||
invulnerables: AugmentedQuery<ApiType, () => Observable<Vec<AccountId32>>, []> & QueryableStorageEntry<ApiType, []>;
|
||||
/**
|
||||
* Last block authored by collator.
|
||||
**/
|
||||
lastAuthoredBlock: AugmentedQuery<ApiType, (arg: AccountId32 | string | Uint8Array) => Observable<u32>, [AccountId32]> & QueryableStorageEntry<ApiType, [AccountId32]>;
|
||||
/**
|
||||
* Generic query
|
||||
**/
|
||||
[key: string]: QueryableStorageEntry<ApiType>;
|
||||
};
|
||||
foreignAssets: {
|
||||
/**
|
||||
* The holdings of a specific account for a specific asset.
|
||||
**/
|
||||
account: AugmentedQuery<ApiType, (arg1: StagingXcmV4Location | { parents?: any; interior?: any } | string | Uint8Array, arg2: AccountId32 | string | Uint8Array) => Observable<Option<PalletAssetsAssetAccount>>, [StagingXcmV4Location, AccountId32]> & QueryableStorageEntry<ApiType, [StagingXcmV4Location, AccountId32]>;
|
||||
/**
|
||||
* Approved balance transfers. First balance is the amount approved for transfer. Second
|
||||
* is the amount of `T::Currency` reserved for storing this.
|
||||
* First key is the asset ID, second key is the owner and third key is the delegate.
|
||||
**/
|
||||
approvals: AugmentedQuery<ApiType, (arg1: StagingXcmV4Location | { parents?: any; interior?: any } | string | Uint8Array, arg2: AccountId32 | string | Uint8Array, arg3: AccountId32 | string | Uint8Array) => Observable<Option<PalletAssetsApproval>>, [StagingXcmV4Location, AccountId32, AccountId32]> & QueryableStorageEntry<ApiType, [StagingXcmV4Location, AccountId32, AccountId32]>;
|
||||
/**
|
||||
* Details of an asset.
|
||||
**/
|
||||
asset: AugmentedQuery<ApiType, (arg: StagingXcmV4Location | { parents?: any; interior?: any } | string | Uint8Array) => Observable<Option<PalletAssetsAssetDetails>>, [StagingXcmV4Location]> & QueryableStorageEntry<ApiType, [StagingXcmV4Location]>;
|
||||
/**
|
||||
* Metadata of an asset.
|
||||
**/
|
||||
metadata: AugmentedQuery<ApiType, (arg: StagingXcmV4Location | { parents?: any; interior?: any } | string | Uint8Array) => Observable<{
|
||||
readonly deposit: u128;
|
||||
readonly name: Bytes;
|
||||
readonly symbol: Bytes;
|
||||
readonly decimals: u8;
|
||||
readonly isFrozen: bool;
|
||||
} & Struct>, [StagingXcmV4Location]> & QueryableStorageEntry<ApiType, [StagingXcmV4Location]>;
|
||||
/**
|
||||
* The asset ID enforced for the next asset creation, if any present. Otherwise, this storage
|
||||
* item has no effect.
|
||||
*
|
||||
* This can be useful for setting up constraints for IDs of the new assets. For example, by
|
||||
* providing an initial [`NextAssetId`] and using the [`crate::AutoIncAssetId`] callback, an
|
||||
* auto-increment model can be applied to all new asset IDs.
|
||||
*
|
||||
* The initial next asset ID can be set using the [`GenesisConfig`] or the
|
||||
* [SetNextAssetId](`migration::next_asset_id::SetNextAssetId`) migration.
|
||||
**/
|
||||
nextAssetId: AugmentedQuery<ApiType, () => Observable<Option<StagingXcmV4Location>>, []> & QueryableStorageEntry<ApiType, []>;
|
||||
/**
|
||||
* Generic query
|
||||
**/
|
||||
[key: string]: QueryableStorageEntry<ApiType>;
|
||||
};
|
||||
messageQueue: {
|
||||
/**
|
||||
* The index of the first and last (non-empty) pages.
|
||||
**/
|
||||
bookStateFor: AugmentedQuery<ApiType, (arg: CumulusPrimitivesCoreAggregateMessageOrigin | { Here: any } | { Parent: any } | { Sibling: any } | string | Uint8Array) => Observable<PalletMessageQueueBookState>, [CumulusPrimitivesCoreAggregateMessageOrigin]> & QueryableStorageEntry<ApiType, [CumulusPrimitivesCoreAggregateMessageOrigin]>;
|
||||
/**
|
||||
* The map of page indices to pages.
|
||||
**/
|
||||
pages: AugmentedQuery<ApiType, (arg1: CumulusPrimitivesCoreAggregateMessageOrigin | { Here: any } | { Parent: any } | { Sibling: any } | string | Uint8Array, arg2: u32 | AnyNumber | Uint8Array) => Observable<Option<PalletMessageQueuePage>>, [CumulusPrimitivesCoreAggregateMessageOrigin, u32]> & QueryableStorageEntry<ApiType, [CumulusPrimitivesCoreAggregateMessageOrigin, u32]>;
|
||||
/**
|
||||
* The origin at which we should begin servicing.
|
||||
**/
|
||||
serviceHead: AugmentedQuery<ApiType, () => Observable<Option<CumulusPrimitivesCoreAggregateMessageOrigin>>, []> & QueryableStorageEntry<ApiType, []>;
|
||||
/**
|
||||
* Generic query
|
||||
**/
|
||||
[key: string]: QueryableStorageEntry<ApiType>;
|
||||
};
|
||||
multisig: {
|
||||
/**
|
||||
* The set of open multisig operations.
|
||||
**/
|
||||
multisigs: AugmentedQuery<ApiType, (arg1: AccountId32 | string | Uint8Array, arg2: U8aFixed | string | Uint8Array) => Observable<Option<PalletMultisigMultisig>>, [AccountId32, U8aFixed]> & QueryableStorageEntry<ApiType, [AccountId32, U8aFixed]>;
|
||||
/**
|
||||
* Generic query
|
||||
**/
|
||||
[key: string]: QueryableStorageEntry<ApiType>;
|
||||
};
|
||||
nfts: {
|
||||
/**
|
||||
* The items held by any given account; set out this way so that items owned by a single
|
||||
* account can be enumerated.
|
||||
**/
|
||||
account: AugmentedQuery<ApiType, (arg1: AccountId32 | string | Uint8Array, arg2: u32 | AnyNumber | Uint8Array, arg3: u32 | AnyNumber | Uint8Array) => Observable<Option<Null>>, [AccountId32, u32, u32]> & QueryableStorageEntry<ApiType, [AccountId32, u32, u32]>;
|
||||
/**
|
||||
* Attributes of a collection.
|
||||
**/
|
||||
attribute: AugmentedQuery<ApiType, (arg1: u32 | AnyNumber | Uint8Array, arg2: Option<u32> | null | Uint8Array | u32 | AnyNumber, arg3: PalletNftsAttributeNamespace | { Pallet: any } | { CollectionOwner: any } | { ItemOwner: any } | { Account: any } | string | Uint8Array, arg4: Bytes | string | Uint8Array) => Observable<Option<ITuple<[Bytes, PalletNftsAttributeDeposit]>>>, [u32, Option<u32>, PalletNftsAttributeNamespace, Bytes]> & QueryableStorageEntry<ApiType, [u32, Option<u32>, PalletNftsAttributeNamespace, Bytes]>;
|
||||
/**
|
||||
* Details of a collection.
|
||||
**/
|
||||
collection: AugmentedQuery<ApiType, (arg: u32 | AnyNumber | Uint8Array) => Observable<Option<PalletNftsCollectionDetails>>, [u32]> & QueryableStorageEntry<ApiType, [u32]>;
|
||||
/**
|
||||
* The collections owned by any given account; set out this way so that collections owned by
|
||||
* a single account can be enumerated.
|
||||
**/
|
||||
collectionAccount: AugmentedQuery<ApiType, (arg1: AccountId32 | string | Uint8Array, arg2: u32 | AnyNumber | Uint8Array) => Observable<Option<Null>>, [AccountId32, u32]> & QueryableStorageEntry<ApiType, [AccountId32, u32]>;
|
||||
/**
|
||||
* Config of a collection.
|
||||
**/
|
||||
collectionConfigOf: AugmentedQuery<ApiType, (arg: u32 | AnyNumber | Uint8Array) => Observable<Option<PalletNftsCollectionConfig>>, [u32]> & QueryableStorageEntry<ApiType, [u32]>;
|
||||
/**
|
||||
* Metadata of a collection.
|
||||
**/
|
||||
collectionMetadataOf: AugmentedQuery<ApiType, (arg: u32 | AnyNumber | Uint8Array) => Observable<Option<PalletNftsCollectionMetadata>>, [u32]> & QueryableStorageEntry<ApiType, [u32]>;
|
||||
/**
|
||||
* The items in existence and their ownership details.
|
||||
* Stores collection roles as per account.
|
||||
**/
|
||||
collectionRoleOf: AugmentedQuery<ApiType, (arg1: u32 | AnyNumber | Uint8Array, arg2: AccountId32 | string | Uint8Array) => Observable<Option<u8>>, [u32, AccountId32]> & QueryableStorageEntry<ApiType, [u32, AccountId32]>;
|
||||
/**
|
||||
* The items in existence and their ownership details.
|
||||
**/
|
||||
item: AugmentedQuery<ApiType, (arg1: u32 | AnyNumber | Uint8Array, arg2: u32 | AnyNumber | Uint8Array) => Observable<Option<PalletNftsItemDetails>>, [u32, u32]> & QueryableStorageEntry<ApiType, [u32, u32]>;
|
||||
/**
|
||||
* Item attribute approvals.
|
||||
**/
|
||||
itemAttributesApprovalsOf: AugmentedQuery<ApiType, (arg1: u32 | AnyNumber | Uint8Array, arg2: u32 | AnyNumber | Uint8Array) => Observable<BTreeSet<AccountId32>>, [u32, u32]> & QueryableStorageEntry<ApiType, [u32, u32]>;
|
||||
/**
|
||||
* Config of an item.
|
||||
**/
|
||||
itemConfigOf: AugmentedQuery<ApiType, (arg1: u32 | AnyNumber | Uint8Array, arg2: u32 | AnyNumber | Uint8Array) => Observable<Option<PalletNftsItemConfig>>, [u32, u32]> & QueryableStorageEntry<ApiType, [u32, u32]>;
|
||||
/**
|
||||
* Metadata of an item.
|
||||
**/
|
||||
itemMetadataOf: AugmentedQuery<ApiType, (arg1: u32 | AnyNumber | Uint8Array, arg2: u32 | AnyNumber | Uint8Array) => Observable<Option<PalletNftsItemMetadata>>, [u32, u32]> & QueryableStorageEntry<ApiType, [u32, u32]>;
|
||||
/**
|
||||
* A price of an item.
|
||||
**/
|
||||
itemPriceOf: AugmentedQuery<ApiType, (arg1: u32 | AnyNumber | Uint8Array, arg2: u32 | AnyNumber | Uint8Array) => Observable<Option<ITuple<[u128, Option<AccountId32>]>>>, [u32, u32]> & QueryableStorageEntry<ApiType, [u32, u32]>;
|
||||
/**
|
||||
* Stores the `CollectionId` that is going to be used for the next collection.
|
||||
* This gets incremented whenever a new collection is created.
|
||||
**/
|
||||
nextCollectionId: AugmentedQuery<ApiType, () => Observable<Option<u32>>, []> & QueryableStorageEntry<ApiType, []>;
|
||||
/**
|
||||
* The collection, if any, of which an account is willing to take ownership.
|
||||
**/
|
||||
ownershipAcceptance: AugmentedQuery<ApiType, (arg: AccountId32 | string | Uint8Array) => Observable<Option<u32>>, [AccountId32]> & QueryableStorageEntry<ApiType, [AccountId32]>;
|
||||
/**
|
||||
* Handles all the pending swaps.
|
||||
**/
|
||||
pendingSwapOf: AugmentedQuery<ApiType, (arg1: u32 | AnyNumber | Uint8Array, arg2: u32 | AnyNumber | Uint8Array) => Observable<Option<PalletNftsPendingSwap>>, [u32, u32]> & QueryableStorageEntry<ApiType, [u32, u32]>;
|
||||
/**
|
||||
* Generic query
|
||||
**/
|
||||
[key: string]: QueryableStorageEntry<ApiType>;
|
||||
};
|
||||
parachainInfo: {
|
||||
parachainId: AugmentedQuery<ApiType, () => Observable<u32>, []> & QueryableStorageEntry<ApiType, []>;
|
||||
/**
|
||||
* Generic query
|
||||
**/
|
||||
[key: string]: QueryableStorageEntry<ApiType>;
|
||||
};
|
||||
parachainSystem: {
|
||||
/**
|
||||
* Storage field that keeps track of bandwidth used by the unincluded segment along with the
|
||||
* latest HRMP watermark. Used for limiting the acceptance of new blocks with
|
||||
* respect to relay chain constraints.
|
||||
**/
|
||||
aggregatedUnincludedSegment: AugmentedQuery<ApiType, () => Observable<Option<CumulusPalletParachainSystemUnincludedSegmentSegmentTracker>>, []> & QueryableStorageEntry<ApiType, []>;
|
||||
/**
|
||||
* The number of HRMP messages we observed in `on_initialize` and thus used that number for
|
||||
* announcing the weight of `on_initialize` and `on_finalize`.
|
||||
**/
|
||||
announcedHrmpMessagesPerCandidate: AugmentedQuery<ApiType, () => Observable<u32>, []> & QueryableStorageEntry<ApiType, []>;
|
||||
/**
|
||||
* A custom head data that should be returned as result of `validate_block`.
|
||||
*
|
||||
* See `Pallet::set_custom_validation_head_data` for more information.
|
||||
**/
|
||||
customValidationHeadData: AugmentedQuery<ApiType, () => Observable<Option<Bytes>>, []> & QueryableStorageEntry<ApiType, []>;
|
||||
/**
|
||||
* Were the validation data set to notify the relay chain?
|
||||
**/
|
||||
didSetValidationCode: AugmentedQuery<ApiType, () => Observable<bool>, []> & QueryableStorageEntry<ApiType, []>;
|
||||
/**
|
||||
* The parachain host configuration that was obtained from the relay parent.
|
||||
*
|
||||
* This field is meant to be updated each block with the validation data inherent. Therefore,
|
||||
* before processing of the inherent, e.g. in `on_initialize` this data may be stale.
|
||||
*
|
||||
* This data is also absent from the genesis.
|
||||
**/
|
||||
hostConfiguration: AugmentedQuery<ApiType, () => Observable<Option<PolkadotPrimitivesV8AbridgedHostConfiguration>>, []> & QueryableStorageEntry<ApiType, []>;
|
||||
/**
|
||||
* HRMP messages that were sent in a block.
|
||||
*
|
||||
* This will be cleared in `on_initialize` of each new block.
|
||||
**/
|
||||
hrmpOutboundMessages: AugmentedQuery<ApiType, () => Observable<Vec<PolkadotCorePrimitivesOutboundHrmpMessage>>, []> & QueryableStorageEntry<ApiType, []>;
|
||||
/**
|
||||
* HRMP watermark that was set in a block.
|
||||
*
|
||||
* This will be cleared in `on_initialize` of each new block.
|
||||
**/
|
||||
hrmpWatermark: AugmentedQuery<ApiType, () => Observable<u32>, []> & QueryableStorageEntry<ApiType, []>;
|
||||
/**
|
||||
* The last downward message queue chain head we have observed.
|
||||
*
|
||||
* This value is loaded before and saved after processing inbound downward messages carried
|
||||
* by the system inherent.
|
||||
**/
|
||||
lastDmqMqcHead: AugmentedQuery<ApiType, () => Observable<H256>, []> & QueryableStorageEntry<ApiType, []>;
|
||||
/**
|
||||
* The message queue chain heads we have observed per each channel incoming channel.
|
||||
*
|
||||
* This value is loaded before and saved after processing inbound downward messages carried
|
||||
* by the system inherent.
|
||||
**/
|
||||
lastHrmpMqcHeads: AugmentedQuery<ApiType, () => Observable<BTreeMap<u32, H256>>, []> & QueryableStorageEntry<ApiType, []>;
|
||||
/**
|
||||
* The relay chain block number associated with the last parachain block.
|
||||
*
|
||||
* This is updated in `on_finalize`.
|
||||
**/
|
||||
lastRelayChainBlockNumber: AugmentedQuery<ApiType, () => Observable<u32>, []> & QueryableStorageEntry<ApiType, []>;
|
||||
/**
|
||||
* Validation code that is set by the parachain and is to be communicated to collator and
|
||||
* consequently the relay-chain.
|
||||
*
|
||||
* This will be cleared in `on_initialize` of each new block if no other pallet already set
|
||||
* the value.
|
||||
**/
|
||||
newValidationCode: AugmentedQuery<ApiType, () => Observable<Option<Bytes>>, []> & QueryableStorageEntry<ApiType, []>;
|
||||
/**
|
||||
* Upward messages that are still pending and not yet send to the relay chain.
|
||||
**/
|
||||
pendingUpwardMessages: AugmentedQuery<ApiType, () => Observable<Vec<Bytes>>, []> & QueryableStorageEntry<ApiType, []>;
|
||||
/**
|
||||
* In case of a scheduled upgrade, this storage field contains the validation code to be
|
||||
* applied.
|
||||
*
|
||||
* As soon as the relay chain gives us the go-ahead signal, we will overwrite the
|
||||
* [`:code`][sp_core::storage::well_known_keys::CODE] which will result the next block process
|
||||
* with the new validation code. This concludes the upgrade process.
|
||||
**/
|
||||
pendingValidationCode: AugmentedQuery<ApiType, () => Observable<Bytes>, []> & QueryableStorageEntry<ApiType, []>;
|
||||
/**
|
||||
* Number of downward messages processed in a block.
|
||||
*
|
||||
* This will be cleared in `on_initialize` of each new block.
|
||||
**/
|
||||
processedDownwardMessages: AugmentedQuery<ApiType, () => Observable<u32>, []> & QueryableStorageEntry<ApiType, []>;
|
||||
/**
|
||||
* The state proof for the last relay parent block.
|
||||
*
|
||||
* This field is meant to be updated each block with the validation data inherent. Therefore,
|
||||
* before processing of the inherent, e.g. in `on_initialize` this data may be stale.
|
||||
*
|
||||
* This data is also absent from the genesis.
|
||||
**/
|
||||
relayStateProof: AugmentedQuery<ApiType, () => Observable<Option<SpTrieStorageProof>>, []> & QueryableStorageEntry<ApiType, []>;
|
||||
/**
|
||||
* The snapshot of some state related to messaging relevant to the current parachain as per
|
||||
* the relay parent.
|
||||
*
|
||||
* This field is meant to be updated each block with the validation data inherent. Therefore,
|
||||
* before processing of the inherent, e.g. in `on_initialize` this data may be stale.
|
||||
*
|
||||
* This data is also absent from the genesis.
|
||||
**/
|
||||
relevantMessagingState: AugmentedQuery<ApiType, () => Observable<Option<CumulusPalletParachainSystemRelayStateSnapshotMessagingStateSnapshot>>, []> & QueryableStorageEntry<ApiType, []>;
|
||||
/**
|
||||
* The weight we reserve at the beginning of the block for processing DMP messages. This
|
||||
* overrides the amount set in the Config trait.
|
||||
**/
|
||||
reservedDmpWeightOverride: AugmentedQuery<ApiType, () => Observable<Option<SpWeightsWeightV2Weight>>, []> & QueryableStorageEntry<ApiType, []>;
|
||||
/**
|
||||
* The weight we reserve at the beginning of the block for processing XCMP messages. This
|
||||
* overrides the amount set in the Config trait.
|
||||
**/
|
||||
reservedXcmpWeightOverride: AugmentedQuery<ApiType, () => Observable<Option<SpWeightsWeightV2Weight>>, []> & QueryableStorageEntry<ApiType, []>;
|
||||
/**
|
||||
* Latest included block descendants the runtime accepted. In other words, these are
|
||||
* ancestors of the currently executing block which have not been included in the observed
|
||||
* relay-chain state.
|
||||
*
|
||||
* The segment length is limited by the capacity returned from the [`ConsensusHook`] configured
|
||||
* in the pallet.
|
||||
**/
|
||||
unincludedSegment: AugmentedQuery<ApiType, () => Observable<Vec<CumulusPalletParachainSystemUnincludedSegmentAncestor>>, []> & QueryableStorageEntry<ApiType, []>;
|
||||
/**
|
||||
* Optional upgrade go-ahead signal from the relay-chain.
|
||||
*
|
||||
* This storage item is a mirror of the corresponding value for the current parachain from the
|
||||
* relay-chain. This value is ephemeral which means it doesn't hit the storage. This value is
|
||||
* set after the inherent.
|
||||
**/
|
||||
upgradeGoAhead: AugmentedQuery<ApiType, () => Observable<Option<PolkadotPrimitivesV8UpgradeGoAhead>>, []> & QueryableStorageEntry<ApiType, []>;
|
||||
/**
|
||||
* An option which indicates if the relay-chain restricts signalling a validation code upgrade.
|
||||
* In other words, if this is `Some` and [`NewValidationCode`] is `Some` then the produced
|
||||
* candidate will be invalid.
|
||||
*
|
||||
* This storage item is a mirror of the corresponding value for the current parachain from the
|
||||
* relay-chain. This value is ephemeral which means it doesn't hit the storage. This value is
|
||||
* set after the inherent.
|
||||
**/
|
||||
upgradeRestrictionSignal: AugmentedQuery<ApiType, () => Observable<Option<PolkadotPrimitivesV8UpgradeRestriction>>, []> & QueryableStorageEntry<ApiType, []>;
|
||||
/**
|
||||
* The factor to multiply the base delivery fee by for UMP.
|
||||
**/
|
||||
upwardDeliveryFeeFactor: AugmentedQuery<ApiType, () => Observable<u128>, []> & QueryableStorageEntry<ApiType, []>;
|
||||
/**
|
||||
* Upward messages that were sent in a block.
|
||||
*
|
||||
* This will be cleared in `on_initialize` of each new block.
|
||||
**/
|
||||
upwardMessages: AugmentedQuery<ApiType, () => Observable<Vec<Bytes>>, []> & QueryableStorageEntry<ApiType, []>;
|
||||
/**
|
||||
* The [`PersistedValidationData`] set for this block.
|
||||
* This value is expected to be set only once per block and it's never stored
|
||||
* in the trie.
|
||||
**/
|
||||
validationData: AugmentedQuery<ApiType, () => Observable<Option<PolkadotPrimitivesV8PersistedValidationData>>, []> & QueryableStorageEntry<ApiType, []>;
|
||||
/**
|
||||
* Generic query
|
||||
**/
|
||||
[key: string]: QueryableStorageEntry<ApiType>;
|
||||
};
|
||||
polkadotXcm: {
|
||||
/**
|
||||
* The existing asset traps.
|
||||
*
|
||||
* Key is the blake2 256 hash of (origin, versioned `Assets`) pair. Value is the number of
|
||||
* times this pair has been trapped (usually just 1 if it exists at all).
|
||||
**/
|
||||
assetTraps: AugmentedQuery<ApiType, (arg: H256 | string | Uint8Array) => Observable<u32>, [H256]> & QueryableStorageEntry<ApiType, [H256]>;
|
||||
/**
|
||||
* The current migration's stage, if any.
|
||||
**/
|
||||
currentMigration: AugmentedQuery<ApiType, () => Observable<Option<PalletXcmVersionMigrationStage>>, []> & QueryableStorageEntry<ApiType, []>;
|
||||
/**
|
||||
* Fungible assets which we know are locked on this chain.
|
||||
**/
|
||||
lockedFungibles: AugmentedQuery<ApiType, (arg: AccountId32 | string | Uint8Array) => Observable<Option<Vec<ITuple<[u128, XcmVersionedLocation]>>>>, [AccountId32]> & QueryableStorageEntry<ApiType, [AccountId32]>;
|
||||
/**
|
||||
* The ongoing queries.
|
||||
**/
|
||||
queries: AugmentedQuery<ApiType, (arg: u64 | AnyNumber | Uint8Array) => Observable<Option<PalletXcmQueryStatus>>, [u64]> & QueryableStorageEntry<ApiType, [u64]>;
|
||||
/**
|
||||
* The latest available query index.
|
||||
**/
|
||||
queryCounter: AugmentedQuery<ApiType, () => Observable<u64>, []> & QueryableStorageEntry<ApiType, []>;
|
||||
/**
|
||||
* If [`ShouldRecordXcm`] is set to true, then the last XCM program executed locally
|
||||
* will be stored here.
|
||||
* Runtime APIs can fetch the XCM that was executed by accessing this value.
|
||||
*
|
||||
* Only relevant if this pallet is being used as the [`xcm_executor::traits::RecordXcm`]
|
||||
* implementation in the XCM executor configuration.
|
||||
**/
|
||||
recordedXcm: AugmentedQuery<ApiType, () => Observable<Option<Vec<StagingXcmV5Instruction>>>, []> & QueryableStorageEntry<ApiType, []>;
|
||||
/**
|
||||
* Fungible assets which we know are locked on a remote chain.
|
||||
**/
|
||||
remoteLockedFungibles: AugmentedQuery<ApiType, (arg1: u32 | AnyNumber | Uint8Array, arg2: AccountId32 | string | Uint8Array, arg3: XcmVersionedAssetId | { V3: any } | { V4: any } | { V5: any } | string | Uint8Array) => Observable<Option<PalletXcmRemoteLockedFungibleRecord>>, [u32, AccountId32, XcmVersionedAssetId]> & QueryableStorageEntry<ApiType, [u32, AccountId32, XcmVersionedAssetId]>;
|
||||
/**
|
||||
* Default version to encode XCM when latest version of destination is unknown. If `None`,
|
||||
* then the destinations whose XCM version is unknown are considered unreachable.
|
||||
**/
|
||||
safeXcmVersion: AugmentedQuery<ApiType, () => Observable<Option<u32>>, []> & QueryableStorageEntry<ApiType, []>;
|
||||
/**
|
||||
* Whether or not incoming XCMs (both executed locally and received) should be recorded.
|
||||
* Only one XCM program will be recorded at a time.
|
||||
* This is meant to be used in runtime APIs, and it's advised it stays false
|
||||
* for all other use cases, so as to not degrade regular performance.
|
||||
*
|
||||
* Only relevant if this pallet is being used as the [`xcm_executor::traits::RecordXcm`]
|
||||
* implementation in the XCM executor configuration.
|
||||
**/
|
||||
shouldRecordXcm: AugmentedQuery<ApiType, () => Observable<bool>, []> & QueryableStorageEntry<ApiType, []>;
|
||||
/**
|
||||
* The Latest versions that we know various locations support.
|
||||
**/
|
||||
supportedVersion: AugmentedQuery<ApiType, (arg1: u32 | AnyNumber | Uint8Array, arg2: XcmVersionedLocation | { V3: any } | { V4: any } | { V5: any } | string | Uint8Array) => Observable<Option<u32>>, [u32, XcmVersionedLocation]> & QueryableStorageEntry<ApiType, [u32, XcmVersionedLocation]>;
|
||||
/**
|
||||
* Destinations whose latest XCM version we would like to know. Duplicates not allowed, and
|
||||
* the `u32` counter is the number of times that a send to the destination has been attempted,
|
||||
* which is used as a prioritization.
|
||||
**/
|
||||
versionDiscoveryQueue: AugmentedQuery<ApiType, () => Observable<Vec<ITuple<[XcmVersionedLocation, u32]>>>, []> & QueryableStorageEntry<ApiType, []>;
|
||||
/**
|
||||
* All locations that we have requested version notifications from.
|
||||
**/
|
||||
versionNotifiers: AugmentedQuery<ApiType, (arg1: u32 | AnyNumber | Uint8Array, arg2: XcmVersionedLocation | { V3: any } | { V4: any } | { V5: any } | string | Uint8Array) => Observable<Option<u64>>, [u32, XcmVersionedLocation]> & QueryableStorageEntry<ApiType, [u32, XcmVersionedLocation]>;
|
||||
/**
|
||||
* The target locations that are subscribed to our version changes, as well as the most recent
|
||||
* of our versions we informed them of.
|
||||
**/
|
||||
versionNotifyTargets: AugmentedQuery<ApiType, (arg1: u32 | AnyNumber | Uint8Array, arg2: XcmVersionedLocation | { V3: any } | { V4: any } | { V5: any } | string | Uint8Array) => Observable<Option<ITuple<[u64, SpWeightsWeightV2Weight, u32]>>>, [u32, XcmVersionedLocation]> & QueryableStorageEntry<ApiType, [u32, XcmVersionedLocation]>;
|
||||
/**
|
||||
* Global suspension state of the XCM executor.
|
||||
**/
|
||||
xcmExecutionSuspended: AugmentedQuery<ApiType, () => Observable<bool>, []> & QueryableStorageEntry<ApiType, []>;
|
||||
/**
|
||||
* Generic query
|
||||
**/
|
||||
[key: string]: QueryableStorageEntry<ApiType>;
|
||||
};
|
||||
poolAssets: {
|
||||
/**
|
||||
* The holdings of a specific account for a specific asset.
|
||||
**/
|
||||
account: AugmentedQuery<ApiType, (arg1: u32 | AnyNumber | Uint8Array, arg2: AccountId32 | string | Uint8Array) => Observable<Option<PalletAssetsAssetAccount>>, [u32, AccountId32]> & QueryableStorageEntry<ApiType, [u32, AccountId32]>;
|
||||
/**
|
||||
* Approved balance transfers. First balance is the amount approved for transfer. Second
|
||||
* is the amount of `T::Currency` reserved for storing this.
|
||||
* First key is the asset ID, second key is the owner and third key is the delegate.
|
||||
**/
|
||||
approvals: AugmentedQuery<ApiType, (arg1: u32 | AnyNumber | Uint8Array, arg2: AccountId32 | string | Uint8Array, arg3: AccountId32 | string | Uint8Array) => Observable<Option<PalletAssetsApproval>>, [u32, AccountId32, AccountId32]> & QueryableStorageEntry<ApiType, [u32, AccountId32, AccountId32]>;
|
||||
/**
|
||||
* Details of an asset.
|
||||
**/
|
||||
asset: AugmentedQuery<ApiType, (arg: u32 | AnyNumber | Uint8Array) => Observable<Option<PalletAssetsAssetDetails>>, [u32]> & QueryableStorageEntry<ApiType, [u32]>;
|
||||
/**
|
||||
* Metadata of an asset.
|
||||
**/
|
||||
metadata: AugmentedQuery<ApiType, (arg: u32 | AnyNumber | Uint8Array) => Observable<PalletAssetsAssetMetadata>, [u32]> & QueryableStorageEntry<ApiType, [u32]>;
|
||||
/**
|
||||
* The asset ID enforced for the next asset creation, if any present. Otherwise, this storage
|
||||
* item has no effect.
|
||||
*
|
||||
* This can be useful for setting up constraints for IDs of the new assets. For example, by
|
||||
* providing an initial [`NextAssetId`] and using the [`crate::AutoIncAssetId`] callback, an
|
||||
* auto-increment model can be applied to all new asset IDs.
|
||||
*
|
||||
* The initial next asset ID can be set using the [`GenesisConfig`] or the
|
||||
* [SetNextAssetId](`migration::next_asset_id::SetNextAssetId`) migration.
|
||||
**/
|
||||
nextAssetId: AugmentedQuery<ApiType, () => Observable<Option<u32>>, []> & QueryableStorageEntry<ApiType, []>;
|
||||
/**
|
||||
* Generic query
|
||||
**/
|
||||
[key: string]: QueryableStorageEntry<ApiType>;
|
||||
};
|
||||
proxy: {
|
||||
/**
|
||||
* The announcements made by the proxy (key).
|
||||
**/
|
||||
announcements: AugmentedQuery<ApiType, (arg: AccountId32 | string | Uint8Array) => Observable<ITuple<[Vec<PalletProxyAnnouncement>, u128]>>, [AccountId32]> & QueryableStorageEntry<ApiType, [AccountId32]>;
|
||||
/**
|
||||
* The set of account proxies. Maps the account which has delegated to the accounts
|
||||
* which are being delegated to, together with the amount held on deposit.
|
||||
**/
|
||||
proxies: AugmentedQuery<ApiType, (arg: AccountId32 | string | Uint8Array) => Observable<ITuple<[Vec<PalletProxyProxyDefinition>, u128]>>, [AccountId32]> & QueryableStorageEntry<ApiType, [AccountId32]>;
|
||||
/**
|
||||
* Generic query
|
||||
**/
|
||||
[key: string]: QueryableStorageEntry<ApiType>;
|
||||
};
|
||||
session: {
|
||||
/**
|
||||
* Current index of the session.
|
||||
**/
|
||||
currentIndex: AugmentedQuery<ApiType, () => Observable<u32>, []> & QueryableStorageEntry<ApiType, []>;
|
||||
/**
|
||||
* Indices of disabled validators.
|
||||
*
|
||||
* The vec is always kept sorted so that we can find whether a given validator is
|
||||
* disabled using binary search. It gets cleared when `on_session_ending` returns
|
||||
* a new set of identities.
|
||||
**/
|
||||
disabledValidators: AugmentedQuery<ApiType, () => Observable<Vec<u32>>, []> & QueryableStorageEntry<ApiType, []>;
|
||||
/**
|
||||
* The owner of a key. The key is the `KeyTypeId` + the encoded key.
|
||||
**/
|
||||
keyOwner: AugmentedQuery<ApiType, (arg: ITuple<[SpCoreCryptoKeyTypeId, Bytes]> | [SpCoreCryptoKeyTypeId | string | Uint8Array, Bytes | string | Uint8Array]) => Observable<Option<AccountId32>>, [ITuple<[SpCoreCryptoKeyTypeId, Bytes]>]> & QueryableStorageEntry<ApiType, [ITuple<[SpCoreCryptoKeyTypeId, Bytes]>]>;
|
||||
/**
|
||||
* The next session keys for a validator.
|
||||
**/
|
||||
nextKeys: AugmentedQuery<ApiType, (arg: AccountId32 | string | Uint8Array) => Observable<Option<AssetHubPolkadotRuntimeSessionKeys>>, [AccountId32]> & QueryableStorageEntry<ApiType, [AccountId32]>;
|
||||
/**
|
||||
* True if the underlying economic identities or weighting behind the validators
|
||||
* has changed in the queued validator set.
|
||||
**/
|
||||
queuedChanged: AugmentedQuery<ApiType, () => Observable<bool>, []> & QueryableStorageEntry<ApiType, []>;
|
||||
/**
|
||||
* The queued keys for the next session. When the next session begins, these keys
|
||||
* will be used to determine the validator's session keys.
|
||||
**/
|
||||
queuedKeys: AugmentedQuery<ApiType, () => Observable<Vec<ITuple<[AccountId32, AssetHubPolkadotRuntimeSessionKeys]>>>, []> & QueryableStorageEntry<ApiType, []>;
|
||||
/**
|
||||
* The current set of validators.
|
||||
**/
|
||||
validators: AugmentedQuery<ApiType, () => Observable<Vec<AccountId32>>, []> & QueryableStorageEntry<ApiType, []>;
|
||||
/**
|
||||
* Generic query
|
||||
**/
|
||||
[key: string]: QueryableStorageEntry<ApiType>;
|
||||
};
|
||||
stateTrieMigration: {
|
||||
/**
|
||||
* The limits that are imposed on automatic migrations.
|
||||
*
|
||||
* If set to None, then no automatic migration happens.
|
||||
**/
|
||||
autoLimits: AugmentedQuery<ApiType, () => Observable<Option<PalletStateTrieMigrationMigrationLimits>>, []> & QueryableStorageEntry<ApiType, []>;
|
||||
/**
|
||||
* Migration progress.
|
||||
*
|
||||
* This stores the snapshot of the last migrated keys. It can be set into motion and move
|
||||
* forward by any of the means provided by this pallet.
|
||||
**/
|
||||
migrationProcess: AugmentedQuery<ApiType, () => Observable<PalletStateTrieMigrationMigrationTask>, []> & QueryableStorageEntry<ApiType, []>;
|
||||
/**
|
||||
* The maximum limits that the signed migration could use.
|
||||
*
|
||||
* If not set, no signed submission is allowed.
|
||||
**/
|
||||
signedMigrationMaxLimits: AugmentedQuery<ApiType, () => Observable<Option<PalletStateTrieMigrationMigrationLimits>>, []> & QueryableStorageEntry<ApiType, []>;
|
||||
/**
|
||||
* Generic query
|
||||
**/
|
||||
[key: string]: QueryableStorageEntry<ApiType>;
|
||||
};
|
||||
system: {
|
||||
/**
|
||||
* The full account information for a particular account ID.
|
||||
**/
|
||||
account: AugmentedQuery<ApiType, (arg: AccountId32 | string | Uint8Array) => Observable<FrameSystemAccountInfo>, [AccountId32]> & QueryableStorageEntry<ApiType, [AccountId32]>;
|
||||
/**
|
||||
* Total length (in bytes) for all extrinsics put together, for the current block.
|
||||
**/
|
||||
allExtrinsicsLen: AugmentedQuery<ApiType, () => Observable<Option<u32>>, []> & QueryableStorageEntry<ApiType, []>;
|
||||
/**
|
||||
* `Some` if a code upgrade has been authorized.
|
||||
**/
|
||||
authorizedUpgrade: AugmentedQuery<ApiType, () => Observable<Option<FrameSystemCodeUpgradeAuthorization>>, []> & QueryableStorageEntry<ApiType, []>;
|
||||
/**
|
||||
* Map of block numbers to block hashes.
|
||||
**/
|
||||
blockHash: AugmentedQuery<ApiType, (arg: u32 | AnyNumber | Uint8Array) => Observable<H256>, [u32]> & QueryableStorageEntry<ApiType, [u32]>;
|
||||
/**
|
||||
* The current weight for the block.
|
||||
**/
|
||||
blockWeight: AugmentedQuery<ApiType, () => Observable<FrameSupportDispatchPerDispatchClassWeight>, []> & QueryableStorageEntry<ApiType, []>;
|
||||
/**
|
||||
* Digest of the current block, also part of the block header.
|
||||
**/
|
||||
digest: AugmentedQuery<ApiType, () => Observable<SpRuntimeDigest>, []> & QueryableStorageEntry<ApiType, []>;
|
||||
/**
|
||||
* The number of events in the `Events<T>` list.
|
||||
**/
|
||||
eventCount: AugmentedQuery<ApiType, () => Observable<u32>, []> & QueryableStorageEntry<ApiType, []>;
|
||||
/**
|
||||
* Events deposited for the current block.
|
||||
*
|
||||
* NOTE: The item is unbound and should therefore never be read on chain.
|
||||
* It could otherwise inflate the PoV size of a block.
|
||||
*
|
||||
* Events have a large in-memory size. Box the events to not go out-of-memory
|
||||
* just in case someone still reads them from within the runtime.
|
||||
**/
|
||||
events: AugmentedQuery<ApiType, () => Observable<Vec<FrameSystemEventRecord>>, []> & QueryableStorageEntry<ApiType, []>;
|
||||
/**
|
||||
* Mapping between a topic (represented by T::Hash) and a vector of indexes
|
||||
* of events in the `<Events<T>>` list.
|
||||
*
|
||||
* All topic vectors have deterministic storage locations depending on the topic. This
|
||||
* allows light-clients to leverage the changes trie storage tracking mechanism and
|
||||
* in case of changes fetch the list of events of interest.
|
||||
*
|
||||
* The value has the type `(BlockNumberFor<T>, EventIndex)` because if we used only just
|
||||
* the `EventIndex` then in case if the topic has the same contents on the next block
|
||||
* no notification will be triggered thus the event might be lost.
|
||||
**/
|
||||
eventTopics: AugmentedQuery<ApiType, (arg: H256 | string | Uint8Array) => Observable<Vec<ITuple<[u32, u32]>>>, [H256]> & QueryableStorageEntry<ApiType, [H256]>;
|
||||
/**
|
||||
* The execution phase of the block.
|
||||
**/
|
||||
executionPhase: AugmentedQuery<ApiType, () => Observable<Option<FrameSystemPhase>>, []> & QueryableStorageEntry<ApiType, []>;
|
||||
/**
|
||||
* Total extrinsics count for the current block.
|
||||
**/
|
||||
extrinsicCount: AugmentedQuery<ApiType, () => Observable<Option<u32>>, []> & QueryableStorageEntry<ApiType, []>;
|
||||
/**
|
||||
* Extrinsics data for the current block (maps an extrinsic's index to its data).
|
||||
**/
|
||||
extrinsicData: AugmentedQuery<ApiType, (arg: u32 | AnyNumber | Uint8Array) => Observable<Bytes>, [u32]> & QueryableStorageEntry<ApiType, [u32]>;
|
||||
/**
|
||||
* Whether all inherents have been applied.
|
||||
**/
|
||||
inherentsApplied: AugmentedQuery<ApiType, () => Observable<bool>, []> & QueryableStorageEntry<ApiType, []>;
|
||||
/**
|
||||
* Stores the `spec_version` and `spec_name` of when the last runtime upgrade happened.
|
||||
**/
|
||||
lastRuntimeUpgrade: AugmentedQuery<ApiType, () => Observable<Option<FrameSystemLastRuntimeUpgradeInfo>>, []> & QueryableStorageEntry<ApiType, []>;
|
||||
/**
|
||||
* The current block number being processed. Set by `execute_block`.
|
||||
**/
|
||||
number: AugmentedQuery<ApiType, () => Observable<u32>, []> & QueryableStorageEntry<ApiType, []>;
|
||||
/**
|
||||
* Hash of the previous block.
|
||||
**/
|
||||
parentHash: AugmentedQuery<ApiType, () => Observable<H256>, []> & QueryableStorageEntry<ApiType, []>;
|
||||
/**
|
||||
* True if we have upgraded so that AccountInfo contains three types of `RefCount`. False
|
||||
* (default) if not.
|
||||
**/
|
||||
upgradedToTripleRefCount: AugmentedQuery<ApiType, () => Observable<bool>, []> & QueryableStorageEntry<ApiType, []>;
|
||||
/**
|
||||
* True if we have upgraded so that `type RefCount` is `u32`. False (default) if not.
|
||||
**/
|
||||
upgradedToU32RefCount: AugmentedQuery<ApiType, () => Observable<bool>, []> & QueryableStorageEntry<ApiType, []>;
|
||||
/**
|
||||
* Generic query
|
||||
**/
|
||||
[key: string]: QueryableStorageEntry<ApiType>;
|
||||
};
|
||||
timestamp: {
|
||||
/**
|
||||
* Whether the timestamp has been updated in this block.
|
||||
*
|
||||
* This value is updated to `true` upon successful submission of a timestamp by a node.
|
||||
* It is then checked at the end of each block execution in the `on_finalize` hook.
|
||||
**/
|
||||
didUpdate: AugmentedQuery<ApiType, () => Observable<bool>, []> & QueryableStorageEntry<ApiType, []>;
|
||||
/**
|
||||
* The current time for the current block.
|
||||
**/
|
||||
now: AugmentedQuery<ApiType, () => Observable<u64>, []> & QueryableStorageEntry<ApiType, []>;
|
||||
/**
|
||||
* Generic query
|
||||
**/
|
||||
[key: string]: QueryableStorageEntry<ApiType>;
|
||||
};
|
||||
toKusamaXcmRouter: {
|
||||
/**
|
||||
* Bridge that we are using.
|
||||
*
|
||||
* **bridges-v1** assumptions: all outbound messages through this router are using single lane
|
||||
* and to single remote consensus. If there is some other remote consensus that uses the same
|
||||
* bridge hub, the separate pallet instance shall be used, In `v2` we'll have all required
|
||||
* primitives (lane-id aka bridge-id, derived from XCM locations) to support multiple bridges
|
||||
* by the same pallet instance.
|
||||
**/
|
||||
bridge: AugmentedQuery<ApiType, () => Observable<BpXcmBridgeHubRouterBridgeState>, []> & QueryableStorageEntry<ApiType, []>;
|
||||
/**
|
||||
* Generic query
|
||||
**/
|
||||
[key: string]: QueryableStorageEntry<ApiType>;
|
||||
};
|
||||
transactionPayment: {
|
||||
nextFeeMultiplier: AugmentedQuery<ApiType, () => Observable<u128>, []> & QueryableStorageEntry<ApiType, []>;
|
||||
storageVersion: AugmentedQuery<ApiType, () => Observable<PalletTransactionPaymentReleases>, []> & QueryableStorageEntry<ApiType, []>;
|
||||
/**
|
||||
* Generic query
|
||||
**/
|
||||
[key: string]: QueryableStorageEntry<ApiType>;
|
||||
};
|
||||
uniques: {
|
||||
/**
|
||||
* The items held by any given account; set out this way so that items owned by a single
|
||||
* account can be enumerated.
|
||||
**/
|
||||
account: AugmentedQuery<ApiType, (arg1: AccountId32 | string | Uint8Array, arg2: u32 | AnyNumber | Uint8Array, arg3: u32 | AnyNumber | Uint8Array) => Observable<Option<Null>>, [AccountId32, u32, u32]> & QueryableStorageEntry<ApiType, [AccountId32, u32, u32]>;
|
||||
/**
|
||||
* The items in existence and their ownership details.
|
||||
**/
|
||||
asset: AugmentedQuery<ApiType, (arg1: u32 | AnyNumber | Uint8Array, arg2: u32 | AnyNumber | Uint8Array) => Observable<Option<PalletUniquesItemDetails>>, [u32, u32]> & QueryableStorageEntry<ApiType, [u32, u32]>;
|
||||
/**
|
||||
* Attributes of a collection.
|
||||
**/
|
||||
attribute: AugmentedQuery<ApiType, (arg1: u32 | AnyNumber | Uint8Array, arg2: Option<u32> | null | Uint8Array | u32 | AnyNumber, arg3: Bytes | string | Uint8Array) => Observable<Option<ITuple<[Bytes, u128]>>>, [u32, Option<u32>, Bytes]> & QueryableStorageEntry<ApiType, [u32, Option<u32>, Bytes]>;
|
||||
/**
|
||||
* Details of a collection.
|
||||
**/
|
||||
class: AugmentedQuery<ApiType, (arg: u32 | AnyNumber | Uint8Array) => Observable<Option<PalletUniquesCollectionDetails>>, [u32]> & QueryableStorageEntry<ApiType, [u32]>;
|
||||
/**
|
||||
* The collections owned by any given account; set out this way so that collections owned by
|
||||
* a single account can be enumerated.
|
||||
**/
|
||||
classAccount: AugmentedQuery<ApiType, (arg1: AccountId32 | string | Uint8Array, arg2: u32 | AnyNumber | Uint8Array) => Observable<Option<Null>>, [AccountId32, u32]> & QueryableStorageEntry<ApiType, [AccountId32, u32]>;
|
||||
/**
|
||||
* Metadata of a collection.
|
||||
**/
|
||||
classMetadataOf: AugmentedQuery<ApiType, (arg: u32 | AnyNumber | Uint8Array) => Observable<Option<PalletUniquesCollectionMetadata>>, [u32]> & QueryableStorageEntry<ApiType, [u32]>;
|
||||
/**
|
||||
* Keeps track of the number of items a collection might have.
|
||||
**/
|
||||
collectionMaxSupply: AugmentedQuery<ApiType, (arg: u32 | AnyNumber | Uint8Array) => Observable<Option<u32>>, [u32]> & QueryableStorageEntry<ApiType, [u32]>;
|
||||
/**
|
||||
* Metadata of an item.
|
||||
**/
|
||||
instanceMetadataOf: AugmentedQuery<ApiType, (arg1: u32 | AnyNumber | Uint8Array, arg2: u32 | AnyNumber | Uint8Array) => Observable<Option<PalletUniquesItemMetadata>>, [u32, u32]> & QueryableStorageEntry<ApiType, [u32, u32]>;
|
||||
/**
|
||||
* Price of an asset instance.
|
||||
**/
|
||||
itemPriceOf: AugmentedQuery<ApiType, (arg1: u32 | AnyNumber | Uint8Array, arg2: u32 | AnyNumber | Uint8Array) => Observable<Option<ITuple<[u128, Option<AccountId32>]>>>, [u32, u32]> & QueryableStorageEntry<ApiType, [u32, u32]>;
|
||||
/**
|
||||
* The collection, if any, of which an account is willing to take ownership.
|
||||
**/
|
||||
ownershipAcceptance: AugmentedQuery<ApiType, (arg: AccountId32 | string | Uint8Array) => Observable<Option<u32>>, [AccountId32]> & QueryableStorageEntry<ApiType, [AccountId32]>;
|
||||
/**
|
||||
* Generic query
|
||||
**/
|
||||
[key: string]: QueryableStorageEntry<ApiType>;
|
||||
};
|
||||
vesting: {
|
||||
/**
|
||||
* Storage version of the pallet.
|
||||
*
|
||||
* New networks start with latest version, as determined by the genesis build.
|
||||
**/
|
||||
storageVersion: AugmentedQuery<ApiType, () => Observable<PalletVestingReleases>, []> & QueryableStorageEntry<ApiType, []>;
|
||||
/**
|
||||
* Information regarding the vesting of a given account.
|
||||
**/
|
||||
vesting: AugmentedQuery<ApiType, (arg: AccountId32 | string | Uint8Array) => Observable<Option<Vec<PalletVestingVestingInfo>>>, [AccountId32]> & QueryableStorageEntry<ApiType, [AccountId32]>;
|
||||
/**
|
||||
* Generic query
|
||||
**/
|
||||
[key: string]: QueryableStorageEntry<ApiType>;
|
||||
};
|
||||
xcmpQueue: {
|
||||
/**
|
||||
* The factor to multiply the base delivery fee by.
|
||||
**/
|
||||
deliveryFeeFactor: AugmentedQuery<ApiType, (arg: u32 | AnyNumber | Uint8Array) => Observable<u128>, [u32]> & QueryableStorageEntry<ApiType, [u32]>;
|
||||
/**
|
||||
* The suspended inbound XCMP channels. All others are not suspended.
|
||||
*
|
||||
* This is a `StorageValue` instead of a `StorageMap` since we expect multiple reads per block
|
||||
* to different keys with a one byte payload. The access to `BoundedBTreeSet` will be cached
|
||||
* within the block and therefore only included once in the proof size.
|
||||
*
|
||||
* NOTE: The PoV benchmarking cannot know this and will over-estimate, but the actual proof
|
||||
* will be smaller.
|
||||
**/
|
||||
inboundXcmpSuspended: AugmentedQuery<ApiType, () => Observable<BTreeSet<u32>>, []> & QueryableStorageEntry<ApiType, []>;
|
||||
/**
|
||||
* The messages outbound in a given XCMP channel.
|
||||
**/
|
||||
outboundXcmpMessages: AugmentedQuery<ApiType, (arg1: u32 | AnyNumber | Uint8Array, arg2: u16 | AnyNumber | Uint8Array) => Observable<Bytes>, [u32, u16]> & QueryableStorageEntry<ApiType, [u32, u16]>;
|
||||
/**
|
||||
* The non-empty XCMP channels in order of becoming non-empty, and the index of the first
|
||||
* and last outbound message. If the two indices are equal, then it indicates an empty
|
||||
* queue and there must be a non-`Ok` `OutboundStatus`. We assume queues grow no greater
|
||||
* than 65535 items. Queue indices for normal messages begin at one; zero is reserved in
|
||||
* case of the need to send a high-priority signal message this block.
|
||||
* The bool is true if there is a signal message waiting to be sent.
|
||||
**/
|
||||
outboundXcmpStatus: AugmentedQuery<ApiType, () => Observable<Vec<CumulusPalletXcmpQueueOutboundChannelDetails>>, []> & QueryableStorageEntry<ApiType, []>;
|
||||
/**
|
||||
* The configuration which controls the dynamics of the outbound queue.
|
||||
**/
|
||||
queueConfig: AugmentedQuery<ApiType, () => Observable<CumulusPalletXcmpQueueQueueConfigData>, []> & QueryableStorageEntry<ApiType, []>;
|
||||
/**
|
||||
* Whether or not the XCMP queue is suspended from executing incoming XCMs or not.
|
||||
**/
|
||||
queueSuspended: AugmentedQuery<ApiType, () => Observable<bool>, []> & QueryableStorageEntry<ApiType, []>;
|
||||
/**
|
||||
* Any signal messages waiting to be sent.
|
||||
**/
|
||||
signalMessages: AugmentedQuery<ApiType, (arg: u32 | AnyNumber | Uint8Array) => Observable<Bytes>, [u32]> & QueryableStorageEntry<ApiType, [u32]>;
|
||||
/**
|
||||
* Generic query
|
||||
**/
|
||||
[key: string]: QueryableStorageEntry<ApiType>;
|
||||
};
|
||||
} // AugmentedQueries
|
||||
} // declare module
|
||||
@@ -0,0 +1,4 @@
|
||||
// Copyright 2017-2025 @polkadot/api-augment authors & contributors
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
import '@polkadot/types-augment/registry/assetHubPolkadot';
|
||||
@@ -0,0 +1,313 @@
|
||||
// Auto-generated via `yarn polkadot-types-from-chain`, do not edit
|
||||
/* eslint-disable */
|
||||
|
||||
// import type lookup before we augment - in some environments
|
||||
// this is required to allow for ambient/previous definitions
|
||||
import '@polkadot/api-base/types/calls';
|
||||
|
||||
import type { ApiTypes, AugmentedCall, DecoratedCallBase } from '@polkadot/api-base/types';
|
||||
import type { Bytes, Null, Option, Result, Text, Vec, bool, u128, u32 } from '@polkadot/types-codec';
|
||||
import type { AnyNumber, IMethod, ITuple } from '@polkadot/types-codec/types';
|
||||
import type { Extrinsic } from '@polkadot/types/interfaces/extrinsics';
|
||||
import type { OpaqueMetadata } from '@polkadot/types/interfaces/metadata';
|
||||
import type { AccountId32, H256, RuntimeCall, Slot, SlotDuration } from '@polkadot/types/interfaces/runtime';
|
||||
import type { AssetHubPolkadotRuntimeOriginCaller, AssetsCommonRuntimeApiFungiblesAccessError, CumulusPrimitivesCoreCollationInfo, PalletTransactionPaymentFeeDetails, PalletTransactionPaymentRuntimeDispatchInfo, SpConsensusAuraEd25519AppEd25519Public, SpCoreCryptoKeyTypeId, SpInherentsCheckInherentsResult, SpInherentsInherentData, SpRuntimeBlock, SpRuntimeDispatchError, SpRuntimeExtrinsicInclusionMode, SpRuntimeHeader, SpRuntimeTransactionValidityTransactionSource, SpRuntimeTransactionValidityTransactionValidityError, SpRuntimeTransactionValidityValidTransaction, SpVersionRuntimeVersion, SpWeightsWeightV2Weight, StagingXcmV4Location, XcmRuntimeApisConversionsError, XcmRuntimeApisDryRunCallDryRunEffects, XcmRuntimeApisDryRunError, XcmRuntimeApisDryRunXcmDryRunEffects, XcmRuntimeApisFeesError, XcmVersionedAssetId, XcmVersionedAssets, XcmVersionedLocation, XcmVersionedXcm } from '@polkadot/types/lookup';
|
||||
import type { IExtrinsic, Observable } from '@polkadot/types/types';
|
||||
|
||||
export type __AugmentedCall<ApiType extends ApiTypes> = AugmentedCall<ApiType>;
|
||||
export type __DecoratedCallBase<ApiType extends ApiTypes> = DecoratedCallBase<ApiType>;
|
||||
|
||||
declare module '@polkadot/api-base/types/calls' {
|
||||
interface AugmentedCalls<ApiType extends ApiTypes> {
|
||||
/** 0xbc9d89904f5b923f/ */
|
||||
accountNonceApi: {
|
||||
/**
|
||||
* Get current account nonce of given `AccountId`.
|
||||
**/
|
||||
accountNonce: AugmentedCall<ApiType, (account: AccountId32 | string | Uint8Array) => Observable<u32>>;
|
||||
/**
|
||||
* Generic call
|
||||
**/
|
||||
[key: string]: DecoratedCallBase<ApiType>;
|
||||
};
|
||||
/** 0x8a8047a53a8277ec/ */
|
||||
assetConversionApi: {
|
||||
/**
|
||||
* Returns the size of the liquidity pool for the given asset pair.
|
||||
**/
|
||||
getReserves: AugmentedCall<ApiType, (asset1: StagingXcmV4Location | { parents?: any; interior?: any } | string | Uint8Array, asset2: StagingXcmV4Location | { parents?: any; interior?: any } | string | Uint8Array) => Observable<Option<ITuple<[u128, u128]>>>>;
|
||||
/**
|
||||
* Provides a quote for [`Pallet::swap_exact_tokens_for_tokens`].,, Note that the price may have changed by the time the transaction is executed., (Use `amount_out_min` to control slippage.)
|
||||
**/
|
||||
quotePriceExactTokensForTokens: AugmentedCall<ApiType, (asset1: StagingXcmV4Location | { parents?: any; interior?: any } | string | Uint8Array, asset2: StagingXcmV4Location | { parents?: any; interior?: any } | string | Uint8Array, amount: u128 | AnyNumber | Uint8Array, include_fee: bool | boolean | Uint8Array) => Observable<Option<u128>>>;
|
||||
/**
|
||||
* Provides a quote for [`Pallet::swap_tokens_for_exact_tokens`].,, Note that the price may have changed by the time the transaction is executed., (Use `amount_in_max` to control slippage.)
|
||||
**/
|
||||
quotePriceTokensForExactTokens: AugmentedCall<ApiType, (asset1: StagingXcmV4Location | { parents?: any; interior?: any } | string | Uint8Array, asset2: StagingXcmV4Location | { parents?: any; interior?: any } | string | Uint8Array, amount: u128 | AnyNumber | Uint8Array, include_fee: bool | boolean | Uint8Array) => Observable<Option<u128>>>;
|
||||
/**
|
||||
* Generic call
|
||||
**/
|
||||
[key: string]: DecoratedCallBase<ApiType>;
|
||||
};
|
||||
/** 0xdd718d5cc53262d4/ */
|
||||
auraApi: {
|
||||
/**
|
||||
* Return the current set of authorities.
|
||||
**/
|
||||
authorities: AugmentedCall<ApiType, () => Observable<Vec<SpConsensusAuraEd25519AppEd25519Public>>>;
|
||||
/**
|
||||
* Returns the slot duration for Aura.,, Currently, only the value provided by this type at genesis will be used.
|
||||
**/
|
||||
slotDuration: AugmentedCall<ApiType, () => Observable<SlotDuration>>;
|
||||
/**
|
||||
* Generic call
|
||||
**/
|
||||
[key: string]: DecoratedCallBase<ApiType>;
|
||||
};
|
||||
/** 0xd7bdd8a272ca0d65/ */
|
||||
auraUnincludedSegmentApi: {
|
||||
/**
|
||||
* Whether it is legal to extend the chain, assuming the given block is the most, recently included one as-of the relay parent that will be built against, and, the given slot.,, This should be consistent with the logic the runtime uses when validating blocks to, avoid issues.,, When the unincluded segment is empty, i.e. `included_hash == at`, where at is the block, whose state we are querying against, this must always return `true` as long as the slot, is more recent than the included block itself.
|
||||
**/
|
||||
canBuildUpon: AugmentedCall<ApiType, (included_hash: H256 | string | Uint8Array, slot: Slot | AnyNumber | Uint8Array) => Observable<bool>>;
|
||||
/**
|
||||
* Generic call
|
||||
**/
|
||||
[key: string]: DecoratedCallBase<ApiType>;
|
||||
};
|
||||
/** 0x40fe3ad401f8959a/ */
|
||||
blockBuilder: {
|
||||
/**
|
||||
* Apply the given extrinsic.,, Returns an inclusion outcome which specifies if this extrinsic is included in, this block or not.
|
||||
**/
|
||||
applyExtrinsic: AugmentedCall<ApiType, (extrinsic: Extrinsic | IExtrinsic | string | Uint8Array) => Observable<Result<Result<Null, SpRuntimeDispatchError>, SpRuntimeTransactionValidityTransactionValidityError>>>;
|
||||
/**
|
||||
* Check that the inherents are valid. The inherent data will vary from chain to chain.
|
||||
**/
|
||||
checkInherents: AugmentedCall<ApiType, (block: SpRuntimeBlock | { header?: any; extrinsics?: any } | string | Uint8Array, data: SpInherentsInherentData | { data?: any } | string | Uint8Array) => Observable<SpInherentsCheckInherentsResult>>;
|
||||
/**
|
||||
* Finish the current block.
|
||||
**/
|
||||
finalizeBlock: AugmentedCall<ApiType, () => Observable<SpRuntimeHeader>>;
|
||||
/**
|
||||
* Generate inherent extrinsics. The inherent data will vary from chain to chain.
|
||||
**/
|
||||
inherentExtrinsics: AugmentedCall<ApiType, (inherent: SpInherentsInherentData | { data?: any } | string | Uint8Array) => Observable<Vec<Bytes>>>;
|
||||
/**
|
||||
* Generic call
|
||||
**/
|
||||
[key: string]: DecoratedCallBase<ApiType>;
|
||||
};
|
||||
/** 0xea93e3f16f3d6962/ */
|
||||
collectCollationInfo: {
|
||||
/**
|
||||
* Collect information about a collation.,, The given `header` is the header of the built block for that, we are collecting the collation info for.
|
||||
**/
|
||||
collectCollationInfo: AugmentedCall<ApiType, (header: SpRuntimeHeader | { parentHash?: any; number?: any; stateRoot?: any; extrinsicsRoot?: any; digest?: any } | string | Uint8Array) => Observable<CumulusPrimitivesCoreCollationInfo>>;
|
||||
/**
|
||||
* Generic call
|
||||
**/
|
||||
[key: string]: DecoratedCallBase<ApiType>;
|
||||
};
|
||||
/** 0xdf6acb689907609b/ */
|
||||
core: {
|
||||
/**
|
||||
* Execute the given block.
|
||||
**/
|
||||
executeBlock: AugmentedCall<ApiType, (block: SpRuntimeBlock | { header?: any; extrinsics?: any } | string | Uint8Array) => Observable<Null>>;
|
||||
/**
|
||||
* Initialize a block with the given header and return the runtime executive mode.
|
||||
**/
|
||||
initializeBlock: AugmentedCall<ApiType, (header: SpRuntimeHeader | { parentHash?: any; number?: any; stateRoot?: any; extrinsicsRoot?: any; digest?: any } | string | Uint8Array) => Observable<SpRuntimeExtrinsicInclusionMode>>;
|
||||
/**
|
||||
* Returns the version of the runtime.
|
||||
**/
|
||||
version: AugmentedCall<ApiType, () => Observable<SpVersionRuntimeVersion>>;
|
||||
/**
|
||||
* Generic call
|
||||
**/
|
||||
[key: string]: DecoratedCallBase<ApiType>;
|
||||
};
|
||||
/** 0x91b1c8b16328eb92/ */
|
||||
dryRunApi: {
|
||||
/**
|
||||
* Dry run call V2.
|
||||
**/
|
||||
dryRunCall: AugmentedCall<ApiType, (origin: AssetHubPolkadotRuntimeOriginCaller | { system: any } | { PolkadotXcm: any } | { CumulusXcm: any } | string | Uint8Array, call: RuntimeCall | IMethod | string | Uint8Array, result_xcms_version: u32 | AnyNumber | Uint8Array) => Observable<Result<XcmRuntimeApisDryRunCallDryRunEffects, XcmRuntimeApisDryRunError>>>;
|
||||
/**
|
||||
* Dry run XCM program
|
||||
**/
|
||||
dryRunXcm: AugmentedCall<ApiType, (origin_location: XcmVersionedLocation | { V3: any } | { V4: any } | { V5: any } | string | Uint8Array, xcm: XcmVersionedXcm | { V3: any } | { V4: any } | { V5: any } | string | Uint8Array) => Observable<Result<XcmRuntimeApisDryRunXcmDryRunEffects, XcmRuntimeApisDryRunError>>>;
|
||||
/**
|
||||
* Generic call
|
||||
**/
|
||||
[key: string]: DecoratedCallBase<ApiType>;
|
||||
};
|
||||
/** 0xde92b8a0426b9bf6/ */
|
||||
fungiblesApi: {
|
||||
/**
|
||||
* Returns the list of all [`Asset`] that an `AccountId` has.
|
||||
**/
|
||||
queryAccountBalances: AugmentedCall<ApiType, (account: AccountId32 | string | Uint8Array) => Observable<Result<XcmVersionedAssets, AssetsCommonRuntimeApiFungiblesAccessError>>>;
|
||||
/**
|
||||
* Generic call
|
||||
**/
|
||||
[key: string]: DecoratedCallBase<ApiType>;
|
||||
};
|
||||
/** 0xfbc577b9d747efd6/ */
|
||||
genesisBuilder: {
|
||||
/**
|
||||
* Build `RuntimeGenesisConfig` from a JSON blob not using any defaults and store it in the, storage.,, In the case of a FRAME-based runtime, this function deserializes the full, `RuntimeGenesisConfig` from the given JSON blob and puts it into the storage. If the, provided JSON blob is incorrect or incomplete or the deserialization fails, an error, is returned.,, Please note that provided JSON blob must contain all `RuntimeGenesisConfig` fields, no, defaults will be used.
|
||||
**/
|
||||
buildState: AugmentedCall<ApiType, (json: Bytes | string | Uint8Array) => Observable<Result<Null, Text>>>;
|
||||
/**
|
||||
* Returns a JSON blob representation of the built-in `RuntimeGenesisConfig` identified by, `id`.,, If `id` is `None` the function should return JSON blob representation of the default, `RuntimeGenesisConfig` struct of the runtime. Implementation must provide default, `RuntimeGenesisConfig`.,, Otherwise function returns a JSON representation of the built-in, named, `RuntimeGenesisConfig` preset identified by `id`, or `None` if such preset does not, exist. Returned `Vec<u8>` contains bytes of JSON blob (patch) which comprises a list of, (potentially nested) key-value pairs that are intended for customizing the default, runtime genesis config. The patch shall be merged (rfc7386) with the JSON representation, of the default `RuntimeGenesisConfig` to create a comprehensive genesis config that can, be used in `build_state` method.
|
||||
**/
|
||||
getPreset: AugmentedCall<ApiType, (id: Option<Text> | null | Uint8Array | Text | string) => Observable<Option<Bytes>>>;
|
||||
/**
|
||||
* Returns a list of identifiers for available builtin `RuntimeGenesisConfig` presets.,, The presets from the list can be queried with [`GenesisBuilder::get_preset`] method. If, no named presets are provided by the runtime the list is empty.
|
||||
**/
|
||||
presetNames: AugmentedCall<ApiType, () => Observable<Vec<Text>>>;
|
||||
/**
|
||||
* Generic call
|
||||
**/
|
||||
[key: string]: DecoratedCallBase<ApiType>;
|
||||
};
|
||||
/** 0x9ffb505aa738d69c/ */
|
||||
locationToAccountApi: {
|
||||
/**
|
||||
* Converts `Location` to `AccountId`.
|
||||
**/
|
||||
convertLocation: AugmentedCall<ApiType, (location: XcmVersionedLocation | { V3: any } | { V4: any } | { V5: any } | string | Uint8Array) => Observable<Result<AccountId32, XcmRuntimeApisConversionsError>>>;
|
||||
/**
|
||||
* Generic call
|
||||
**/
|
||||
[key: string]: DecoratedCallBase<ApiType>;
|
||||
};
|
||||
/** 0x37e397fc7c91f5e4/ */
|
||||
metadata: {
|
||||
/**
|
||||
* Returns the metadata of a runtime.
|
||||
**/
|
||||
metadata: AugmentedCall<ApiType, () => Observable<OpaqueMetadata>>;
|
||||
/**
|
||||
* Returns the metadata at a given version.,, If the given `version` isn't supported, this will return `None`., Use [`Self::metadata_versions`] to find out about supported metadata version of the runtime.
|
||||
**/
|
||||
metadataAtVersion: AugmentedCall<ApiType, (version: u32 | AnyNumber | Uint8Array) => Observable<Option<OpaqueMetadata>>>;
|
||||
/**
|
||||
* Returns the supported metadata versions.,, This can be used to call `metadata_at_version`.
|
||||
**/
|
||||
metadataVersions: AugmentedCall<ApiType, () => Observable<Vec<u32>>>;
|
||||
/**
|
||||
* Generic call
|
||||
**/
|
||||
[key: string]: DecoratedCallBase<ApiType>;
|
||||
};
|
||||
/** 0xf78b278be53f454c/ */
|
||||
offchainWorkerApi: {
|
||||
/**
|
||||
* Starts the off-chain task for given block header.
|
||||
**/
|
||||
offchainWorker: AugmentedCall<ApiType, (header: SpRuntimeHeader | { parentHash?: any; number?: any; stateRoot?: any; extrinsicsRoot?: any; digest?: any } | string | Uint8Array) => Observable<Null>>;
|
||||
/**
|
||||
* Generic call
|
||||
**/
|
||||
[key: string]: DecoratedCallBase<ApiType>;
|
||||
};
|
||||
/** 0xab3c0572291feb8b/ */
|
||||
sessionKeys: {
|
||||
/**
|
||||
* Decode the given public session keys.,, Returns the list of public raw public keys + key type.
|
||||
**/
|
||||
decodeSessionKeys: AugmentedCall<ApiType, (encoded: Bytes | string | Uint8Array) => Observable<Option<Vec<ITuple<[Bytes, SpCoreCryptoKeyTypeId]>>>>>;
|
||||
/**
|
||||
* Generate a set of session keys with optionally using the given seed., The keys should be stored within the keystore exposed via runtime, externalities.,, The seed needs to be a valid `utf8` string.,, Returns the concatenated SCALE encoded public keys.
|
||||
**/
|
||||
generateSessionKeys: AugmentedCall<ApiType, (seed: Option<Bytes> | null | Uint8Array | Bytes | string) => Observable<Bytes>>;
|
||||
/**
|
||||
* Generic call
|
||||
**/
|
||||
[key: string]: DecoratedCallBase<ApiType>;
|
||||
};
|
||||
/** 0xd2bc9897eed08f15/ */
|
||||
taggedTransactionQueue: {
|
||||
/**
|
||||
* Validate the transaction.,, This method is invoked by the transaction pool to learn details about given transaction., The implementation should make sure to verify the correctness of the transaction, against current state. The given `block_hash` corresponds to the hash of the block, that is used as current state.,, Note that this call may be performed by the pool multiple times and transactions, might be verified in any possible order.
|
||||
**/
|
||||
validateTransaction: AugmentedCall<ApiType, (source: SpRuntimeTransactionValidityTransactionSource | 'InBlock' | 'Local' | 'External' | number | Uint8Array, tx: Extrinsic | IExtrinsic | string | Uint8Array, block_hash: H256 | string | Uint8Array) => Observable<Result<SpRuntimeTransactionValidityValidTransaction, SpRuntimeTransactionValidityTransactionValidityError>>>;
|
||||
/**
|
||||
* Generic call
|
||||
**/
|
||||
[key: string]: DecoratedCallBase<ApiType>;
|
||||
};
|
||||
/** 0x37c8bb1350a9a2a8/ */
|
||||
transactionPaymentApi: {
|
||||
/**
|
||||
*
|
||||
**/
|
||||
queryFeeDetails: AugmentedCall<ApiType, (uxt: Extrinsic | IExtrinsic | string | Uint8Array, len: u32 | AnyNumber | Uint8Array) => Observable<PalletTransactionPaymentFeeDetails>>;
|
||||
/**
|
||||
*
|
||||
**/
|
||||
queryInfo: AugmentedCall<ApiType, (uxt: Extrinsic | IExtrinsic | string | Uint8Array, len: u32 | AnyNumber | Uint8Array) => Observable<PalletTransactionPaymentRuntimeDispatchInfo>>;
|
||||
/**
|
||||
*
|
||||
**/
|
||||
queryLengthToFee: AugmentedCall<ApiType, (length: u32 | AnyNumber | Uint8Array) => Observable<u128>>;
|
||||
/**
|
||||
*
|
||||
**/
|
||||
queryWeightToFee: AugmentedCall<ApiType, (weight: SpWeightsWeightV2Weight | { refTime?: any; proofSize?: any } | string | Uint8Array) => Observable<u128>>;
|
||||
/**
|
||||
* Generic call
|
||||
**/
|
||||
[key: string]: DecoratedCallBase<ApiType>;
|
||||
};
|
||||
/** 0xf3ff14d5ab527059/ */
|
||||
transactionPaymentCallApi: {
|
||||
/**
|
||||
* Query fee details of a given encoded `Call`.
|
||||
**/
|
||||
queryCallFeeDetails: AugmentedCall<ApiType, (call: RuntimeCall | IMethod | string | Uint8Array, len: u32 | AnyNumber | Uint8Array) => Observable<PalletTransactionPaymentFeeDetails>>;
|
||||
/**
|
||||
* Query information of a dispatch class, weight, and fee of a given encoded `Call`.
|
||||
**/
|
||||
queryCallInfo: AugmentedCall<ApiType, (call: RuntimeCall | IMethod | string | Uint8Array, len: u32 | AnyNumber | Uint8Array) => Observable<PalletTransactionPaymentRuntimeDispatchInfo>>;
|
||||
/**
|
||||
* Query the output of the current `LengthToFee` given some input.
|
||||
**/
|
||||
queryLengthToFee: AugmentedCall<ApiType, (length: u32 | AnyNumber | Uint8Array) => Observable<u128>>;
|
||||
/**
|
||||
* Query the output of the current `WeightToFee` given some input.
|
||||
**/
|
||||
queryWeightToFee: AugmentedCall<ApiType, (weight: SpWeightsWeightV2Weight | { refTime?: any; proofSize?: any } | string | Uint8Array) => Observable<u128>>;
|
||||
/**
|
||||
* Generic call
|
||||
**/
|
||||
[key: string]: DecoratedCallBase<ApiType>;
|
||||
};
|
||||
/** 0x6ff52ee858e6c5bd/ */
|
||||
xcmPaymentApi: {
|
||||
/**
|
||||
* Returns a list of acceptable payment assets.,, # Arguments,, * `xcm_version`: Version.
|
||||
**/
|
||||
queryAcceptablePaymentAssets: AugmentedCall<ApiType, (xcm_version: u32 | AnyNumber | Uint8Array) => Observable<Result<Vec<XcmVersionedAssetId>, XcmRuntimeApisFeesError>>>;
|
||||
/**
|
||||
* Get delivery fees for sending a specific `message` to a `destination`., These always come in a specific asset, defined by the chain.,, # Arguments, * `message`: The message that'll be sent, necessary because most delivery fees are based on the, size of the message., * `destination`: The destination to send the message to. Different destinations may use, different senders that charge different fees.
|
||||
**/
|
||||
queryDeliveryFees: AugmentedCall<ApiType, (destination: XcmVersionedLocation | { V3: any } | { V4: any } | { V5: any } | string | Uint8Array, message: XcmVersionedXcm | { V3: any } | { V4: any } | { V5: any } | string | Uint8Array) => Observable<Result<XcmVersionedAssets, XcmRuntimeApisFeesError>>>;
|
||||
/**
|
||||
* Converts a weight into a fee for the specified `AssetId`.,, # Arguments,, * `weight`: convertible `Weight`., * `asset`: `VersionedAssetId`.
|
||||
**/
|
||||
queryWeightToAssetFee: AugmentedCall<ApiType, (weight: SpWeightsWeightV2Weight | { refTime?: any; proofSize?: any } | string | Uint8Array, asset: XcmVersionedAssetId | { V3: any } | { V4: any } | { V5: any } | string | Uint8Array) => Observable<Result<u128, XcmRuntimeApisFeesError>>>;
|
||||
/**
|
||||
* Returns a weight needed to execute a XCM.,, # Arguments,, * `message`: `VersionedXcm`.
|
||||
**/
|
||||
queryXcmWeight: AugmentedCall<ApiType, (message: XcmVersionedXcm | { V3: any } | { V4: any } | { V5: any } | string | Uint8Array) => Observable<Result<SpWeightsWeightV2Weight, XcmRuntimeApisFeesError>>>;
|
||||
/**
|
||||
* Generic call
|
||||
**/
|
||||
[key: string]: DecoratedCallBase<ApiType>;
|
||||
};
|
||||
} // AugmentedCalls
|
||||
} // declare module
|
||||
File diff suppressed because it is too large
Load Diff
@@ -3,4 +3,4 @@
|
||||
|
||||
// Do not edit, auto-generated by @polkadot/dev
|
||||
|
||||
export const packageInfo = { name: '@polkadot/api-augment', path: 'auto', type: 'auto', version: '15.10.2' };
|
||||
export const packageInfo = { name: '@polkadot/api-augment', path: 'auto', type: 'auto', version: '16.2.2' };
|
||||
|
||||
@@ -0,0 +1,22 @@
|
||||
{
|
||||
"extends": "../../tsconfig.base.json",
|
||||
"compilerOptions": {
|
||||
"baseUrl": "..",
|
||||
"outDir": "./build",
|
||||
"rootDir": "./src"
|
||||
},
|
||||
"include": [
|
||||
"**/base.ts",
|
||||
"**/assetHubKusama/*.ts"
|
||||
],
|
||||
"exclude": [
|
||||
"**/assetHubKusama/*.spec.ts"
|
||||
],
|
||||
"references": [
|
||||
{ "path": "../api-base/tsconfig.build.json" },
|
||||
{ "path": "../rpc-augment/tsconfig.build.json" },
|
||||
{ "path": "../types/tsconfig.build.json" },
|
||||
{ "path": "../types-codec/tsconfig.build.json" },
|
||||
{ "path": "../types-augment/tsconfig.build.json" }
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
{
|
||||
"extends": "../../tsconfig.base.json",
|
||||
"compilerOptions": {
|
||||
"baseUrl": "..",
|
||||
"outDir": "./build",
|
||||
"rootDir": "./src"
|
||||
},
|
||||
"include": [
|
||||
"**/base.ts",
|
||||
"**/assetHubKusama/*.ts"
|
||||
],
|
||||
"exclude": [
|
||||
"**/assetHubKusama/*.spec.ts"
|
||||
],
|
||||
"references": [
|
||||
{ "path": "../api-base/tsconfig.build.json" },
|
||||
{ "path": "../rpc-augment/tsconfig.build.json" },
|
||||
{ "path": "../types/tsconfig.build.json" },
|
||||
{ "path": "../types-codec/tsconfig.build.json" },
|
||||
{ "path": "../types-augment/tsconfig.build.json" }
|
||||
]
|
||||
}
|
||||
@@ -8,6 +8,8 @@
|
||||
"exclude": [
|
||||
"**/*.spec.ts",
|
||||
"**/mod.ts",
|
||||
"**/assetHubKusama/*.ts",
|
||||
"**/assetHubPolkadot/*.ts",
|
||||
"**/kusama/*.ts",
|
||||
"**/polkadot/*.ts"
|
||||
],
|
||||
|
||||
@@ -18,12 +18,12 @@
|
||||
"./packageDetect.cjs"
|
||||
],
|
||||
"type": "module",
|
||||
"version": "15.10.2",
|
||||
"version": "16.2.2",
|
||||
"main": "index.js",
|
||||
"dependencies": {
|
||||
"@polkadot/rpc-core": "15.10.2",
|
||||
"@polkadot/types": "15.10.2",
|
||||
"@polkadot/util": "^13.4.4",
|
||||
"@polkadot/rpc-core": "16.2.2",
|
||||
"@polkadot/types": "16.2.2",
|
||||
"@polkadot/util": "^13.5.2",
|
||||
"rxjs": "^7.8.1",
|
||||
"tslib": "^2.8.1"
|
||||
}
|
||||
|
||||
@@ -3,4 +3,4 @@
|
||||
|
||||
// Do not edit, auto-generated by @polkadot/dev
|
||||
|
||||
export const packageInfo = { name: '@polkadot/api-base', path: 'auto', type: 'auto', version: '15.10.2' };
|
||||
export const packageInfo = { name: '@polkadot/api-base', path: 'auto', type: 'auto', version: '16.2.2' };
|
||||
|
||||
@@ -18,22 +18,22 @@
|
||||
"./packageDetect.cjs"
|
||||
],
|
||||
"type": "module",
|
||||
"version": "15.10.2",
|
||||
"version": "16.2.2",
|
||||
"main": "index.js",
|
||||
"dependencies": {
|
||||
"@polkadot/api": "15.10.2",
|
||||
"@polkadot/api-augment": "15.10.2",
|
||||
"@polkadot/types": "15.10.2",
|
||||
"@polkadot/types-codec": "15.10.2",
|
||||
"@polkadot/types-create": "15.10.2",
|
||||
"@polkadot/util": "^13.4.4",
|
||||
"@polkadot/util-crypto": "^13.4.4",
|
||||
"@polkadot/api": "16.2.2",
|
||||
"@polkadot/api-augment": "16.2.2",
|
||||
"@polkadot/types": "16.2.2",
|
||||
"@polkadot/types-codec": "16.2.2",
|
||||
"@polkadot/types-create": "16.2.2",
|
||||
"@polkadot/util": "^13.5.2",
|
||||
"@polkadot/util-crypto": "^13.5.2",
|
||||
"rxjs": "^7.8.1",
|
||||
"tslib": "^2.8.1"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@polkadot/api-augment": "15.10.2",
|
||||
"@polkadot/keyring": "^13.4.4",
|
||||
"@polkadot/types-support": "15.10.2"
|
||||
"@polkadot/api-augment": "16.2.2",
|
||||
"@polkadot/keyring": "^13.5.2",
|
||||
"@polkadot/types-support": "16.2.2"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
import type { Bytes, Vec } from '@polkadot/types';
|
||||
import type { ChainProperties, ContractConstructorSpecLatest, ContractEventParamSpecLatest, ContractMessageParamSpecLatest, ContractMessageSpecLatest, ContractMetadata, ContractMetadataV4, ContractMetadataV5, ContractProjectInfo, ContractTypeSpec, EventRecord } from '@polkadot/types/interfaces';
|
||||
import type { ChainProperties, ContractConstructorSpecLatest, ContractEventParamSpecLatest, ContractMessageParamSpecLatest, ContractMessageSpecLatest, ContractMetadata, ContractMetadataV4, ContractMetadataV5, ContractMetadataV6, ContractProjectInfo, ContractTypeSpec, EventRecord } from '@polkadot/types/interfaces';
|
||||
import type { Codec, Registry, TypeDef } from '@polkadot/types/types';
|
||||
import type { AbiConstructor, AbiEvent, AbiEventParam, AbiMessage, AbiMessageParam, AbiParam, DecodedEvent, DecodedMessage } from '../types.js';
|
||||
|
||||
@@ -19,12 +19,12 @@ interface AbiJson {
|
||||
}
|
||||
|
||||
type EventOf<M> = M extends {spec: { events: Vec<infer E>}} ? E : never
|
||||
export type ContractMetadataSupported = ContractMetadataV4 | ContractMetadataV5;
|
||||
export type ContractMetadataSupported = ContractMetadataV4 | ContractMetadataV5 | ContractMetadataV6;
|
||||
type ContractEventSupported = EventOf<ContractMetadataSupported>;
|
||||
|
||||
const l = logger('Abi');
|
||||
|
||||
const PRIMITIVE_ALWAYS = ['AccountId', 'AccountIndex', 'Address', 'Balance'];
|
||||
const PRIMITIVE_ALWAYS = ['AccountId', 'AccountId20', 'AccountIndex', 'Address', 'Balance'];
|
||||
|
||||
function findMessage <T extends AbiMessage> (list: T[], messageOrId: T | string | number): T {
|
||||
const message = isNumber(messageOrId)
|
||||
@@ -66,9 +66,28 @@ function getMetadata (registry: Registry, json: AbiJson): ContractMetadataSuppor
|
||||
return upgradedMetadata;
|
||||
}
|
||||
|
||||
function parseJson (json: Record<string, unknown>, chainProperties?: ChainProperties): [Record<string, unknown>, Registry, ContractMetadataSupported, ContractProjectInfo] {
|
||||
function isRevive (json: Record<string, unknown>): boolean {
|
||||
const source = json['source'];
|
||||
const version = json['version'];
|
||||
|
||||
const hasContractBinary =
|
||||
typeof source === 'object' &&
|
||||
source !== null &&
|
||||
'contract_binary' in source;
|
||||
|
||||
const hasVersion =
|
||||
typeof version === 'number' && version >= 6;
|
||||
|
||||
return hasContractBinary || hasVersion;
|
||||
}
|
||||
|
||||
function parseJson (json: Record<string, unknown>, chainProperties?: ChainProperties): [Record<string, unknown>, Registry, ContractMetadataSupported, ContractProjectInfo, boolean] {
|
||||
const registry = new TypeRegistry();
|
||||
const info = registry.createType('ContractProjectInfo', json) as unknown as ContractProjectInfo;
|
||||
|
||||
const revive = isRevive(json);
|
||||
const typeName = revive ? 'ContractReviveProjectInfo' : 'ContractProjectInfo';
|
||||
|
||||
const info = registry.createType(typeName, json) as unknown as ContractProjectInfo;
|
||||
const metadata = getMetadata(registry, json as unknown as AbiJson);
|
||||
const lookup = registry.createType('PortableRegistry', { types: metadata.types }, true);
|
||||
|
||||
@@ -84,7 +103,7 @@ function parseJson (json: Record<string, unknown>, chainProperties?: ChainProper
|
||||
lookup.getTypeDef(id)
|
||||
);
|
||||
|
||||
return [json, registry, metadata, info];
|
||||
return [json, registry, metadata, info, revive];
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -112,9 +131,10 @@ export class Abi {
|
||||
readonly metadata: ContractMetadataSupported;
|
||||
readonly registry: Registry;
|
||||
readonly environment = new Map<string, TypeDef | Codec>();
|
||||
readonly isRevive: boolean;
|
||||
|
||||
constructor (abiJson: Record<string, unknown> | string, chainProperties?: ChainProperties) {
|
||||
[this.json, this.registry, this.metadata, this.info] = parseJson(
|
||||
[this.json, this.registry, this.metadata, this.info, this.isRevive] = parseJson(
|
||||
isString(abiJson)
|
||||
? JSON.parse(abiJson) as Record<string, unknown>
|
||||
: abiJson,
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
import { TypeRegistry } from '@polkadot/types';
|
||||
|
||||
import abis from '../test/contracts/index.js';
|
||||
import { v0ToLatestCompatible, v1ToLatestCompatible, v2ToLatestCompatible, v3ToLatestCompatible, v4ToLatestCompatible, v5ToLatestCompatible } from './toLatestCompatible.js';
|
||||
import { v0ToLatestCompatible, v1ToLatestCompatible, v2ToLatestCompatible, v3ToLatestCompatible, v4ToLatestCompatible, v5ToLatestCompatible, v6ToLatestCompatible } from './toLatestCompatible.js';
|
||||
|
||||
describe('v0ToLatestCompatible', (): void => {
|
||||
const registry = new TypeRegistry();
|
||||
@@ -191,3 +191,29 @@ describe('v5ToLatestCompatible', (): void => {
|
||||
expect(latest.version.toString()).toEqual('5');
|
||||
});
|
||||
});
|
||||
|
||||
describe('v6ToLatestCompatible', (): void => {
|
||||
const registry = new TypeRegistry();
|
||||
const contract = registry.createType('ContractMetadata', { V6: abis['ink_v6_erc20Metadata'] });
|
||||
const latest = v6ToLatestCompatible(registry, contract.asV6);
|
||||
|
||||
it('has the correct messages', (): void => {
|
||||
expect(
|
||||
latest.spec.messages.map(({ label }) => label.toString())
|
||||
).toEqual(['total_supply', 'balance_of', 'allowance', 'transfer', 'approve', 'transfer_from']);
|
||||
});
|
||||
|
||||
it('has H160 as the type of balance_of argument', (): void => {
|
||||
const arg = latest.spec.messages.find(
|
||||
(m) => m.label.toString() === 'balance_of'
|
||||
)?.args[0];
|
||||
|
||||
const name = arg?.type.displayName?.[0]?.toString();
|
||||
|
||||
expect(name).toBe('H160');
|
||||
});
|
||||
|
||||
it('has the latest compatible version number', (): void => {
|
||||
expect(latest.version.toString()).toEqual('6');
|
||||
});
|
||||
});
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
// Copyright 2017-2025 @polkadot/api-contract authors & contributors
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
import type { ContractMetadataV4, ContractMetadataV5 } from '@polkadot/types/interfaces';
|
||||
import type { ContractMetadataV4, ContractMetadataV5, ContractMetadataV6 } from '@polkadot/types/interfaces';
|
||||
import type { Registry } from '@polkadot/types/types';
|
||||
import type { ContractMetadataSupported } from './index.js';
|
||||
|
||||
@@ -12,7 +12,7 @@ import { v3ToV4 } from './toV4.js';
|
||||
|
||||
// The versions where an enum is used, aka V0 is missing
|
||||
// (Order from newest, i.e. we expect more on newest vs oldest)
|
||||
export const enumVersions = ['V5', 'V4', 'V3', 'V2', 'V1'] as const;
|
||||
export const enumVersions = ['V6', 'V5', 'V4', 'V3', 'V2', 'V1'] as const;
|
||||
|
||||
type Versions = typeof enumVersions[number] | 'V0';
|
||||
|
||||
@@ -24,6 +24,10 @@ function createConverter <I, O> (next: (registry: Registry, input: O) => Contrac
|
||||
next(registry, step(registry, input));
|
||||
}
|
||||
|
||||
export function v6ToLatestCompatible (_registry: Registry, v6: ContractMetadataV6): ContractMetadataV6 {
|
||||
return v6;
|
||||
}
|
||||
|
||||
export function v5ToLatestCompatible (_registry: Registry, v5: ContractMetadataV5): ContractMetadataV5 {
|
||||
return v5;
|
||||
}
|
||||
@@ -38,6 +42,7 @@ export const v1ToLatestCompatible = /*#__PURE__*/ createConverter(v2ToLatestComp
|
||||
export const v0ToLatestCompatible = /*#__PURE__*/ createConverter(v1ToLatestCompatible, v0ToV1);
|
||||
|
||||
export const convertVersions: [Versions, Converter][] = [
|
||||
['V6', v6ToLatestCompatible],
|
||||
['V5', v5ToLatestCompatible],
|
||||
['V4', v4ToLatestCompatible],
|
||||
['V3', v3ToLatestCompatible],
|
||||
|
||||
@@ -16,14 +16,11 @@ export abstract class Base<ApiType extends ApiTypes> {
|
||||
|
||||
protected readonly _decorateMethod: DecorateMethod<ApiType>;
|
||||
protected readonly _isWeightV1: boolean;
|
||||
protected readonly _isRevive: boolean;
|
||||
|
||||
constructor (api: ApiBase<ApiType>, abi: string | Record<string, unknown> | Abi, decorateMethod: DecorateMethod<ApiType>) {
|
||||
if (!api || !api.isConnected || !api.tx) {
|
||||
throw new Error('Your API has not been initialized correctly and is not connected to a chain');
|
||||
} else if (!api.tx.contracts || !isFunction(api.tx.contracts.instantiateWithCode) || api.tx.contracts.instantiateWithCode.meta.args.length !== 6) {
|
||||
throw new Error('The runtime does not expose api.tx.contracts.instantiateWithCode with storageDepositLimit');
|
||||
} else if (!api.call.contractsApi || !isFunction(api.call.contractsApi.call)) {
|
||||
throw new Error('Your runtime does not expose the api.call.contractsApi.call runtime interfaces');
|
||||
}
|
||||
|
||||
this.abi = abi instanceof Abi
|
||||
@@ -32,6 +29,21 @@ export abstract class Base<ApiType extends ApiTypes> {
|
||||
this.api = api;
|
||||
this._decorateMethod = decorateMethod;
|
||||
this._isWeightV1 = !api.registry.createType<WeightV2>('Weight').proofSize;
|
||||
this._isRevive = this.abi.isRevive;
|
||||
|
||||
if (this._isRevive) {
|
||||
if (!api.tx.revive || !isFunction(api.tx.revive.instantiateWithCode) || api.tx.revive.instantiateWithCode.meta.args.length !== 6) {
|
||||
throw new Error('The runtime does not expose api.tx.revive.instantiateWithCode with storageDepositLimit');
|
||||
} else if (!api.call.reviveApi || !isFunction(api.call.reviveApi.call)) {
|
||||
throw new Error('Your runtime does not expose the api.call.reviveApi.call runtime interfaces');
|
||||
}
|
||||
} else {
|
||||
if (!api.tx.contracts || !isFunction(api.tx.contracts.instantiateWithCode) || api.tx.contracts.instantiateWithCode.meta.args.length !== 6) {
|
||||
throw new Error('The runtime does not expose api.tx.contracts.instantiateWithCode with storageDepositLimit');
|
||||
} else if (!api.call.contractsApi || !isFunction(api.call.contractsApi.call)) {
|
||||
throw new Error('Your runtime does not expose the api.call.contractsApi.call runtime interfaces');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public get registry (): Registry {
|
||||
|
||||
@@ -55,7 +55,11 @@ export class Blueprint<ApiType extends ApiTypes> extends Base<ApiType> {
|
||||
}
|
||||
|
||||
#deploy = (constructorOrId: AbiConstructor | string | number, { gasLimit = BN_ZERO, salt, storageDepositLimit = null, value = BN_ZERO }: BlueprintOptions, params: unknown[]): SubmittableExtrinsic<ApiType, BlueprintSubmittableResult<ApiType>> => {
|
||||
return this.api.tx.contracts.instantiate(
|
||||
const palletTx = this._isRevive
|
||||
? this.api.tx.revive
|
||||
: this.api.tx.contracts;
|
||||
|
||||
return palletTx.instantiate(
|
||||
value,
|
||||
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
||||
// @ts-ignore jiggle v1 weights, metadata points to latest
|
||||
@@ -67,9 +71,23 @@ export class Blueprint<ApiType extends ApiTypes> extends Base<ApiType> {
|
||||
this.abi.findConstructor(constructorOrId).toU8a(params),
|
||||
encodeSalt(salt)
|
||||
).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)
|
||||
))
|
||||
new BlueprintSubmittableResult(result,
|
||||
this._isRevive
|
||||
? (
|
||||
(result.status.isInBlock || result.status.isFinalized)
|
||||
? new Contract<ApiType>(
|
||||
this.api,
|
||||
this.abi,
|
||||
// your fixed address for revive deployments
|
||||
this.registry.createType('AccountId', '0x'),
|
||||
this._decorateMethod
|
||||
)
|
||||
: undefined
|
||||
)
|
||||
: applyOnEvent(result, ['Instantiated'], ([record]: EventRecord[]) =>
|
||||
new Contract<ApiType>(this.api, this.abi, record.event.data[1] as AccountId, this._decorateMethod)
|
||||
)
|
||||
)
|
||||
);
|
||||
};
|
||||
}
|
||||
|
||||
@@ -10,8 +10,9 @@ import { toPromiseMethod } from '@polkadot/api';
|
||||
import v0contractFlipper from '../test/contracts/ink/v0/flipper.contract.json' assert { type: 'json' };
|
||||
import v0abiFlipper from '../test/contracts/ink/v0/flipper.json' assert { type: 'json' };
|
||||
import v1contractFlipper from '../test/contracts/ink/v1/flipper.contract.json' assert { type: 'json' };
|
||||
import v6contractErc20 from '../test/contracts/ink/v6/erc20.contract.json' assert { type: 'json' };
|
||||
import { Code } from './Code.js';
|
||||
import { mockApi } from './mock.js';
|
||||
import { mockApi, mockReviveApi } from './mock.js';
|
||||
|
||||
const v0wasmFlipper = fs.readFileSync(new URL('../test/contracts/ink/v0/flipper.wasm', import.meta.url), 'utf-8');
|
||||
|
||||
@@ -33,4 +34,14 @@ describe('Code', (): void => {
|
||||
() => new Code(mockApi, v1contractFlipper as Record<string, unknown>, null, toPromiseMethod)
|
||||
).not.toThrow();
|
||||
});
|
||||
|
||||
it('can construct a revive compatible contract (v6)', (): void => {
|
||||
expect(
|
||||
() => new Code(mockApi, v6contractErc20 as Record<string, unknown>, null, toPromiseMethod)
|
||||
).toThrow('The runtime does not expose api.tx.revive.instantiateWithCode with storageDepositLimit');
|
||||
|
||||
expect(
|
||||
() => new Code(mockReviveApi, v6contractErc20 as Record<string, unknown>, null, toPromiseMethod)
|
||||
).not.toThrow();
|
||||
});
|
||||
});
|
||||
|
||||
@@ -68,7 +68,30 @@ export class Code<ApiType extends ApiTypes> extends Base<ApiType> {
|
||||
}
|
||||
|
||||
#instantiate = (constructorOrId: AbiConstructor | string | number, { gasLimit = BN_ZERO, salt, storageDepositLimit = null, value = BN_ZERO }: BlueprintOptions, params: unknown[]): SubmittableExtrinsic<ApiType, CodeSubmittableResult<ApiType>> => {
|
||||
return this.api.tx.contracts.instantiateWithCode(
|
||||
const palletTx = this._isRevive ? this.api.tx.revive : this.api.tx.contracts;
|
||||
|
||||
if (this._isRevive) {
|
||||
return palletTx.instantiateWithCode(
|
||||
value,
|
||||
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
||||
// @ts-ignore jiggle v1 weights, metadata points to latest
|
||||
this._isWeightV1
|
||||
? convertWeight(gasLimit).v1Weight
|
||||
: convertWeight(gasLimit).v2Weight,
|
||||
storageDepositLimit,
|
||||
compactAddLength(this.code),
|
||||
this.abi.findConstructor(constructorOrId).toU8a(params),
|
||||
encodeSalt(salt)
|
||||
).withResultTransform((result: ISubmittableResult) =>
|
||||
new CodeSubmittableResult(
|
||||
result,
|
||||
new Blueprint<ApiType>(this.api, this.abi, this.abi.info.source.hash, this._decorateMethod),
|
||||
new Contract<ApiType>(this.api, this.abi, '0x', this._decorateMethod)
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
return palletTx.instantiateWithCode(
|
||||
value,
|
||||
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
||||
// @ts-ignore jiggle v1 weights, metadata points to latest
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
import type { ApiBase } from '@polkadot/api/base';
|
||||
import type { SubmittableExtrinsic } from '@polkadot/api/submittable/types';
|
||||
import type { ApiTypes, DecorateMethod } from '@polkadot/api/types';
|
||||
import type { AccountId, ContractExecResult, EventRecord, Weight, WeightV2 } from '@polkadot/types/interfaces';
|
||||
import type { AccountId, AccountId20, ContractExecResult, EventRecord, Weight, WeightV2 } from '@polkadot/types/interfaces';
|
||||
import type { ISubmittableResult } from '@polkadot/types/types';
|
||||
import type { Abi } from '../Abi/index.js';
|
||||
import type { AbiMessage, ContractCallOutcome, ContractOptions, DecodedEvent, WeightAll } from '../types.js';
|
||||
@@ -52,15 +52,15 @@ export class Contract<ApiType extends ApiTypes> extends Base<ApiType> {
|
||||
/**
|
||||
* @description The on-chain address for this contract
|
||||
*/
|
||||
readonly address: AccountId;
|
||||
readonly address: AccountId | AccountId20;
|
||||
|
||||
readonly #query: MapMessageQuery<ApiType> = {};
|
||||
readonly #tx: MapMessageTx<ApiType> = {};
|
||||
|
||||
constructor (api: ApiBase<ApiType>, abi: string | Record<string, unknown> | Abi, address: string | AccountId, decorateMethod: DecorateMethod<ApiType>) {
|
||||
constructor (api: ApiBase<ApiType>, abi: string | Record<string, unknown> | Abi, address: string | AccountId | AccountId20, decorateMethod: DecorateMethod<ApiType>) {
|
||||
super(api, abi, decorateMethod);
|
||||
|
||||
this.address = this.registry.createType('AccountId', address);
|
||||
this.address = this.registry.createType(this._isRevive ? 'AccountId20' : 'AccountId', address);
|
||||
|
||||
this.abi.messages.forEach((m): void => {
|
||||
if (isUndefined(this.#tx[m.method])) {
|
||||
@@ -100,7 +100,9 @@ export class Contract<ApiType extends ApiTypes> extends Base<ApiType> {
|
||||
};
|
||||
|
||||
#exec = (messageOrId: AbiMessage | string | number, { gasLimit = BN_ZERO, storageDepositLimit = null, value = BN_ZERO }: ContractOptions, params: unknown[]): SubmittableExtrinsic<ApiType> => {
|
||||
return this.api.tx.contracts.call(
|
||||
const palletTx = this._isRevive ? this.api.tx.revive : this.api.tx.contracts;
|
||||
|
||||
return palletTx.call(
|
||||
this.address,
|
||||
value,
|
||||
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
||||
@@ -134,7 +136,9 @@ export class Contract<ApiType extends ApiTypes> extends Base<ApiType> {
|
||||
return {
|
||||
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
|
||||
send: this._decorateMethod((origin: string | AccountId | Uint8Array) =>
|
||||
this.api.rx.call.contractsApi.call<ContractExecResult>(
|
||||
(this._isRevive
|
||||
? this.api.rx.call.reviveApi.call
|
||||
: this.api.rx.call.contractsApi.call)<ContractExecResult>(
|
||||
origin,
|
||||
this.address,
|
||||
value,
|
||||
|
||||
@@ -29,3 +29,20 @@ export const mockApi = {
|
||||
}
|
||||
}
|
||||
} as unknown as ApiBase<'promise'>;
|
||||
|
||||
export const mockReviveApi = {
|
||||
call: {
|
||||
reviveApi: {
|
||||
call: (): never => {
|
||||
throw new Error('mock');
|
||||
}
|
||||
}
|
||||
},
|
||||
isConnected: true,
|
||||
registry,
|
||||
tx: {
|
||||
revive: {
|
||||
instantiateWithCode
|
||||
}
|
||||
}
|
||||
} as unknown as ApiBase<'promise'>;
|
||||
|
||||
@@ -3,4 +3,4 @@
|
||||
|
||||
// Do not edit, auto-generated by @polkadot/dev
|
||||
|
||||
export const packageInfo = { name: '@polkadot/api-contract', path: 'auto', type: 'auto', version: '15.10.2' };
|
||||
export const packageInfo = { name: '@polkadot/api-contract', path: 'auto', type: 'auto', version: '16.2.2' };
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
import type { ApiPromise } from '@polkadot/api';
|
||||
import type { AccountId, Hash } from '@polkadot/types/interfaces';
|
||||
import type { AccountId, AccountId20, Hash } from '@polkadot/types/interfaces';
|
||||
import type { Abi } from '../Abi/index.js';
|
||||
|
||||
import { toPromiseMethod } from '@polkadot/api';
|
||||
@@ -22,7 +22,7 @@ export class CodePromise extends Code<'promise'> {
|
||||
}
|
||||
|
||||
export class ContractPromise extends Contract<'promise'> {
|
||||
constructor (api: ApiPromise, abi: string | Record<string, unknown> | Abi, address: string | AccountId) {
|
||||
constructor (api: ApiPromise, abi: string | Record<string, unknown> | Abi, address: string | AccountId | AccountId20) {
|
||||
super(api, abi, address, toPromiseMethod);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,418 @@
|
||||
[
|
||||
{
|
||||
"info": "Plain",
|
||||
"lookupIndex": 0,
|
||||
"type": "U256",
|
||||
"docs": [],
|
||||
"namespace": "primitive_types::U256",
|
||||
"lookupNameRoot": "PrimitiveTypesU256"
|
||||
},
|
||||
{
|
||||
"info": "VecFixed",
|
||||
"lookupIndex": 1,
|
||||
"type": "[u64;4]",
|
||||
"docs": [],
|
||||
"namespace": "",
|
||||
"length": 4,
|
||||
"sub": {
|
||||
"info": "Plain",
|
||||
"lookupIndex": 2,
|
||||
"type": "u64",
|
||||
"docs": [],
|
||||
"namespace": ""
|
||||
}
|
||||
},
|
||||
{
|
||||
"info": "Plain",
|
||||
"lookupIndex": 2,
|
||||
"type": "u64",
|
||||
"docs": [],
|
||||
"namespace": ""
|
||||
},
|
||||
{
|
||||
"info": "Null",
|
||||
"lookupIndex": 3,
|
||||
"type": "Null",
|
||||
"docs": [],
|
||||
"namespace": "ink_storage::lazy::mapping::Mapping"
|
||||
},
|
||||
{
|
||||
"info": "Plain",
|
||||
"lookupIndex": 4,
|
||||
"type": "H160",
|
||||
"docs": [],
|
||||
"namespace": "primitive_types::H160",
|
||||
"lookupNameRoot": "PrimitiveTypesH160"
|
||||
},
|
||||
{
|
||||
"info": "VecFixed",
|
||||
"lookupIndex": 5,
|
||||
"type": "[u8;20]",
|
||||
"docs": [],
|
||||
"namespace": "",
|
||||
"length": 20,
|
||||
"sub": {
|
||||
"info": "Plain",
|
||||
"lookupIndex": 6,
|
||||
"type": "u8",
|
||||
"docs": [],
|
||||
"namespace": ""
|
||||
}
|
||||
},
|
||||
{
|
||||
"info": "Plain",
|
||||
"lookupIndex": 6,
|
||||
"type": "u8",
|
||||
"docs": [],
|
||||
"namespace": ""
|
||||
},
|
||||
{
|
||||
"info": "Null",
|
||||
"lookupIndex": 7,
|
||||
"type": "Null",
|
||||
"docs": [],
|
||||
"namespace": "ink_storage_traits::impls::ResolverKey"
|
||||
},
|
||||
{
|
||||
"info": "Null",
|
||||
"lookupIndex": 8,
|
||||
"lookupName": "InkStorageTraitsImplsAutoKey",
|
||||
"type": "Null",
|
||||
"docs": [],
|
||||
"namespace": "ink_storage_traits::impls::AutoKey"
|
||||
},
|
||||
{
|
||||
"info": "Null",
|
||||
"lookupIndex": 9,
|
||||
"lookupName": "InkStorageTraitsImplsManualKey",
|
||||
"type": "Null",
|
||||
"docs": [],
|
||||
"namespace": "ink_storage_traits::impls::ManualKey"
|
||||
},
|
||||
{
|
||||
"info": "Null",
|
||||
"lookupIndex": 10,
|
||||
"type": "Null",
|
||||
"docs": [],
|
||||
"namespace": ""
|
||||
},
|
||||
{
|
||||
"info": "Null",
|
||||
"lookupIndex": 11,
|
||||
"lookupName": "InkStorageLazyMapping",
|
||||
"type": "Null",
|
||||
"docs": [],
|
||||
"namespace": "ink_storage::lazy::mapping::Mapping"
|
||||
},
|
||||
{
|
||||
"info": "Tuple",
|
||||
"lookupIndex": 12,
|
||||
"type": "(H160,H160)",
|
||||
"docs": [],
|
||||
"namespace": "",
|
||||
"sub": [
|
||||
{
|
||||
"info": "Plain",
|
||||
"lookupIndex": 4,
|
||||
"type": "H160",
|
||||
"docs": [],
|
||||
"namespace": "primitive_types::H160",
|
||||
"lookupNameRoot": "PrimitiveTypesH160"
|
||||
},
|
||||
{
|
||||
"info": "Plain",
|
||||
"lookupIndex": 4,
|
||||
"type": "H160",
|
||||
"docs": [],
|
||||
"namespace": "primitive_types::H160",
|
||||
"lookupNameRoot": "PrimitiveTypesH160"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"info": "Null",
|
||||
"lookupIndex": 13,
|
||||
"lookupName": "InkStorageTraitsImplsResolverKey",
|
||||
"type": "Null",
|
||||
"docs": [],
|
||||
"namespace": "ink_storage_traits::impls::ResolverKey"
|
||||
},
|
||||
{
|
||||
"info": "Null",
|
||||
"lookupIndex": 14,
|
||||
"lookupName": "InkStorageTraitsImplsManualKey",
|
||||
"type": "Null",
|
||||
"docs": [],
|
||||
"namespace": "ink_storage_traits::impls::ManualKey"
|
||||
},
|
||||
{
|
||||
"info": "Struct",
|
||||
"lookupIndex": 15,
|
||||
"lookupName": "Erc20",
|
||||
"type": "{\"totalSupply\":\"U256\",\"balances\":\"Null\",\"allowances\":\"InkStorageLazyMapping\"}",
|
||||
"docs": [],
|
||||
"namespace": "erc20::erc20::Erc20",
|
||||
"sub": [
|
||||
{
|
||||
"docs": [],
|
||||
"name": "totalSupply",
|
||||
"info": "Plain",
|
||||
"lookupIndex": 0,
|
||||
"type": "U256",
|
||||
"namespace": "primitive_types::U256",
|
||||
"lookupNameRoot": "PrimitiveTypesU256",
|
||||
"typeName": ""
|
||||
},
|
||||
{
|
||||
"docs": [],
|
||||
"name": "balances",
|
||||
"info": "Null",
|
||||
"lookupIndex": 3,
|
||||
"type": "Null",
|
||||
"namespace": "ink_storage::lazy::mapping::Mapping",
|
||||
"typeName": ""
|
||||
},
|
||||
{
|
||||
"docs": [],
|
||||
"name": "allowances",
|
||||
"info": "Null",
|
||||
"lookupIndex": 11,
|
||||
"lookupName": "InkStorageLazyMapping",
|
||||
"type": "Null",
|
||||
"namespace": "ink_storage::lazy::mapping::Mapping",
|
||||
"typeName": ""
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"info": "Result",
|
||||
"lookupIndex": 16,
|
||||
"type": "Result<Null, InkPrimitivesLangError>",
|
||||
"docs": [],
|
||||
"namespace": "Result",
|
||||
"sub": [
|
||||
{
|
||||
"name": "Ok",
|
||||
"info": "Null",
|
||||
"lookupIndex": 10,
|
||||
"type": "Null",
|
||||
"docs": [],
|
||||
"namespace": ""
|
||||
},
|
||||
{
|
||||
"name": "Error",
|
||||
"docs": [],
|
||||
"info": "Si",
|
||||
"lookupIndex": 17,
|
||||
"lookupName": "InkPrimitivesLangError",
|
||||
"type": "Lookup17"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"info": "Enum",
|
||||
"lookupIndex": 17,
|
||||
"lookupName": "InkPrimitivesLangError",
|
||||
"type": "{\"_enum\":[\"__Unused0\",\"CouldNotReadInput\"]}",
|
||||
"docs": [],
|
||||
"namespace": "ink_primitives::LangError",
|
||||
"sub": [
|
||||
{
|
||||
"index": 0,
|
||||
"info": "Null",
|
||||
"name": "__Unused0",
|
||||
"type": "Null"
|
||||
},
|
||||
{
|
||||
"info": "Null",
|
||||
"type": "Null",
|
||||
"index": 1,
|
||||
"name": "CouldNotReadInput"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"info": "Result",
|
||||
"lookupIndex": 18,
|
||||
"type": "Result<U256, InkPrimitivesLangError>",
|
||||
"docs": [],
|
||||
"namespace": "Result",
|
||||
"sub": [
|
||||
{
|
||||
"name": "Ok",
|
||||
"info": "Plain",
|
||||
"lookupIndex": 0,
|
||||
"type": "U256",
|
||||
"docs": [],
|
||||
"namespace": "primitive_types::U256",
|
||||
"lookupNameRoot": "PrimitiveTypesU256"
|
||||
},
|
||||
{
|
||||
"name": "Error",
|
||||
"docs": [],
|
||||
"info": "Si",
|
||||
"lookupIndex": 17,
|
||||
"lookupName": "InkPrimitivesLangError",
|
||||
"type": "Lookup17"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"info": "Result",
|
||||
"lookupIndex": 19,
|
||||
"type": "Result<Result<Null, Erc20Error>, InkPrimitivesLangError>",
|
||||
"docs": [],
|
||||
"namespace": "Result",
|
||||
"sub": [
|
||||
{
|
||||
"name": "Ok",
|
||||
"info": "Result",
|
||||
"lookupIndex": 20,
|
||||
"type": "Result<Null, Erc20Error>",
|
||||
"docs": [],
|
||||
"namespace": "Result",
|
||||
"sub": [
|
||||
{
|
||||
"name": "Ok",
|
||||
"info": "Null",
|
||||
"lookupIndex": 10,
|
||||
"type": "Null",
|
||||
"docs": [],
|
||||
"namespace": ""
|
||||
},
|
||||
{
|
||||
"name": "Error",
|
||||
"docs": [],
|
||||
"info": "Si",
|
||||
"lookupIndex": 21,
|
||||
"lookupName": "Erc20Error",
|
||||
"type": "Lookup21"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "Error",
|
||||
"docs": [],
|
||||
"info": "Si",
|
||||
"lookupIndex": 17,
|
||||
"lookupName": "InkPrimitivesLangError",
|
||||
"type": "Lookup17"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"info": "Result",
|
||||
"lookupIndex": 20,
|
||||
"type": "Result<Null, Erc20Error>",
|
||||
"docs": [],
|
||||
"namespace": "Result",
|
||||
"sub": [
|
||||
{
|
||||
"name": "Ok",
|
||||
"info": "Null",
|
||||
"lookupIndex": 10,
|
||||
"type": "Null",
|
||||
"docs": [],
|
||||
"namespace": ""
|
||||
},
|
||||
{
|
||||
"name": "Error",
|
||||
"docs": [],
|
||||
"info": "Si",
|
||||
"lookupIndex": 21,
|
||||
"lookupName": "Erc20Error",
|
||||
"type": "Lookup21"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"info": "Enum",
|
||||
"lookupIndex": 21,
|
||||
"lookupName": "Erc20Error",
|
||||
"type": "{\"_enum\":[\"InsufficientBalance\",\"InsufficientAllowance\"]}",
|
||||
"docs": [],
|
||||
"namespace": "erc20::erc20::Error",
|
||||
"sub": [
|
||||
{
|
||||
"info": "Null",
|
||||
"type": "Null",
|
||||
"index": 0,
|
||||
"name": "InsufficientBalance"
|
||||
},
|
||||
{
|
||||
"info": "Null",
|
||||
"type": "Null",
|
||||
"index": 1,
|
||||
"name": "InsufficientAllowance"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"info": "Option",
|
||||
"lookupIndex": 22,
|
||||
"type": "Option<H160>",
|
||||
"docs": [],
|
||||
"namespace": "Option",
|
||||
"sub": {
|
||||
"info": "Plain",
|
||||
"lookupIndex": 4,
|
||||
"type": "H160",
|
||||
"docs": [],
|
||||
"namespace": "primitive_types::H160",
|
||||
"lookupNameRoot": "PrimitiveTypesH160"
|
||||
}
|
||||
},
|
||||
{
|
||||
"info": "Plain",
|
||||
"lookupIndex": 23,
|
||||
"type": "AccountId",
|
||||
"docs": [],
|
||||
"namespace": "ink_primitives::types::AccountId",
|
||||
"lookupNameRoot": "InkPrimitivesAccountId"
|
||||
},
|
||||
{
|
||||
"info": "VecFixed",
|
||||
"lookupIndex": 24,
|
||||
"type": "[u8;32]",
|
||||
"docs": [],
|
||||
"namespace": "",
|
||||
"length": 32,
|
||||
"sub": {
|
||||
"info": "Plain",
|
||||
"lookupIndex": 6,
|
||||
"type": "u8",
|
||||
"docs": [],
|
||||
"namespace": ""
|
||||
}
|
||||
},
|
||||
{
|
||||
"info": "Plain",
|
||||
"lookupIndex": 25,
|
||||
"type": "u128",
|
||||
"docs": [],
|
||||
"namespace": ""
|
||||
},
|
||||
{
|
||||
"info": "Plain",
|
||||
"lookupIndex": 26,
|
||||
"type": "Hash",
|
||||
"docs": [],
|
||||
"namespace": "ink_primitives::types::Hash",
|
||||
"lookupNameRoot": "InkPrimitivesHash"
|
||||
},
|
||||
{
|
||||
"info": "Plain",
|
||||
"lookupIndex": 27,
|
||||
"type": "u32",
|
||||
"docs": [],
|
||||
"namespace": ""
|
||||
},
|
||||
{
|
||||
"info": "Plain",
|
||||
"lookupIndex": 28,
|
||||
"type": "NoChainExtension",
|
||||
"docs": [],
|
||||
"namespace": "ink_primitives::types::NoChainExtension",
|
||||
"lookupNameRoot": "InkPrimitivesNoChainExtension"
|
||||
}
|
||||
]
|
||||
@@ -0,0 +1,418 @@
|
||||
[
|
||||
{
|
||||
"info": "Plain",
|
||||
"lookupIndex": 0,
|
||||
"type": "U256",
|
||||
"docs": [],
|
||||
"namespace": "primitive_types::U256",
|
||||
"lookupNameRoot": "PrimitiveTypesU256"
|
||||
},
|
||||
{
|
||||
"info": "VecFixed",
|
||||
"lookupIndex": 1,
|
||||
"type": "[u64;4]",
|
||||
"docs": [],
|
||||
"namespace": "",
|
||||
"length": 4,
|
||||
"sub": {
|
||||
"info": "Plain",
|
||||
"lookupIndex": 2,
|
||||
"type": "u64",
|
||||
"docs": [],
|
||||
"namespace": ""
|
||||
}
|
||||
},
|
||||
{
|
||||
"info": "Plain",
|
||||
"lookupIndex": 2,
|
||||
"type": "u64",
|
||||
"docs": [],
|
||||
"namespace": ""
|
||||
},
|
||||
{
|
||||
"info": "Null",
|
||||
"lookupIndex": 3,
|
||||
"type": "Null",
|
||||
"docs": [],
|
||||
"namespace": "ink_storage::lazy::mapping::Mapping"
|
||||
},
|
||||
{
|
||||
"info": "Plain",
|
||||
"lookupIndex": 4,
|
||||
"type": "H160",
|
||||
"docs": [],
|
||||
"namespace": "primitive_types::H160",
|
||||
"lookupNameRoot": "PrimitiveTypesH160"
|
||||
},
|
||||
{
|
||||
"info": "VecFixed",
|
||||
"lookupIndex": 5,
|
||||
"type": "[u8;20]",
|
||||
"docs": [],
|
||||
"namespace": "",
|
||||
"length": 20,
|
||||
"sub": {
|
||||
"info": "Plain",
|
||||
"lookupIndex": 6,
|
||||
"type": "u8",
|
||||
"docs": [],
|
||||
"namespace": ""
|
||||
}
|
||||
},
|
||||
{
|
||||
"info": "Plain",
|
||||
"lookupIndex": 6,
|
||||
"type": "u8",
|
||||
"docs": [],
|
||||
"namespace": ""
|
||||
},
|
||||
{
|
||||
"info": "Null",
|
||||
"lookupIndex": 7,
|
||||
"type": "Null",
|
||||
"docs": [],
|
||||
"namespace": "ink_storage_traits::impls::ResolverKey"
|
||||
},
|
||||
{
|
||||
"info": "Null",
|
||||
"lookupIndex": 8,
|
||||
"lookupName": "InkStorageTraitsImplsAutoKey",
|
||||
"type": "Null",
|
||||
"docs": [],
|
||||
"namespace": "ink_storage_traits::impls::AutoKey"
|
||||
},
|
||||
{
|
||||
"info": "Null",
|
||||
"lookupIndex": 9,
|
||||
"lookupName": "InkStorageTraitsImplsManualKey",
|
||||
"type": "Null",
|
||||
"docs": [],
|
||||
"namespace": "ink_storage_traits::impls::ManualKey"
|
||||
},
|
||||
{
|
||||
"info": "Null",
|
||||
"lookupIndex": 10,
|
||||
"type": "Null",
|
||||
"docs": [],
|
||||
"namespace": ""
|
||||
},
|
||||
{
|
||||
"info": "Null",
|
||||
"lookupIndex": 11,
|
||||
"lookupName": "InkStorageLazyMapping",
|
||||
"type": "Null",
|
||||
"docs": [],
|
||||
"namespace": "ink_storage::lazy::mapping::Mapping"
|
||||
},
|
||||
{
|
||||
"info": "Tuple",
|
||||
"lookupIndex": 12,
|
||||
"type": "(H160,H160)",
|
||||
"docs": [],
|
||||
"namespace": "",
|
||||
"sub": [
|
||||
{
|
||||
"info": "Plain",
|
||||
"lookupIndex": 4,
|
||||
"type": "H160",
|
||||
"docs": [],
|
||||
"namespace": "primitive_types::H160",
|
||||
"lookupNameRoot": "PrimitiveTypesH160"
|
||||
},
|
||||
{
|
||||
"info": "Plain",
|
||||
"lookupIndex": 4,
|
||||
"type": "H160",
|
||||
"docs": [],
|
||||
"namespace": "primitive_types::H160",
|
||||
"lookupNameRoot": "PrimitiveTypesH160"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"info": "Null",
|
||||
"lookupIndex": 13,
|
||||
"lookupName": "InkStorageTraitsImplsResolverKey",
|
||||
"type": "Null",
|
||||
"docs": [],
|
||||
"namespace": "ink_storage_traits::impls::ResolverKey"
|
||||
},
|
||||
{
|
||||
"info": "Null",
|
||||
"lookupIndex": 14,
|
||||
"lookupName": "InkStorageTraitsImplsManualKey",
|
||||
"type": "Null",
|
||||
"docs": [],
|
||||
"namespace": "ink_storage_traits::impls::ManualKey"
|
||||
},
|
||||
{
|
||||
"info": "Struct",
|
||||
"lookupIndex": 15,
|
||||
"lookupName": "Erc20",
|
||||
"type": "{\"totalSupply\":\"U256\",\"balances\":\"Null\",\"allowances\":\"InkStorageLazyMapping\"}",
|
||||
"docs": [],
|
||||
"namespace": "erc20::erc20::Erc20",
|
||||
"sub": [
|
||||
{
|
||||
"docs": [],
|
||||
"name": "totalSupply",
|
||||
"info": "Plain",
|
||||
"lookupIndex": 0,
|
||||
"type": "U256",
|
||||
"namespace": "primitive_types::U256",
|
||||
"lookupNameRoot": "PrimitiveTypesU256",
|
||||
"typeName": ""
|
||||
},
|
||||
{
|
||||
"docs": [],
|
||||
"name": "balances",
|
||||
"info": "Null",
|
||||
"lookupIndex": 3,
|
||||
"type": "Null",
|
||||
"namespace": "ink_storage::lazy::mapping::Mapping",
|
||||
"typeName": ""
|
||||
},
|
||||
{
|
||||
"docs": [],
|
||||
"name": "allowances",
|
||||
"info": "Null",
|
||||
"lookupIndex": 11,
|
||||
"lookupName": "InkStorageLazyMapping",
|
||||
"type": "Null",
|
||||
"namespace": "ink_storage::lazy::mapping::Mapping",
|
||||
"typeName": ""
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"info": "Result",
|
||||
"lookupIndex": 16,
|
||||
"type": "Result<Null, InkPrimitivesLangError>",
|
||||
"docs": [],
|
||||
"namespace": "Result",
|
||||
"sub": [
|
||||
{
|
||||
"name": "Ok",
|
||||
"info": "Null",
|
||||
"lookupIndex": 10,
|
||||
"type": "Null",
|
||||
"docs": [],
|
||||
"namespace": ""
|
||||
},
|
||||
{
|
||||
"name": "Error",
|
||||
"docs": [],
|
||||
"info": "Si",
|
||||
"lookupIndex": 17,
|
||||
"lookupName": "InkPrimitivesLangError",
|
||||
"type": "Lookup17"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"info": "Enum",
|
||||
"lookupIndex": 17,
|
||||
"lookupName": "InkPrimitivesLangError",
|
||||
"type": "{\"_enum\":[\"__Unused0\",\"CouldNotReadInput\"]}",
|
||||
"docs": [],
|
||||
"namespace": "ink_primitives::LangError",
|
||||
"sub": [
|
||||
{
|
||||
"index": 0,
|
||||
"info": "Null",
|
||||
"name": "__Unused0",
|
||||
"type": "Null"
|
||||
},
|
||||
{
|
||||
"info": "Null",
|
||||
"type": "Null",
|
||||
"index": 1,
|
||||
"name": "CouldNotReadInput"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"info": "Result",
|
||||
"lookupIndex": 18,
|
||||
"type": "Result<U256, InkPrimitivesLangError>",
|
||||
"docs": [],
|
||||
"namespace": "Result",
|
||||
"sub": [
|
||||
{
|
||||
"name": "Ok",
|
||||
"info": "Plain",
|
||||
"lookupIndex": 0,
|
||||
"type": "U256",
|
||||
"docs": [],
|
||||
"namespace": "primitive_types::U256",
|
||||
"lookupNameRoot": "PrimitiveTypesU256"
|
||||
},
|
||||
{
|
||||
"name": "Error",
|
||||
"docs": [],
|
||||
"info": "Si",
|
||||
"lookupIndex": 17,
|
||||
"lookupName": "InkPrimitivesLangError",
|
||||
"type": "Lookup17"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"info": "Result",
|
||||
"lookupIndex": 19,
|
||||
"type": "Result<Result<Null, Erc20Error>, InkPrimitivesLangError>",
|
||||
"docs": [],
|
||||
"namespace": "Result",
|
||||
"sub": [
|
||||
{
|
||||
"name": "Ok",
|
||||
"info": "Result",
|
||||
"lookupIndex": 20,
|
||||
"type": "Result<Null, Erc20Error>",
|
||||
"docs": [],
|
||||
"namespace": "Result",
|
||||
"sub": [
|
||||
{
|
||||
"name": "Ok",
|
||||
"info": "Null",
|
||||
"lookupIndex": 10,
|
||||
"type": "Null",
|
||||
"docs": [],
|
||||
"namespace": ""
|
||||
},
|
||||
{
|
||||
"name": "Error",
|
||||
"docs": [],
|
||||
"info": "Si",
|
||||
"lookupIndex": 21,
|
||||
"lookupName": "Erc20Error",
|
||||
"type": "Lookup21"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "Error",
|
||||
"docs": [],
|
||||
"info": "Si",
|
||||
"lookupIndex": 17,
|
||||
"lookupName": "InkPrimitivesLangError",
|
||||
"type": "Lookup17"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"info": "Result",
|
||||
"lookupIndex": 20,
|
||||
"type": "Result<Null, Erc20Error>",
|
||||
"docs": [],
|
||||
"namespace": "Result",
|
||||
"sub": [
|
||||
{
|
||||
"name": "Ok",
|
||||
"info": "Null",
|
||||
"lookupIndex": 10,
|
||||
"type": "Null",
|
||||
"docs": [],
|
||||
"namespace": ""
|
||||
},
|
||||
{
|
||||
"name": "Error",
|
||||
"docs": [],
|
||||
"info": "Si",
|
||||
"lookupIndex": 21,
|
||||
"lookupName": "Erc20Error",
|
||||
"type": "Lookup21"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"info": "Enum",
|
||||
"lookupIndex": 21,
|
||||
"lookupName": "Erc20Error",
|
||||
"type": "{\"_enum\":[\"InsufficientBalance\",\"InsufficientAllowance\"]}",
|
||||
"docs": [],
|
||||
"namespace": "erc20::erc20::Error",
|
||||
"sub": [
|
||||
{
|
||||
"info": "Null",
|
||||
"type": "Null",
|
||||
"index": 0,
|
||||
"name": "InsufficientBalance"
|
||||
},
|
||||
{
|
||||
"info": "Null",
|
||||
"type": "Null",
|
||||
"index": 1,
|
||||
"name": "InsufficientAllowance"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"info": "Option",
|
||||
"lookupIndex": 22,
|
||||
"type": "Option<H160>",
|
||||
"docs": [],
|
||||
"namespace": "Option",
|
||||
"sub": {
|
||||
"info": "Plain",
|
||||
"lookupIndex": 4,
|
||||
"type": "H160",
|
||||
"docs": [],
|
||||
"namespace": "primitive_types::H160",
|
||||
"lookupNameRoot": "PrimitiveTypesH160"
|
||||
}
|
||||
},
|
||||
{
|
||||
"info": "Plain",
|
||||
"lookupIndex": 23,
|
||||
"type": "AccountId",
|
||||
"docs": [],
|
||||
"namespace": "ink_primitives::types::AccountId",
|
||||
"lookupNameRoot": "InkPrimitivesAccountId"
|
||||
},
|
||||
{
|
||||
"info": "VecFixed",
|
||||
"lookupIndex": 24,
|
||||
"type": "[u8;32]",
|
||||
"docs": [],
|
||||
"namespace": "",
|
||||
"length": 32,
|
||||
"sub": {
|
||||
"info": "Plain",
|
||||
"lookupIndex": 6,
|
||||
"type": "u8",
|
||||
"docs": [],
|
||||
"namespace": ""
|
||||
}
|
||||
},
|
||||
{
|
||||
"info": "Plain",
|
||||
"lookupIndex": 25,
|
||||
"type": "u128",
|
||||
"docs": [],
|
||||
"namespace": ""
|
||||
},
|
||||
{
|
||||
"info": "Plain",
|
||||
"lookupIndex": 26,
|
||||
"type": "Hash",
|
||||
"docs": [],
|
||||
"namespace": "ink_primitives::types::Hash",
|
||||
"lookupNameRoot": "InkPrimitivesHash"
|
||||
},
|
||||
{
|
||||
"info": "Plain",
|
||||
"lookupIndex": 27,
|
||||
"type": "u32",
|
||||
"docs": [],
|
||||
"namespace": ""
|
||||
},
|
||||
{
|
||||
"info": "Plain",
|
||||
"lookupIndex": 28,
|
||||
"type": "NoChainExtension",
|
||||
"docs": [],
|
||||
"namespace": "ink_primitives::types::NoChainExtension",
|
||||
"lookupNameRoot": "InkPrimitivesNoChainExtension"
|
||||
}
|
||||
]
|
||||
@@ -8,5 +8,6 @@ import * as v2 from './v2/index.js';
|
||||
import * as v3 from './v3/index.js';
|
||||
import * as v4 from './v4/index.js';
|
||||
import * as v5 from './v5/index.js';
|
||||
import * as v6 from './v6/index.js';
|
||||
|
||||
export default createVersionedExport({ v0, v1, v2, v3, v4, v5 });
|
||||
export default createVersionedExport({ v0, v1, v2, v3, v4, v5, v6 });
|
||||
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because it is too large
Load Diff
Binary file not shown.
@@ -0,0 +1,5 @@
|
||||
// Copyright 2017-2025 @polkadot/api-contract authors & contributors
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
export { default as erc20Contract } from './erc20.contract.json' assert { type: 'json' };
|
||||
export { default as erc20Metadata } from './erc20.json' assert { type: 'json' };
|
||||
@@ -18,25 +18,25 @@
|
||||
"./packageDetect.cjs"
|
||||
],
|
||||
"type": "module",
|
||||
"version": "15.10.2",
|
||||
"version": "16.2.2",
|
||||
"main": "index.js",
|
||||
"dependencies": {
|
||||
"@polkadot/api": "15.10.2",
|
||||
"@polkadot/api-augment": "15.10.2",
|
||||
"@polkadot/api-base": "15.10.2",
|
||||
"@polkadot/rpc-core": "15.10.2",
|
||||
"@polkadot/types": "15.10.2",
|
||||
"@polkadot/types-codec": "15.10.2",
|
||||
"@polkadot/util": "^13.4.4",
|
||||
"@polkadot/util-crypto": "^13.4.4",
|
||||
"@polkadot/api": "16.2.2",
|
||||
"@polkadot/api-augment": "16.2.2",
|
||||
"@polkadot/api-base": "16.2.2",
|
||||
"@polkadot/rpc-core": "16.2.2",
|
||||
"@polkadot/types": "16.2.2",
|
||||
"@polkadot/types-codec": "16.2.2",
|
||||
"@polkadot/util": "^13.5.2",
|
||||
"@polkadot/util-crypto": "^13.5.2",
|
||||
"rxjs": "^7.8.1",
|
||||
"tslib": "^2.8.1"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@polkadot/api": "15.10.2",
|
||||
"@polkadot/api-augment": "15.10.2",
|
||||
"@polkadot/rpc-augment": "15.10.2",
|
||||
"@polkadot/rpc-provider": "15.10.2",
|
||||
"@polkadot/types-support": "15.10.2"
|
||||
"@polkadot/api": "16.2.2",
|
||||
"@polkadot/api-augment": "16.2.2",
|
||||
"@polkadot/rpc-augment": "16.2.2",
|
||||
"@polkadot/rpc-provider": "16.2.2",
|
||||
"@polkadot/types-support": "16.2.2"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3,4 +3,4 @@
|
||||
|
||||
// Do not edit, auto-generated by @polkadot/dev
|
||||
|
||||
export const packageInfo = { name: '@polkadot/api-derive', path: 'auto', type: 'auto', version: '15.10.2' };
|
||||
export const packageInfo = { name: '@polkadot/api-derive', path: 'auto', type: 'auto', version: '16.2.2' };
|
||||
|
||||
@@ -76,8 +76,10 @@ interface Aura {
|
||||
|
||||
function babeOrAuraPeriod (api: DeriveApi): BN | undefined {
|
||||
const period = api.consts.babe?.expectedBlockTime ||
|
||||
// this will be present ones https://github.com/paritytech/polkadot-sdk/pull/3732 is merged
|
||||
(api.consts['aura'] as unknown as Aura)?.slotDuration ||
|
||||
// this will be present ones https://github.com/paritytech/polkadot-sdk/pull/3732 is merged
|
||||
|
||||
// eslint-disable-next-line
|
||||
(api.consts['aura'] as unknown as Aura)?.['slotDuration'] ||
|
||||
api.consts.timestamp?.minimumPeriod.muln(2);
|
||||
|
||||
return period && period.isZero && !period.isZero() ? period : undefined;
|
||||
|
||||
+17
-17
@@ -18,29 +18,29 @@
|
||||
"./packageDetect.cjs"
|
||||
],
|
||||
"type": "module",
|
||||
"version": "15.10.2",
|
||||
"version": "16.2.2",
|
||||
"main": "index.js",
|
||||
"dependencies": {
|
||||
"@polkadot/api-augment": "15.10.2",
|
||||
"@polkadot/api-base": "15.10.2",
|
||||
"@polkadot/api-derive": "15.10.2",
|
||||
"@polkadot/keyring": "^13.4.4",
|
||||
"@polkadot/rpc-augment": "15.10.2",
|
||||
"@polkadot/rpc-core": "15.10.2",
|
||||
"@polkadot/rpc-provider": "15.10.2",
|
||||
"@polkadot/types": "15.10.2",
|
||||
"@polkadot/types-augment": "15.10.2",
|
||||
"@polkadot/types-codec": "15.10.2",
|
||||
"@polkadot/types-create": "15.10.2",
|
||||
"@polkadot/types-known": "15.10.2",
|
||||
"@polkadot/util": "^13.4.4",
|
||||
"@polkadot/util-crypto": "^13.4.4",
|
||||
"@polkadot/api-augment": "16.2.2",
|
||||
"@polkadot/api-base": "16.2.2",
|
||||
"@polkadot/api-derive": "16.2.2",
|
||||
"@polkadot/keyring": "^13.5.2",
|
||||
"@polkadot/rpc-augment": "16.2.2",
|
||||
"@polkadot/rpc-core": "16.2.2",
|
||||
"@polkadot/rpc-provider": "16.2.2",
|
||||
"@polkadot/types": "16.2.2",
|
||||
"@polkadot/types-augment": "16.2.2",
|
||||
"@polkadot/types-codec": "16.2.2",
|
||||
"@polkadot/types-create": "16.2.2",
|
||||
"@polkadot/types-known": "16.2.2",
|
||||
"@polkadot/util": "^13.5.2",
|
||||
"@polkadot/util-crypto": "^13.5.2",
|
||||
"eventemitter3": "^5.0.1",
|
||||
"rxjs": "^7.8.1",
|
||||
"tslib": "^2.8.1"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@polkadot/api-augment": "15.10.2",
|
||||
"@polkadot/types-support": "15.10.2"
|
||||
"@polkadot/api-augment": "16.2.2",
|
||||
"@polkadot/types-support": "16.2.2"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -5,7 +5,7 @@ import type { Observable } from 'rxjs';
|
||||
import type { AugmentedCall, DeriveCustom, QueryableCalls } from '@polkadot/api-base/types';
|
||||
import type { RpcInterface } from '@polkadot/rpc-core/types';
|
||||
import type { Metadata, StorageKey, Text, u64, Vec } from '@polkadot/types';
|
||||
import type { Call, Hash, RuntimeApiMethodMetadataV15, RuntimeVersion } from '@polkadot/types/interfaces';
|
||||
import type { Call, Hash, RuntimeApiMethodMetadataV16, RuntimeVersion } from '@polkadot/types/interfaces';
|
||||
import type { DecoratedMeta } from '@polkadot/types/metadata/decorate/types';
|
||||
import type { StorageEntry } from '@polkadot/types/primitive/types';
|
||||
import type { AnyFunction, AnyJson, AnyTuple, CallFunction, Codec, DefinitionCall, DefinitionCallNamed, DefinitionRpc, DefinitionRpcSub, DefinitionsCall, DefinitionsCallEntry, DetectCodec, IMethod, IStorageKey, Registry, RegistryError, RegistryTypes } from '@polkadot/types/types';
|
||||
@@ -154,6 +154,7 @@ export abstract class Decorate<ApiType extends ApiTypes> extends Events {
|
||||
isPedantic: this._options.isPedantic,
|
||||
provider,
|
||||
rpcCacheCapacity: this._options.rpcCacheCapacity,
|
||||
ttl: this._options.provider?.ttl,
|
||||
userRpc: this._options.rpc
|
||||
}) as (RpcCore & RpcInterface);
|
||||
this._isConnected = new BehaviorSubject(this._rpcCore.provider.isConnected);
|
||||
@@ -494,7 +495,7 @@ export abstract class Decorate<ApiType extends ApiTypes> extends Events {
|
||||
}
|
||||
|
||||
// Helper for _getRuntimeDefsViaMetadata
|
||||
protected _getMethods (registry: Registry, methods: Vec<RuntimeApiMethodMetadataV15>) {
|
||||
protected _getMethods (registry: Registry, methods: Vec<RuntimeApiMethodMetadataV16>) {
|
||||
const result: Record<string, DefinitionCall> = {};
|
||||
|
||||
methods.forEach((m) => {
|
||||
|
||||
@@ -14,6 +14,7 @@ import type { VersionedRegistry } from './types.js';
|
||||
import { firstValueFrom, map, of, switchMap } from 'rxjs';
|
||||
|
||||
import { Metadata, TypeRegistry } from '@polkadot/types';
|
||||
import { LATEST_EXTRINSIC_VERSION } from '@polkadot/types/extrinsic/constants';
|
||||
import { getSpecAlias, getSpecExtensions, getSpecHasher, getSpecRpc, getSpecTypes, getUpgradeVersion } from '@polkadot/types-known';
|
||||
import { assertReturn, BN_ZERO, isUndefined, logger, noop, objectSpread, u8aEq, u8aToHex, u8aToU8a } from '@polkadot/util';
|
||||
import { blake2AsHex, cryptoWaitReady } from '@polkadot/util-crypto';
|
||||
@@ -22,7 +23,8 @@ import { Decorate } from './Decorate.js';
|
||||
|
||||
const KEEPALIVE_INTERVAL = 10000;
|
||||
const WITH_VERSION_SHORTCUT = false;
|
||||
const SUPPORTED_METADATA_VERSIONS = [15, 14];
|
||||
|
||||
const SUPPORTED_METADATA_VERSIONS = [16, 15, 14];
|
||||
|
||||
const l = logger('api/init');
|
||||
|
||||
@@ -372,7 +374,8 @@ export abstract class Init<ApiType extends ApiTypes> extends Decorate<ApiType> {
|
||||
throw new Error('Invalid initializion order, runtimeVersion is not available');
|
||||
}
|
||||
|
||||
this._extrinsicType = metadata.asLatest.extrinsic.version.toNumber();
|
||||
// ExtrinsicV5 is not fully supported yet, for that reason we default to version 4
|
||||
this._extrinsicType = metadata.asLatest.extrinsic.versions.at(0) || LATEST_EXTRINSIC_VERSION;
|
||||
this._rx.extrinsicType = this._extrinsicType;
|
||||
this._rx.genesisHash = this._genesisHash;
|
||||
this._rx.runtimeVersion = runtimeVersion;
|
||||
|
||||
@@ -3,4 +3,4 @@
|
||||
|
||||
// Do not edit, auto-generated by @polkadot/dev
|
||||
|
||||
export const packageInfo = { name: '@polkadot/api', path: 'auto', type: 'auto', version: '15.10.2' };
|
||||
export const packageInfo = { name: '@polkadot/api', path: 'auto', type: 'auto', version: '16.2.2' };
|
||||
|
||||
@@ -18,13 +18,13 @@
|
||||
"./packageDetect.cjs"
|
||||
],
|
||||
"type": "module",
|
||||
"version": "15.10.2",
|
||||
"version": "16.2.2",
|
||||
"main": "index.js",
|
||||
"dependencies": {
|
||||
"@polkadot/rpc-core": "15.10.2",
|
||||
"@polkadot/types": "15.10.2",
|
||||
"@polkadot/types-codec": "15.10.2",
|
||||
"@polkadot/util": "^13.4.4",
|
||||
"@polkadot/rpc-core": "16.2.2",
|
||||
"@polkadot/types": "16.2.2",
|
||||
"@polkadot/types-codec": "16.2.2",
|
||||
"@polkadot/util": "^13.5.2",
|
||||
"tslib": "^2.8.1"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3,4 +3,4 @@
|
||||
|
||||
// Do not edit, auto-generated by @polkadot/dev
|
||||
|
||||
export const packageInfo = { name: '@polkadot/rpc-augment', path: 'auto', type: 'auto', version: '15.10.2' };
|
||||
export const packageInfo = { name: '@polkadot/rpc-augment', path: 'auto', type: 'auto', version: '16.2.2' };
|
||||
|
||||
@@ -18,18 +18,18 @@
|
||||
"./packageDetect.cjs"
|
||||
],
|
||||
"type": "module",
|
||||
"version": "15.10.2",
|
||||
"version": "16.2.2",
|
||||
"main": "index.js",
|
||||
"dependencies": {
|
||||
"@polkadot/rpc-augment": "15.10.2",
|
||||
"@polkadot/rpc-provider": "15.10.2",
|
||||
"@polkadot/types": "15.10.2",
|
||||
"@polkadot/util": "^13.4.4",
|
||||
"@polkadot/rpc-augment": "16.2.2",
|
||||
"@polkadot/rpc-provider": "16.2.2",
|
||||
"@polkadot/types": "16.2.2",
|
||||
"@polkadot/util": "^13.5.2",
|
||||
"rxjs": "^7.8.1",
|
||||
"tslib": "^2.8.1"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@polkadot/keyring": "^13.4.4",
|
||||
"@polkadot/rpc-augment": "15.10.2"
|
||||
"@polkadot/keyring": "^13.5.2",
|
||||
"@polkadot/rpc-augment": "16.2.2"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -37,6 +37,7 @@ interface Options {
|
||||
* Custom size of the rpc LRUCache capacity. Defaults to `RPC_CORE_DEFAULT_CAPACITY` (1024 * 10 * 10)
|
||||
*/
|
||||
rpcCacheCapacity?: number;
|
||||
ttl?: number | null;
|
||||
userRpc?: Record<string, Record<string, DefinitionRpc | DefinitionRpcSub>>;
|
||||
}
|
||||
|
||||
@@ -117,7 +118,7 @@ export class RpcCore {
|
||||
* @param {ProviderInterface} options.provider An API provider using any of the supported providers (HTTP, SC or WebSocket)
|
||||
* @param {number} [options.rpcCacheCapacity] Custom size of the rpc LRUCache capacity. Defaults to `RPC_CORE_DEFAULT_CAPACITY` (1024 * 10 * 10)
|
||||
*/
|
||||
constructor (instanceId: string, registry: Registry, { isPedantic = true, provider, rpcCacheCapacity, userRpc = {} }: Options) {
|
||||
constructor (instanceId: string, registry: Registry, { isPedantic = true, provider, rpcCacheCapacity, ttl, userRpc = {} }: Options) {
|
||||
if (!provider || !isFunction(provider.send)) {
|
||||
throw new Error('Expected Provider to API create');
|
||||
}
|
||||
@@ -131,7 +132,7 @@ export class RpcCore {
|
||||
|
||||
// these are the base keys (i.e. part of jsonrpc)
|
||||
this.sections.push(...sectionNames);
|
||||
this.#storageCache = new LRUCache(rpcCacheCapacity || RPC_CORE_DEFAULT_CAPACITY);
|
||||
this.#storageCache = new LRUCache(rpcCacheCapacity || RPC_CORE_DEFAULT_CAPACITY, ttl);
|
||||
// decorate all interfaces, defined and user on this instance
|
||||
this.addUserInterfaces(userRpc);
|
||||
}
|
||||
|
||||
@@ -3,4 +3,4 @@
|
||||
|
||||
// Do not edit, auto-generated by @polkadot/dev
|
||||
|
||||
export const packageInfo = { name: '@polkadot/rpc-core', path: 'auto', type: 'auto', version: '15.10.2' };
|
||||
export const packageInfo = { name: '@polkadot/rpc-core', path: 'auto', type: 'auto', version: '16.2.2' };
|
||||
|
||||
@@ -18,17 +18,17 @@
|
||||
"./packageDetect.cjs"
|
||||
],
|
||||
"type": "module",
|
||||
"version": "15.10.2",
|
||||
"version": "16.2.2",
|
||||
"main": "index.js",
|
||||
"dependencies": {
|
||||
"@polkadot/keyring": "^13.4.4",
|
||||
"@polkadot/types": "15.10.2",
|
||||
"@polkadot/types-support": "15.10.2",
|
||||
"@polkadot/util": "^13.4.4",
|
||||
"@polkadot/util-crypto": "^13.4.4",
|
||||
"@polkadot/x-fetch": "^13.4.4",
|
||||
"@polkadot/x-global": "^13.4.4",
|
||||
"@polkadot/x-ws": "^13.4.4",
|
||||
"@polkadot/keyring": "^13.5.2",
|
||||
"@polkadot/types": "16.2.2",
|
||||
"@polkadot/types-support": "16.2.2",
|
||||
"@polkadot/util": "^13.5.2",
|
||||
"@polkadot/util-crypto": "^13.5.2",
|
||||
"@polkadot/x-fetch": "^13.5.2",
|
||||
"@polkadot/x-global": "^13.5.2",
|
||||
"@polkadot/x-ws": "^13.5.2",
|
||||
"eventemitter3": "^5.0.1",
|
||||
"mock-socket": "^9.3.1",
|
||||
"nock": "^13.5.5",
|
||||
|
||||
@@ -42,6 +42,7 @@ export class HttpProvider implements ProviderInterface {
|
||||
readonly #endpoint: string;
|
||||
readonly #headers: Record<string, string>;
|
||||
readonly #stats: ProviderStats;
|
||||
readonly #ttl: number | null | undefined;
|
||||
|
||||
/**
|
||||
* @param {string} endpoint The endpoint url starting with http://
|
||||
@@ -49,7 +50,7 @@ export class HttpProvider implements ProviderInterface {
|
||||
* @param {number} [cacheCapacity] Custom size of the HttpProvider LRUCache. Defaults to `DEFAULT_CAPACITY` (1024)
|
||||
* @param {number} [cacheTtl] Custom TTL of the HttpProvider LRUCache. Determines how long an object can live in the cache. Defaults to `DEFAULT_TTL` (30000)
|
||||
*/
|
||||
constructor (endpoint: string = defaults.HTTP_URL, headers: Record<string, string> = {}, cacheCapacity?: number, cacheTtl?: number) {
|
||||
constructor (endpoint: string = defaults.HTTP_URL, headers: Record<string, string> = {}, cacheCapacity?: number, cacheTtl?: number | null) {
|
||||
if (!/^(https|http):\/\//.test(endpoint)) {
|
||||
throw new Error(`Endpoint should start with 'http://' or 'https://', received '${endpoint}'`);
|
||||
}
|
||||
@@ -57,9 +58,13 @@ export class HttpProvider implements ProviderInterface {
|
||||
this.#coder = new RpcCoder();
|
||||
this.#endpoint = endpoint;
|
||||
this.#headers = headers;
|
||||
this.#callCache = new LRUCache(cacheCapacity === 0 ? 0 : cacheCapacity || DEFAULT_CAPACITY, cacheTtl || DEFAULT_TTL);
|
||||
this.#cacheCapacity = cacheCapacity === 0 ? 0 : cacheCapacity || DEFAULT_CAPACITY;
|
||||
|
||||
const ttl = cacheTtl === undefined ? DEFAULT_TTL : cacheTtl;
|
||||
|
||||
this.#callCache = new LRUCache(cacheCapacity === 0 ? 0 : cacheCapacity || DEFAULT_CAPACITY, ttl);
|
||||
this.#ttl = cacheTtl;
|
||||
|
||||
this.#stats = {
|
||||
active: { requests: 0, subscriptions: 0 },
|
||||
total: { bytesRecv: 0, bytesSent: 0, cached: 0, errors: 0, requests: 0, subscriptions: 0, timeout: 0 }
|
||||
@@ -101,6 +106,13 @@ export class HttpProvider implements ProviderInterface {
|
||||
return this.#stats;
|
||||
}
|
||||
|
||||
/**
|
||||
* @description Returns the connection stats
|
||||
*/
|
||||
public get ttl (): number | null | undefined {
|
||||
return this.#ttl;
|
||||
}
|
||||
|
||||
/**
|
||||
* @summary `true` when this provider supports clone()
|
||||
*/
|
||||
|
||||
@@ -8,6 +8,10 @@
|
||||
export const DEFAULT_CAPACITY = 1024;
|
||||
export const DEFAULT_TTL = 30000;
|
||||
|
||||
// If the user decides to disable the TTL we set the value
|
||||
// to a very high number (A year = 365 * 24 * 60 * 60 * 1000).
|
||||
const DISABLED_TTL = 31_536_000_000;
|
||||
|
||||
class LRUNode {
|
||||
readonly key: string;
|
||||
#expires: number;
|
||||
@@ -47,13 +51,13 @@ export class LRUCache {
|
||||
|
||||
readonly #ttl: number;
|
||||
|
||||
constructor (capacity = DEFAULT_CAPACITY, ttl = DEFAULT_TTL) {
|
||||
constructor (capacity = DEFAULT_CAPACITY, ttl: number | null = DEFAULT_TTL) {
|
||||
this.capacity = capacity;
|
||||
this.#ttl = ttl;
|
||||
this.#head = this.#tail = new LRUNode('<empty>', ttl);
|
||||
ttl ? this.#ttl = ttl : this.#ttl = DISABLED_TTL;
|
||||
this.#head = this.#tail = new LRUNode('<empty>', this.#ttl);
|
||||
}
|
||||
|
||||
get ttl (): number {
|
||||
get ttl (): number | null {
|
||||
return this.#ttl;
|
||||
}
|
||||
|
||||
|
||||
@@ -3,4 +3,4 @@
|
||||
|
||||
// Do not edit, auto-generated by @polkadot/dev
|
||||
|
||||
export const packageInfo = { name: '@polkadot/rpc-provider', path: 'auto', type: 'auto', version: '15.10.2' };
|
||||
export const packageInfo = { name: '@polkadot/rpc-provider', path: 'auto', type: 'auto', version: '16.2.2' };
|
||||
|
||||
@@ -57,6 +57,8 @@ export interface ProviderInterface {
|
||||
readonly isConnected: boolean;
|
||||
/** (optional) stats for the provider with connections/bytes */
|
||||
readonly stats?: ProviderStats;
|
||||
/** (optional) stats for the provider with connections/bytes */
|
||||
readonly ttl?: number | null;
|
||||
|
||||
clone (): ProviderInterface;
|
||||
connect (): Promise<void>;
|
||||
|
||||
@@ -94,6 +94,7 @@ export class WsProvider implements ProviderInterface {
|
||||
readonly #stats: ProviderStats;
|
||||
readonly #waitingForId: Record<string, JsonRpcResponse<unknown>> = {};
|
||||
readonly #cacheCapacity: number;
|
||||
readonly #ttl: number | null | undefined;
|
||||
|
||||
#autoConnectMs: number;
|
||||
#endpointIndex: number;
|
||||
@@ -112,7 +113,7 @@ export class WsProvider implements ProviderInterface {
|
||||
* @param {number} [cacheCapacity] Custom size of the WsProvider LRUCache. Defaults to `DEFAULT_CAPACITY` (1024)
|
||||
* @param {number} [cacheTtl] Custom TTL of the WsProvider LRUCache. Determines how long an object can live in the cache. Defaults to DEFAULT_TTL` (30000)
|
||||
*/
|
||||
constructor (endpoint: string | string[] = defaults.WS_URL, autoConnectMs: number | false = RETRY_DELAY, headers: Record<string, string> = {}, timeout?: number, cacheCapacity?: number, cacheTtl?: number) {
|
||||
constructor (endpoint: string | string[] = defaults.WS_URL, autoConnectMs: number | false = RETRY_DELAY, headers: Record<string, string> = {}, timeout?: number, cacheCapacity?: number, cacheTtl?: number | null) {
|
||||
const endpoints = Array.isArray(endpoint)
|
||||
? endpoint
|
||||
: [endpoint];
|
||||
@@ -126,7 +127,10 @@ export class WsProvider implements ProviderInterface {
|
||||
throw new Error(`Endpoint should start with 'ws://', received '${endpoint}'`);
|
||||
}
|
||||
});
|
||||
this.#callCache = new LRUCache(cacheCapacity || DEFAULT_CAPACITY, cacheTtl || DEFAULT_TTL);
|
||||
const ttl = cacheTtl === undefined ? DEFAULT_TTL : cacheTtl;
|
||||
|
||||
this.#callCache = new LRUCache(cacheCapacity === 0 ? 0 : cacheCapacity || DEFAULT_CAPACITY, ttl);
|
||||
this.#ttl = cacheTtl;
|
||||
this.#cacheCapacity = cacheCapacity || DEFAULT_CAPACITY;
|
||||
this.#eventemitter = new EventEmitter();
|
||||
this.#autoConnectMs = autoConnectMs || 0;
|
||||
@@ -288,6 +292,13 @@ export class WsProvider implements ProviderInterface {
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* @description Returns the connection stats
|
||||
*/
|
||||
public get ttl (): number | null | undefined {
|
||||
return this.#ttl;
|
||||
}
|
||||
|
||||
public get endpointStats (): EndpointStats {
|
||||
return this.#endpointStats;
|
||||
}
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
"./packageDetect.cjs"
|
||||
],
|
||||
"type": "module",
|
||||
"version": "15.10.2",
|
||||
"version": "16.2.2",
|
||||
"main": "index.js",
|
||||
"bin": {
|
||||
"polkadot-types-chain-info": "./scripts/polkadot-types-chain-info.mjs",
|
||||
@@ -28,19 +28,19 @@
|
||||
"polkadot-types-internal-metadata": "./scripts/polkadot-types-internal-metadata.mjs"
|
||||
},
|
||||
"dependencies": {
|
||||
"@polkadot/api": "15.10.2",
|
||||
"@polkadot/api-augment": "15.10.2",
|
||||
"@polkadot/api-derive": "15.10.2",
|
||||
"@polkadot/rpc-augment": "15.10.2",
|
||||
"@polkadot/rpc-provider": "15.10.2",
|
||||
"@polkadot/types": "15.10.2",
|
||||
"@polkadot/types-augment": "15.10.2",
|
||||
"@polkadot/types-codec": "15.10.2",
|
||||
"@polkadot/types-create": "15.10.2",
|
||||
"@polkadot/types-support": "15.10.2",
|
||||
"@polkadot/util": "^13.4.4",
|
||||
"@polkadot/util-crypto": "^13.4.4",
|
||||
"@polkadot/x-ws": "^13.4.4",
|
||||
"@polkadot/api": "16.2.2",
|
||||
"@polkadot/api-augment": "16.2.2",
|
||||
"@polkadot/api-derive": "16.2.2",
|
||||
"@polkadot/rpc-augment": "16.2.2",
|
||||
"@polkadot/rpc-provider": "16.2.2",
|
||||
"@polkadot/types": "16.2.2",
|
||||
"@polkadot/types-augment": "16.2.2",
|
||||
"@polkadot/types-codec": "16.2.2",
|
||||
"@polkadot/types-create": "16.2.2",
|
||||
"@polkadot/types-support": "16.2.2",
|
||||
"@polkadot/util": "^13.5.2",
|
||||
"@polkadot/util-crypto": "^13.5.2",
|
||||
"@polkadot/x-ws": "^13.5.2",
|
||||
"comment-parser": "^1.4.1",
|
||||
"handlebars": "^4.7.8",
|
||||
"tslib": "^2.8.1",
|
||||
|
||||
@@ -4,7 +4,6 @@
|
||||
import type { Metadata } from '@polkadot/types/metadata/Metadata';
|
||||
import type { Definitions } from '@polkadot/types/types';
|
||||
import type { HexString } from '@polkadot/util/types';
|
||||
import type { ExtraTypes } from './types.js';
|
||||
|
||||
import Handlebars from 'handlebars';
|
||||
|
||||
@@ -14,6 +13,7 @@ import { stringCamelCase } from '@polkadot/util';
|
||||
|
||||
import { compareName, createImports, formatType, initMeta, readTemplate, setImports, writeFile } from '../util/index.js';
|
||||
import { ignoreUnusedLookups } from './lookup.js';
|
||||
import { type ExtraTypes, getDeprecationNotice } from './types.js';
|
||||
|
||||
const generateForMetaTemplate = Handlebars.compile(readTemplate('consts'));
|
||||
|
||||
@@ -45,10 +45,20 @@ function generateForMeta (meta: Metadata, dest: string, extraTypes: ExtraTypes,
|
||||
}
|
||||
|
||||
const items = constants
|
||||
.map(({ docs, name, type }) => {
|
||||
.map(({ deprecationInfo, docs, name, type }) => {
|
||||
const typeDef = lookup.getTypeDef(type);
|
||||
const returnType = typeDef.lookupName || formatType(registry, allDefs, typeDef, imports);
|
||||
|
||||
if (!deprecationInfo.isNotDeprecated) {
|
||||
const deprecationNotice = getDeprecationNotice(deprecationInfo, stringCamelCase(name), 'Constant');
|
||||
|
||||
const items = docs.length
|
||||
? ['', deprecationNotice]
|
||||
: [deprecationNotice];
|
||||
|
||||
docs.push(...items.map((text) => registry.createType('Text', text)));
|
||||
}
|
||||
|
||||
// Add the type to the list of used types
|
||||
if (!(imports.primitiveTypes[returnType])) {
|
||||
usedTypes.add(returnType);
|
||||
|
||||
@@ -1,15 +1,16 @@
|
||||
// Copyright 2017-2025 @polkadot/typegen authors & contributors
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
import type { VariantDeprecationInfoV16 } from '@polkadot/types/interfaces';
|
||||
import type { Metadata } from '@polkadot/types/metadata/Metadata';
|
||||
import type { HexString } from '@polkadot/util/types';
|
||||
import type { ExtraTypes } from './types.js';
|
||||
|
||||
import Handlebars from 'handlebars';
|
||||
|
||||
import { stringCamelCase } from '@polkadot/util';
|
||||
|
||||
import { compareName, createImports, initMeta, readTemplate, writeFile } from '../util/index.js';
|
||||
import { type ExtraTypes, getDeprecationNotice } from './types.js';
|
||||
|
||||
const generateForMetaTemplate = Handlebars.compile(readTemplate('errors'));
|
||||
|
||||
@@ -20,15 +21,34 @@ function generateForMeta (meta: Metadata, dest: string, isStrict: boolean): void
|
||||
const { lookup, pallets } = meta.asLatest;
|
||||
const modules = pallets
|
||||
.filter(({ errors }) => errors.isSome)
|
||||
.map(({ errors, name }) => ({
|
||||
items: lookup.getSiType(errors.unwrap().type).def.asVariant.variants
|
||||
.map(({ docs, name }) => ({
|
||||
docs,
|
||||
name: name.toString()
|
||||
}))
|
||||
.sort(compareName),
|
||||
name: stringCamelCase(name)
|
||||
}))
|
||||
.map((data) => {
|
||||
const name = data.name;
|
||||
const errors = data.errors.unwrap();
|
||||
const deprecationInfo = errors.deprecationInfo.toJSON();
|
||||
|
||||
return {
|
||||
items: lookup.getSiType(errors.type).def.asVariant.variants
|
||||
.map(({ docs, index, name }) => {
|
||||
const rawStatus = deprecationInfo?.[index.toNumber()];
|
||||
|
||||
if (rawStatus) {
|
||||
const deprecationVariantInfo: VariantDeprecationInfoV16 = meta.registry.createTypeUnsafe('VariantDeprecationInfoV16', [rawStatus]);
|
||||
|
||||
const deprecationNotice = getDeprecationNotice(deprecationVariantInfo, name.toString());
|
||||
const notice = docs.length ? ['', deprecationNotice] : [deprecationNotice];
|
||||
|
||||
docs.push(...notice.map((text) => meta.registry.createType('Text', text)));
|
||||
}
|
||||
|
||||
return {
|
||||
docs,
|
||||
name: name.toString()
|
||||
};
|
||||
})
|
||||
.sort(compareName),
|
||||
name: stringCamelCase(name)
|
||||
};
|
||||
})
|
||||
.sort(compareName);
|
||||
|
||||
return generateForMetaTemplate({
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
// Copyright 2017-2025 @polkadot/typegen authors & contributors
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
import type { VariantDeprecationInfoV16 } from '@polkadot/types/interfaces';
|
||||
import type { Metadata } from '@polkadot/types/metadata/Metadata';
|
||||
import type { Definitions } from '@polkadot/types/types';
|
||||
import type { HexString } from '@polkadot/util/types';
|
||||
import type { ExtraTypes } from './types.js';
|
||||
|
||||
import Handlebars from 'handlebars';
|
||||
|
||||
@@ -14,6 +14,7 @@ import { stringCamelCase } from '@polkadot/util';
|
||||
|
||||
import { compareName, createImports, formatType, initMeta, readTemplate, setImports, writeFile } from '../util/index.js';
|
||||
import { ignoreUnusedLookups } from './lookup.js';
|
||||
import { type ExtraTypes, getDeprecationNotice } from './types.js';
|
||||
|
||||
const generateForMetaTemplate = Handlebars.compile(readTemplate('events'));
|
||||
|
||||
@@ -82,39 +83,55 @@ function generateForMeta (meta: Metadata, dest: string, extraTypes: ExtraTypes,
|
||||
const usedTypes = new Set<string>([]);
|
||||
const modules = pallets
|
||||
.filter(({ events }) => events.isSome)
|
||||
.map(({ events, name }) => ({
|
||||
items: lookup.getSiType(events.unwrap().type).def.asVariant.variants
|
||||
.map(({ docs, fields, name }) => {
|
||||
const args = fields
|
||||
.map(({ type }) => lookup.getTypeDef(type))
|
||||
.map((typeDef) => {
|
||||
const arg = typeDef.lookupName || formatType(registry, allDefs, typeDef, imports);
|
||||
.map((data) => {
|
||||
const name = data.name;
|
||||
const events = data.events.unwrap();
|
||||
const deprecationInfo = events.deprecationInfo.toJSON();
|
||||
|
||||
// Add the type to the list of used types
|
||||
if (!(imports.primitiveTypes[arg])) {
|
||||
usedTypes.add(arg);
|
||||
}
|
||||
return {
|
||||
items: lookup.getSiType(events.type).def.asVariant.variants
|
||||
.map(({ docs, fields, index, name }) => {
|
||||
const rawStatus = deprecationInfo?.[index.toNumber()];
|
||||
|
||||
return arg;
|
||||
});
|
||||
if (rawStatus) {
|
||||
const deprecationVariantInfo: VariantDeprecationInfoV16 = meta.registry.createTypeUnsafe('VariantDeprecationInfoV16', [rawStatus]);
|
||||
const deprecationNotice = getDeprecationNotice(deprecationVariantInfo, name.toString());
|
||||
const notice = docs.length ? ['', deprecationNotice] : [deprecationNotice];
|
||||
|
||||
const names = fields
|
||||
.map(({ name }) => registry.lookup.sanitizeField(name)[0])
|
||||
.filter((n): n is string => !!n);
|
||||
docs.push(...notice.map((text) => meta.registry.createType('Text', text)));
|
||||
}
|
||||
|
||||
setImports(allDefs, imports, args);
|
||||
const args = fields
|
||||
.map(({ type }) => lookup.getTypeDef(type))
|
||||
.map((typeDef) => {
|
||||
const arg = typeDef.lookupName || formatType(registry, allDefs, typeDef, imports);
|
||||
|
||||
return {
|
||||
docs,
|
||||
name: name.toString(),
|
||||
type: names.length !== 0 && names.length === args.length
|
||||
? `[${names.map((n, i) => `${ALIAS.includes(n) ? `${n}_` : n}: ${args[i]}`).join(', ')}], { ${names.map((n, i) => `${n}: ${args[i]}`).join(', ')} }`
|
||||
: `[${args.join(', ')}]`
|
||||
};
|
||||
})
|
||||
.sort(compareName),
|
||||
name: stringCamelCase(name)
|
||||
}))
|
||||
// Add the type to the list of used types
|
||||
if (!(imports.primitiveTypes[arg])) {
|
||||
usedTypes.add(arg);
|
||||
}
|
||||
|
||||
return arg;
|
||||
});
|
||||
|
||||
const names = fields
|
||||
.map(({ name }) => registry.lookup.sanitizeField(name)[0])
|
||||
.filter((n): n is string => !!n);
|
||||
|
||||
setImports(allDefs, imports, args);
|
||||
|
||||
return {
|
||||
docs,
|
||||
name: name.toString(),
|
||||
type: names.length !== 0 && names.length === args.length
|
||||
? `[${names.map((n, i) => `${ALIAS.includes(n) ? `${n}_` : n}: ${args[i]}`).join(', ')}], { ${names.map((n, i) => `${n}: ${args[i]}`).join(', ')} }`
|
||||
: `[${args.join(', ')}]`
|
||||
};
|
||||
})
|
||||
.sort(compareName),
|
||||
name: stringCamelCase(name)
|
||||
};
|
||||
})
|
||||
.sort(compareName);
|
||||
|
||||
// filter out the unused lookup types from imports
|
||||
|
||||
@@ -11,6 +11,8 @@ import Handlebars from 'handlebars';
|
||||
import path from 'node:path';
|
||||
|
||||
import * as defaultDefinitions from '@polkadot/types/interfaces/definitions';
|
||||
import staticAhKusama from '@polkadot/types-support/metadata/v15/asset-hub-kusama-hex';
|
||||
import staticAhPolkadot from '@polkadot/types-support/metadata/v15/asset-hub-polkadot-hex';
|
||||
import staticKusama from '@polkadot/types-support/metadata/v15/kusama-hex';
|
||||
import staticPolkadot from '@polkadot/types-support/metadata/v15/polkadot-hex';
|
||||
import staticSubstrate from '@polkadot/types-support/metadata/v15/substrate-hex';
|
||||
@@ -271,7 +273,9 @@ export function generateDefaultLookup (destDir = 'packages/types-augment/src/loo
|
||||
: [
|
||||
['substrate', staticSubstrate],
|
||||
['polkadot', staticPolkadot],
|
||||
['kusama', staticKusama]
|
||||
['kusama', staticKusama],
|
||||
['assetHubPolkadot', staticAhPolkadot],
|
||||
['assetHubKusama', staticAhKusama]
|
||||
]
|
||||
);
|
||||
}
|
||||
|
||||
@@ -6,7 +6,6 @@ import type { Metadata, PortableRegistry } from '@polkadot/types/metadata';
|
||||
import type { Definitions, Registry } from '@polkadot/types/types';
|
||||
import type { HexString } from '@polkadot/util/types';
|
||||
import type { ModuleTypes, TypeImports } from '../util/imports.js';
|
||||
import type { ExtraTypes } from './types.js';
|
||||
|
||||
import Handlebars from 'handlebars';
|
||||
|
||||
@@ -17,6 +16,7 @@ import { stringCamelCase } from '@polkadot/util';
|
||||
|
||||
import { compareName, createImports, formatType, getSimilarTypes, initMeta, readTemplate, setImports, writeFile } from '../util/index.js';
|
||||
import { ignoreUnusedLookups } from './lookup.js';
|
||||
import { type ExtraTypes, getDeprecationNotice } from './types.js';
|
||||
|
||||
const generateForMetaTemplate = Handlebars.compile(readTemplate('query'));
|
||||
|
||||
@@ -93,8 +93,18 @@ function generateForMeta (registry: Registry, meta: Metadata, dest: string, extr
|
||||
.map(({ name, storage }) => {
|
||||
const items = storage.unwrap().items
|
||||
.map((storageEntry) => {
|
||||
const { deprecationInfo, docs, name } = storageEntry;
|
||||
const [isOptional, args, params, _returnType] = entrySignature(lookup, allDefs, registry, name.toString(), storageEntry, imports);
|
||||
|
||||
if (!deprecationInfo.isNotDeprecated) {
|
||||
const deprecationNotice = getDeprecationNotice(deprecationInfo, stringCamelCase(name));
|
||||
const items = docs.length
|
||||
? ['', deprecationNotice]
|
||||
: [deprecationNotice];
|
||||
|
||||
docs.push(...items.map((text) => registry.createType('Text', text)));
|
||||
}
|
||||
|
||||
// Add the type and args to the list of used types
|
||||
if (!(imports.primitiveTypes[_returnType])) {
|
||||
usedTypes.add(_returnType);
|
||||
@@ -110,7 +120,7 @@ function generateForMeta (registry: Registry, meta: Metadata, dest: string, extr
|
||||
|
||||
return {
|
||||
args,
|
||||
docs: storageEntry.docs,
|
||||
docs,
|
||||
entryType: 'AugmentedQuery',
|
||||
name: stringCamelCase(storageEntry.name),
|
||||
params,
|
||||
|
||||
@@ -1,12 +1,11 @@
|
||||
// Copyright 2017-2025 @polkadot/typegen authors & contributors
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
import type { RuntimeApiMethodMetadataV15, SiLookupTypeId } from '@polkadot/types/interfaces';
|
||||
import type { RuntimeApiMethodMetadataV16, SiLookupTypeId } from '@polkadot/types/interfaces';
|
||||
import type { Metadata } from '@polkadot/types/metadata/Metadata';
|
||||
import type { DefinitionCall, DefinitionCallNamed, Definitions, DefinitionsCall, Registry } from '@polkadot/types/types';
|
||||
import type { Vec } from '@polkadot/types-codec';
|
||||
import type { HexString } from '@polkadot/util/types';
|
||||
import type { ExtraTypes } from './types.js';
|
||||
|
||||
import Handlebars from 'handlebars';
|
||||
|
||||
@@ -16,6 +15,7 @@ import { objectSpread, stringCamelCase } from '@polkadot/util';
|
||||
import { blake2AsHex } from '@polkadot/util-crypto';
|
||||
|
||||
import { createImports, formatType, getSimilarTypes, initMeta, readTemplate, setImports, writeFile } from '../util/index.js';
|
||||
import { type ExtraTypes, getDeprecationNotice } from './types.js';
|
||||
|
||||
type Apis = [HexString, number][];
|
||||
|
||||
@@ -23,6 +23,8 @@ const generateCallsTypesTemplate = Handlebars.compile(readTemplate('calls'));
|
||||
|
||||
// This works similar to the PATHS_ALIAS set from the PortableRegistry
|
||||
const aliases: Record<string, string> = {
|
||||
AssetHubKusamaRuntimeRuntimeCall: 'RuntimeCall',
|
||||
AssetHubPolkadotRuntimeRuntimeCall: 'RuntimeCall',
|
||||
KitchensinkRuntimeRuntimeCall: 'RuntimeCall',
|
||||
OpaqueValue: 'Bytes',
|
||||
PolkadotParachainPrimitivesPrimitivesId: 'ParaId',
|
||||
@@ -35,6 +37,7 @@ const aliases: Record<string, string> = {
|
||||
PrimitiveTypesU256: 'U256',
|
||||
SpConsensusBabeOpaqueKeyOwnershipProof: 'OpaqueKeyOwnershipProof',
|
||||
SpConsensusSlotsSlot: 'Slot',
|
||||
SpConsensusSlotsSlotDuration: 'SlotDuration',
|
||||
SpCoreCryptoAccountId32: 'AccountId32',
|
||||
SpCoreOpaqueMetadata: 'OpaqueMetadata',
|
||||
SpRuntimeOpaqueValue: 'Bytes',
|
||||
@@ -53,14 +56,22 @@ const getTypesViaAlias = (registry: Registry, id: SiLookupTypeId) => {
|
||||
};
|
||||
|
||||
/** @internal */
|
||||
function getMethods (registry: Registry, methods: Vec<RuntimeApiMethodMetadataV15>) {
|
||||
function getMethods (registry: Registry, methods: Vec<RuntimeApiMethodMetadataV16>) {
|
||||
const result: Record<string, DefinitionCall> = {};
|
||||
|
||||
methods.forEach((m) => {
|
||||
const { docs, inputs, name, output } = m;
|
||||
const { deprecationInfo, docs, inputs, name, output } = m;
|
||||
let description = docs.map((d) => d.toString()).join();
|
||||
|
||||
if (!deprecationInfo.isNotDeprecated) {
|
||||
const deprecationNotice = getDeprecationNotice(deprecationInfo, stringCamelCase(name));
|
||||
const notice = description.length ? `\n * ${deprecationNotice}` : ` * ${deprecationNotice}`;
|
||||
|
||||
description += notice;
|
||||
}
|
||||
|
||||
result[name.toString()] = {
|
||||
description: docs.map((d) => d.toString()).join(),
|
||||
description,
|
||||
params: inputs.map(({ name, type }) => {
|
||||
return { name: name.toString(), type: getTypesViaAlias(registry, type) };
|
||||
}),
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
// Copyright 2017-2025 @polkadot/typegen authors & contributors
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
import type { VariantDeprecationInfoV16 } from '@polkadot/types/interfaces';
|
||||
import type { Metadata } from '@polkadot/types/metadata/Metadata';
|
||||
import type { Text } from '@polkadot/types/primitive';
|
||||
import type { Definitions, Registry } from '@polkadot/types/types';
|
||||
import type { HexString } from '@polkadot/util/types';
|
||||
import type { ExtraTypes } from './types.js';
|
||||
|
||||
import Handlebars from 'handlebars';
|
||||
|
||||
@@ -15,6 +15,7 @@ import { stringCamelCase } from '@polkadot/util';
|
||||
|
||||
import { compareName, createImports, formatType, getSimilarTypes, initMeta, readTemplate, setImports, writeFile } from '../util/index.js';
|
||||
import { ignoreUnusedLookups } from './lookup.js';
|
||||
import { type ExtraTypes, getDeprecationNotice } from './types.js';
|
||||
|
||||
const MAPPED_NAMES: Record<string, string> = {
|
||||
class: 'clazz',
|
||||
@@ -51,12 +52,26 @@ function generateForMeta (registry: Registry, meta: Metadata, dest: string, extr
|
||||
const modules = pallets
|
||||
.sort(compareName)
|
||||
.filter(({ calls }) => calls.isSome)
|
||||
.map(({ calls, name }) => {
|
||||
.map((data) => {
|
||||
const name = data.name;
|
||||
const calls = data.calls.unwrap();
|
||||
const deprecationInfo = calls.deprecationInfo.toJSON();
|
||||
|
||||
setImports(allDefs, imports, ['SubmittableExtrinsic']);
|
||||
|
||||
const sectionName = stringCamelCase(name);
|
||||
const items = lookup.getSiType(calls.unwrap().type).def.asVariant.variants
|
||||
.map(({ docs, fields, name }) => {
|
||||
const items = lookup.getSiType(calls.type).def.asVariant.variants
|
||||
.map(({ docs, fields, index, name }) => {
|
||||
const rawStatus = deprecationInfo?.[index.toNumber()];
|
||||
|
||||
if (rawStatus) {
|
||||
const deprecationVariantInfo: VariantDeprecationInfoV16 = meta.registry.createTypeUnsafe('VariantDeprecationInfoV16', [rawStatus]);
|
||||
const deprecationNotice = getDeprecationNotice(deprecationVariantInfo, name.toString(), 'Call');
|
||||
const notice = docs.length ? ['', deprecationNotice] : [deprecationNotice];
|
||||
|
||||
docs.push(...notice.map((text) => meta.registry.createType('Text', text)));
|
||||
}
|
||||
|
||||
const typesInfo = fields.map(({ name, type, typeName }, index): [string, string, string] => {
|
||||
const typeDef = registry.lookup.getTypeDef(type);
|
||||
|
||||
@@ -72,6 +87,7 @@ function generateForMeta (registry: Registry, meta: Metadata, dest: string, extr
|
||||
: typeDef.lookupName || typeDef.type
|
||||
];
|
||||
});
|
||||
|
||||
const params = typesInfo
|
||||
.map(([name,, typeStr]) => {
|
||||
const similarTypes = getSimilarTypes(registry, allDefs, typeStr, imports);
|
||||
|
||||
@@ -1,7 +1,26 @@
|
||||
// Copyright 2017-2025 @polkadot/typegen authors & contributors
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
import type { Option, Text } from '@polkadot/types-codec';
|
||||
|
||||
export type ExtraTypes = Record<string, Record<string, {
|
||||
runtime?: Record<string, any>;
|
||||
types: Record<string, any>;
|
||||
}>>;
|
||||
|
||||
export function getDeprecationNotice<T extends { isDeprecated: boolean; asDeprecated: { note: Text; since: Option<Text> }}> (deprecationInfo: T, name: string, label?: string): string {
|
||||
let deprecationNotice = '@deprecated';
|
||||
|
||||
if (deprecationInfo.isDeprecated) {
|
||||
const { note, since } = deprecationInfo.asDeprecated;
|
||||
const sinceText = since.isSome ? ` Since ${since.unwrap().toString()}.` : '';
|
||||
|
||||
deprecationNotice += ` ${note.toString()}${sinceText}`;
|
||||
} else {
|
||||
const labelText = label ? `${label} ` : '';
|
||||
|
||||
deprecationNotice += ` ${labelText}${name} has been deprecated`;
|
||||
}
|
||||
|
||||
return deprecationNotice;
|
||||
}
|
||||
|
||||
@@ -3,6 +3,9 @@
|
||||
|
||||
import type { HexString } from '@polkadot/util/types';
|
||||
|
||||
// TODO: replace v15 to v16 once metadata is updated
|
||||
import assetHubKusama from '@polkadot/types-support/metadata/v15/asset-hub-kusama-hex';
|
||||
import assetHubPolkadot from '@polkadot/types-support/metadata/v15/asset-hub-polkadot-hex';
|
||||
import kusama from '@polkadot/types-support/metadata/v15/kusama-hex';
|
||||
import polkadot from '@polkadot/types-support/metadata/v15/polkadot-hex';
|
||||
import substrate from '@polkadot/types-support/metadata/v15/substrate-hex';
|
||||
@@ -10,7 +13,7 @@ import substrate from '@polkadot/types-support/metadata/v15/substrate-hex';
|
||||
import { generateDefaultConsts, generateDefaultErrors, generateDefaultEvents, generateDefaultInterface, generateDefaultLookup, generateDefaultQuery, generateDefaultRpc, generateDefaultRuntime, generateDefaultTsDef, generateDefaultTx } from './generate/index.js';
|
||||
|
||||
const BASE = 'packages/api-augment/src';
|
||||
const METAS = Object.entries<HexString>({ kusama, polkadot, substrate });
|
||||
const METAS = Object.entries<HexString>({ assetHubKusama, assetHubPolkadot, kusama, polkadot, substrate });
|
||||
|
||||
export function main (): void {
|
||||
generateDefaultInterface();
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
// Copyright 2017-2025 @polkadot/typegen authors & contributors
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
import type { MetadataLatest, RuntimeApiMethodMetadataV15, SiLookupTypeId } from '@polkadot/types/interfaces';
|
||||
import type { MetadataLatest, RuntimeApiMethodMetadataV16, SiLookupTypeId } from '@polkadot/types/interfaces';
|
||||
import type { PortableRegistry } from '@polkadot/types/metadata';
|
||||
import type { Text } from '@polkadot/types/primitive';
|
||||
import type { Codec, DefinitionCall, DefinitionRpcParam, DefinitionsCall, Registry } from '@polkadot/types/types';
|
||||
@@ -255,7 +255,7 @@ function addRpc (_runtimeDesc: string, rpcMethods?: string[]): string {
|
||||
}
|
||||
|
||||
/** @internal */
|
||||
function getMethods (registry: Registry, methods: Vec<RuntimeApiMethodMetadataV15>) {
|
||||
function getMethods (registry: Registry, methods: Vec<RuntimeApiMethodMetadataV16>) {
|
||||
const result: Record<string, DefinitionCall> = {};
|
||||
|
||||
methods.forEach((m) => {
|
||||
@@ -614,7 +614,7 @@ function extractDeriveExample (tags: Spec[]) {
|
||||
let example = '';
|
||||
const inCodeBlock = { done: false, found: false };
|
||||
|
||||
// / Obtain code block from example tag.
|
||||
// Obtain code block from example tag.
|
||||
exampleTag.source.forEach((line) => {
|
||||
if (inCodeBlock.done) {
|
||||
return;
|
||||
|
||||
@@ -3,4 +3,4 @@
|
||||
|
||||
// Do not edit, auto-generated by @polkadot/dev
|
||||
|
||||
export const packageInfo = { name: '@polkadot/typegen', path: 'auto', type: 'auto', version: '15.10.2' };
|
||||
export const packageInfo = { name: '@polkadot/typegen', path: 'auto', type: 'auto', version: '16.2.2' };
|
||||
|
||||
@@ -18,12 +18,12 @@
|
||||
"./packageDetect.cjs"
|
||||
],
|
||||
"type": "module",
|
||||
"version": "15.10.2",
|
||||
"version": "16.2.2",
|
||||
"main": "index.js",
|
||||
"dependencies": {
|
||||
"@polkadot/types": "15.10.2",
|
||||
"@polkadot/types-codec": "15.10.2",
|
||||
"@polkadot/util": "^13.4.4",
|
||||
"@polkadot/types": "16.2.2",
|
||||
"@polkadot/types-codec": "16.2.2",
|
||||
"@polkadot/util": "^13.5.2",
|
||||
"tslib": "^2.8.1"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,261 @@
|
||||
// Auto-generated via `yarn polkadot-types-from-defs`, do not edit
|
||||
/* eslint-disable */
|
||||
|
||||
/* eslint-disable sort-keys */
|
||||
|
||||
export default {
|
||||
/**
|
||||
* Lookup146: asset_hub_kusama_runtime::ProxyType
|
||||
**/
|
||||
AssetHubKusamaRuntimeProxyType: {
|
||||
_enum: ['Any', 'NonTransfer', 'CancelProxy', 'Assets', 'AssetOwner', 'AssetManager', 'Collator']
|
||||
},
|
||||
/**
|
||||
* Lookup248: asset_hub_kusama_runtime::RuntimeHoldReason
|
||||
**/
|
||||
AssetHubKusamaRuntimeRuntimeHoldReason: {
|
||||
_enum: {
|
||||
__Unused0: 'Null',
|
||||
__Unused1: 'Null',
|
||||
__Unused2: 'Null',
|
||||
__Unused3: 'Null',
|
||||
__Unused4: 'Null',
|
||||
__Unused5: 'Null',
|
||||
__Unused6: 'Null',
|
||||
__Unused7: 'Null',
|
||||
__Unused8: 'Null',
|
||||
__Unused9: 'Null',
|
||||
__Unused10: 'Null',
|
||||
__Unused11: 'Null',
|
||||
__Unused12: 'Null',
|
||||
__Unused13: 'Null',
|
||||
__Unused14: 'Null',
|
||||
__Unused15: 'Null',
|
||||
__Unused16: 'Null',
|
||||
__Unused17: 'Null',
|
||||
__Unused18: 'Null',
|
||||
__Unused19: 'Null',
|
||||
__Unused20: 'Null',
|
||||
__Unused21: 'Null',
|
||||
__Unused22: 'Null',
|
||||
__Unused23: 'Null',
|
||||
__Unused24: 'Null',
|
||||
__Unused25: 'Null',
|
||||
__Unused26: 'Null',
|
||||
__Unused27: 'Null',
|
||||
__Unused28: 'Null',
|
||||
__Unused29: 'Null',
|
||||
__Unused30: 'Null',
|
||||
__Unused31: 'Null',
|
||||
__Unused32: 'Null',
|
||||
__Unused33: 'Null',
|
||||
__Unused34: 'Null',
|
||||
__Unused35: 'Null',
|
||||
__Unused36: 'Null',
|
||||
__Unused37: 'Null',
|
||||
__Unused38: 'Null',
|
||||
__Unused39: 'Null',
|
||||
__Unused40: 'Null',
|
||||
__Unused41: 'Null',
|
||||
__Unused42: 'Null',
|
||||
__Unused43: 'Null',
|
||||
__Unused44: 'Null',
|
||||
__Unused45: 'Null',
|
||||
__Unused46: 'Null',
|
||||
__Unused47: 'Null',
|
||||
__Unused48: 'Null',
|
||||
__Unused49: 'Null',
|
||||
__Unused50: 'Null',
|
||||
__Unused51: 'Null',
|
||||
__Unused52: 'Null',
|
||||
__Unused53: 'Null',
|
||||
NftFractionalization: 'PalletNftFractionalizationHoldReason',
|
||||
__Unused55: 'Null',
|
||||
__Unused56: 'Null',
|
||||
__Unused57: 'Null',
|
||||
__Unused58: 'Null',
|
||||
__Unused59: 'Null',
|
||||
__Unused60: 'Null',
|
||||
__Unused61: 'Null',
|
||||
__Unused62: 'Null',
|
||||
__Unused63: 'Null',
|
||||
__Unused64: 'Null',
|
||||
__Unused65: 'Null',
|
||||
__Unused66: 'Null',
|
||||
__Unused67: 'Null',
|
||||
__Unused68: 'Null',
|
||||
__Unused69: 'Null',
|
||||
StateTrieMigration: 'PalletStateTrieMigrationHoldReason'
|
||||
}
|
||||
},
|
||||
/**
|
||||
* Lookup275: asset_hub_kusama_runtime::SessionKeys
|
||||
**/
|
||||
AssetHubKusamaRuntimeSessionKeys: {
|
||||
aura: 'SpConsensusAuraSr25519AppSr25519Public'
|
||||
},
|
||||
/**
|
||||
* Lookup276: sp_consensus_aura::sr25519::app_sr25519::Public
|
||||
**/
|
||||
SpConsensusAuraSr25519AppSr25519Public: '[u8;32]',
|
||||
/**
|
||||
* Lookup380: pallet_remote_proxy::pallet::Call<T, I>
|
||||
**/
|
||||
PalletRemoteProxyCall: {
|
||||
_enum: {
|
||||
remote_proxy: {
|
||||
real: 'MultiAddress',
|
||||
forceProxyType: 'Option<AssetHubKusamaRuntimeProxyType>',
|
||||
call: 'Call',
|
||||
proof: 'PalletRemoteProxyRemoteProxyProof',
|
||||
},
|
||||
register_remote_proxy_proof: {
|
||||
proof: 'PalletRemoteProxyRemoteProxyProof',
|
||||
},
|
||||
remote_proxy_with_registered_proof: {
|
||||
real: 'MultiAddress',
|
||||
forceProxyType: 'Option<AssetHubKusamaRuntimeProxyType>',
|
||||
call: 'Call'
|
||||
}
|
||||
}
|
||||
},
|
||||
/**
|
||||
* Lookup381: pallet_remote_proxy::pallet::RemoteProxyProof<RemoteBlockNumber>
|
||||
**/
|
||||
PalletRemoteProxyRemoteProxyProof: {
|
||||
_enum: {
|
||||
RelayChain: {
|
||||
proof: 'Vec<Bytes>',
|
||||
block: 'u32'
|
||||
}
|
||||
}
|
||||
},
|
||||
/**
|
||||
* Lookup419: asset_hub_kusama_runtime::OriginCaller
|
||||
**/
|
||||
AssetHubKusamaRuntimeOriginCaller: {
|
||||
_enum: {
|
||||
system: 'FrameSupportDispatchRawOrigin',
|
||||
__Unused1: 'Null',
|
||||
__Unused2: 'Null',
|
||||
__Unused3: 'Null',
|
||||
__Unused4: 'Null',
|
||||
__Unused5: 'Null',
|
||||
__Unused6: 'Null',
|
||||
__Unused7: 'Null',
|
||||
__Unused8: 'Null',
|
||||
__Unused9: 'Null',
|
||||
__Unused10: 'Null',
|
||||
__Unused11: 'Null',
|
||||
__Unused12: 'Null',
|
||||
__Unused13: 'Null',
|
||||
__Unused14: 'Null',
|
||||
__Unused15: 'Null',
|
||||
__Unused16: 'Null',
|
||||
__Unused17: 'Null',
|
||||
__Unused18: 'Null',
|
||||
__Unused19: 'Null',
|
||||
__Unused20: 'Null',
|
||||
__Unused21: 'Null',
|
||||
__Unused22: 'Null',
|
||||
__Unused23: 'Null',
|
||||
__Unused24: 'Null',
|
||||
__Unused25: 'Null',
|
||||
__Unused26: 'Null',
|
||||
__Unused27: 'Null',
|
||||
__Unused28: 'Null',
|
||||
__Unused29: 'Null',
|
||||
__Unused30: 'Null',
|
||||
PolkadotXcm: 'PalletXcmOrigin',
|
||||
CumulusXcm: 'CumulusPalletXcmOrigin'
|
||||
}
|
||||
},
|
||||
/**
|
||||
* Lookup440: pallet_remote_proxy::pallet::Error<T, I>
|
||||
**/
|
||||
PalletRemoteProxyError: {
|
||||
_enum: ['CouldNotConvertLocalToRemoteAccountId', 'UnknownProofAnchorBlock', 'InvalidProof', 'ProxyDefinitionDecodingFailed', 'Unannounced', 'DidNotFindMatchingProxyDefinition', 'ProxyProofNotRegistered']
|
||||
},
|
||||
/**
|
||||
* Lookup508: asset_hub_kusama_runtime::Runtime
|
||||
**/
|
||||
AssetHubKusamaRuntimeRuntime: 'Null',
|
||||
/**
|
||||
* Lookup567: asset_hub_kusama_runtime::RuntimeError
|
||||
**/
|
||||
AssetHubKusamaRuntimeRuntimeError: {
|
||||
_enum: {
|
||||
System: 'FrameSystemError',
|
||||
ParachainSystem: 'CumulusPalletParachainSystemError',
|
||||
__Unused2: 'Null',
|
||||
__Unused3: 'Null',
|
||||
__Unused4: 'Null',
|
||||
__Unused5: 'Null',
|
||||
__Unused6: 'Null',
|
||||
__Unused7: 'Null',
|
||||
__Unused8: 'Null',
|
||||
__Unused9: 'Null',
|
||||
Balances: 'PalletBalancesError',
|
||||
__Unused11: 'Null',
|
||||
__Unused12: 'Null',
|
||||
__Unused13: 'Null',
|
||||
Vesting: 'PalletVestingError',
|
||||
__Unused15: 'Null',
|
||||
__Unused16: 'Null',
|
||||
__Unused17: 'Null',
|
||||
__Unused18: 'Null',
|
||||
__Unused19: 'Null',
|
||||
__Unused20: 'Null',
|
||||
CollatorSelection: 'PalletCollatorSelectionError',
|
||||
Session: 'PalletSessionError',
|
||||
__Unused23: 'Null',
|
||||
__Unused24: 'Null',
|
||||
__Unused25: 'Null',
|
||||
__Unused26: 'Null',
|
||||
__Unused27: 'Null',
|
||||
__Unused28: 'Null',
|
||||
__Unused29: 'Null',
|
||||
XcmpQueue: 'CumulusPalletXcmpQueueError',
|
||||
PolkadotXcm: 'PalletXcmError',
|
||||
__Unused32: 'Null',
|
||||
__Unused33: 'Null',
|
||||
__Unused34: 'Null',
|
||||
MessageQueue: 'PalletMessageQueueError',
|
||||
__Unused36: 'Null',
|
||||
__Unused37: 'Null',
|
||||
__Unused38: 'Null',
|
||||
__Unused39: 'Null',
|
||||
Utility: 'PalletUtilityError',
|
||||
Multisig: 'PalletMultisigError',
|
||||
Proxy: 'PalletProxyError',
|
||||
RemoteProxyRelayChain: 'PalletRemoteProxyError',
|
||||
__Unused44: 'Null',
|
||||
__Unused45: 'Null',
|
||||
__Unused46: 'Null',
|
||||
__Unused47: 'Null',
|
||||
__Unused48: 'Null',
|
||||
__Unused49: 'Null',
|
||||
Assets: 'PalletAssetsError',
|
||||
Uniques: 'PalletUniquesError',
|
||||
Nfts: 'PalletNftsError',
|
||||
ForeignAssets: 'PalletAssetsError',
|
||||
NftFractionalization: 'PalletNftFractionalizationError',
|
||||
PoolAssets: 'PalletAssetsError',
|
||||
AssetConversion: 'PalletAssetConversionError',
|
||||
__Unused57: 'Null',
|
||||
__Unused58: 'Null',
|
||||
__Unused59: 'Null',
|
||||
__Unused60: 'Null',
|
||||
__Unused61: 'Null',
|
||||
__Unused62: 'Null',
|
||||
__Unused63: 'Null',
|
||||
__Unused64: 'Null',
|
||||
__Unused65: 'Null',
|
||||
__Unused66: 'Null',
|
||||
__Unused67: 'Null',
|
||||
__Unused68: 'Null',
|
||||
__Unused69: 'Null',
|
||||
StateTrieMigration: 'PalletStateTrieMigrationError'
|
||||
}
|
||||
}
|
||||
};
|
||||
@@ -0,0 +1,596 @@
|
||||
// Auto-generated via `yarn polkadot-types-from-defs`, do not edit
|
||||
/* eslint-disable */
|
||||
|
||||
/* eslint-disable sort-keys */
|
||||
|
||||
export default {
|
||||
/**
|
||||
* Lookup32: cumulus_pallet_parachain_system::pallet::Event<T>
|
||||
**/
|
||||
CumulusPalletParachainSystemEvent: {
|
||||
_enum: {
|
||||
ValidationFunctionStored: 'Null',
|
||||
ValidationFunctionApplied: {
|
||||
relayChainBlockNum: 'u32',
|
||||
},
|
||||
ValidationFunctionDiscarded: 'Null',
|
||||
DownwardMessagesReceived: {
|
||||
count: 'u32',
|
||||
},
|
||||
DownwardMessagesProcessed: {
|
||||
weightUsed: 'SpWeightsWeightV2Weight',
|
||||
dmqHead: 'H256',
|
||||
},
|
||||
UpwardMessageSent: {
|
||||
messageHash: 'Option<[u8;32]>'
|
||||
}
|
||||
}
|
||||
},
|
||||
/**
|
||||
* Lookup57: pallet_collator_selection::pallet::Event<T>
|
||||
**/
|
||||
PalletCollatorSelectionEvent: {
|
||||
_enum: {
|
||||
NewInvulnerables: {
|
||||
invulnerables: 'Vec<AccountId32>',
|
||||
},
|
||||
InvulnerableAdded: {
|
||||
accountId: 'AccountId32',
|
||||
},
|
||||
InvulnerableRemoved: {
|
||||
accountId: 'AccountId32',
|
||||
},
|
||||
NewDesiredCandidates: {
|
||||
desiredCandidates: 'u32',
|
||||
},
|
||||
NewCandidacyBond: {
|
||||
bondAmount: 'u128',
|
||||
},
|
||||
CandidateAdded: {
|
||||
accountId: 'AccountId32',
|
||||
deposit: 'u128',
|
||||
},
|
||||
CandidateBondUpdated: {
|
||||
accountId: 'AccountId32',
|
||||
deposit: 'u128',
|
||||
},
|
||||
CandidateRemoved: {
|
||||
accountId: 'AccountId32',
|
||||
},
|
||||
CandidateReplaced: {
|
||||
_alias: {
|
||||
new_: 'new',
|
||||
},
|
||||
old: 'AccountId32',
|
||||
new_: 'AccountId32',
|
||||
deposit: 'u128',
|
||||
},
|
||||
InvalidInvulnerableSkipped: {
|
||||
accountId: 'AccountId32'
|
||||
}
|
||||
}
|
||||
},
|
||||
/**
|
||||
* Lookup60: cumulus_pallet_xcmp_queue::pallet::Event<T>
|
||||
**/
|
||||
CumulusPalletXcmpQueueEvent: {
|
||||
_enum: {
|
||||
XcmpMessageSent: {
|
||||
messageHash: '[u8;32]'
|
||||
}
|
||||
}
|
||||
},
|
||||
/**
|
||||
* Lookup133: cumulus_pallet_xcm::pallet::Event<T>
|
||||
**/
|
||||
CumulusPalletXcmEvent: {
|
||||
_enum: {
|
||||
InvalidFormat: '[u8;32]',
|
||||
UnsupportedVersion: '[u8;32]',
|
||||
ExecutedDownward: '([u8;32],StagingXcmV5TraitsOutcome)'
|
||||
}
|
||||
},
|
||||
/**
|
||||
* Lookup134: pallet_xcm_bridge_hub_router::pallet::Event<T, I>
|
||||
**/
|
||||
PalletXcmBridgeHubRouterEvent: {
|
||||
_enum: {
|
||||
DeliveryFeeFactorDecreased: {
|
||||
newValue: 'u128',
|
||||
},
|
||||
DeliveryFeeFactorIncreased: {
|
||||
newValue: 'u128'
|
||||
}
|
||||
}
|
||||
},
|
||||
/**
|
||||
* Lookup137: cumulus_primitives_core::AggregateMessageOrigin
|
||||
**/
|
||||
CumulusPrimitivesCoreAggregateMessageOrigin: {
|
||||
_enum: {
|
||||
Here: 'Null',
|
||||
Parent: 'Null',
|
||||
Sibling: 'u32'
|
||||
}
|
||||
},
|
||||
/**
|
||||
* Lookup146: asset_hub_polkadot_runtime::ProxyType
|
||||
**/
|
||||
AssetHubPolkadotRuntimeProxyType: {
|
||||
_enum: ['Any', 'NonTransfer', 'CancelProxy', 'Assets', 'AssetOwner', 'AssetManager', 'Collator']
|
||||
},
|
||||
/**
|
||||
* Lookup197: cumulus_pallet_parachain_system::unincluded_segment::Ancestor<primitive_types::H256>
|
||||
**/
|
||||
CumulusPalletParachainSystemUnincludedSegmentAncestor: {
|
||||
usedBandwidth: 'CumulusPalletParachainSystemUnincludedSegmentUsedBandwidth',
|
||||
paraHeadHash: 'Option<H256>',
|
||||
consumedGoAheadSignal: 'Option<PolkadotPrimitivesV8UpgradeGoAhead>'
|
||||
},
|
||||
/**
|
||||
* Lookup198: cumulus_pallet_parachain_system::unincluded_segment::UsedBandwidth
|
||||
**/
|
||||
CumulusPalletParachainSystemUnincludedSegmentUsedBandwidth: {
|
||||
umpMsgCount: 'u32',
|
||||
umpTotalBytes: 'u32',
|
||||
hrmpOutgoing: 'BTreeMap<u32, CumulusPalletParachainSystemUnincludedSegmentHrmpChannelUpdate>'
|
||||
},
|
||||
/**
|
||||
* Lookup200: cumulus_pallet_parachain_system::unincluded_segment::HrmpChannelUpdate
|
||||
**/
|
||||
CumulusPalletParachainSystemUnincludedSegmentHrmpChannelUpdate: {
|
||||
msgCount: 'u32',
|
||||
totalBytes: 'u32'
|
||||
},
|
||||
/**
|
||||
* Lookup206: cumulus_pallet_parachain_system::unincluded_segment::SegmentTracker<primitive_types::H256>
|
||||
**/
|
||||
CumulusPalletParachainSystemUnincludedSegmentSegmentTracker: {
|
||||
usedBandwidth: 'CumulusPalletParachainSystemUnincludedSegmentUsedBandwidth',
|
||||
hrmpWatermark: 'Option<u32>',
|
||||
consumedGoAheadSignal: 'Option<PolkadotPrimitivesV8UpgradeGoAhead>'
|
||||
},
|
||||
/**
|
||||
* Lookup211: sp_trie::storage_proof::StorageProof
|
||||
**/
|
||||
SpTrieStorageProof: {
|
||||
trieNodes: 'BTreeSet<Bytes>'
|
||||
},
|
||||
/**
|
||||
* Lookup213: cumulus_pallet_parachain_system::relay_state_snapshot::MessagingStateSnapshot
|
||||
**/
|
||||
CumulusPalletParachainSystemRelayStateSnapshotMessagingStateSnapshot: {
|
||||
dmqMqcHead: 'H256',
|
||||
relayDispatchQueueRemainingCapacity: 'CumulusPalletParachainSystemRelayStateSnapshotRelayDispatchQueueRemainingCapacity',
|
||||
ingressChannels: 'Vec<(u32,PolkadotPrimitivesV8AbridgedHrmpChannel)>',
|
||||
egressChannels: 'Vec<(u32,PolkadotPrimitivesV8AbridgedHrmpChannel)>'
|
||||
},
|
||||
/**
|
||||
* Lookup214: cumulus_pallet_parachain_system::relay_state_snapshot::RelayDispatchQueueRemainingCapacity
|
||||
**/
|
||||
CumulusPalletParachainSystemRelayStateSnapshotRelayDispatchQueueRemainingCapacity: {
|
||||
remainingCount: 'u32',
|
||||
remainingSize: 'u32'
|
||||
},
|
||||
/**
|
||||
* Lookup217: polkadot_primitives::v8::AbridgedHrmpChannel
|
||||
**/
|
||||
PolkadotPrimitivesV8AbridgedHrmpChannel: {
|
||||
maxCapacity: 'u32',
|
||||
maxTotalSize: 'u32',
|
||||
maxMessageSize: 'u32',
|
||||
msgCount: 'u32',
|
||||
totalSize: 'u32',
|
||||
mqcHead: 'Option<H256>'
|
||||
},
|
||||
/**
|
||||
* Lookup218: polkadot_primitives::v8::AbridgedHostConfiguration
|
||||
**/
|
||||
PolkadotPrimitivesV8AbridgedHostConfiguration: {
|
||||
maxCodeSize: 'u32',
|
||||
maxHeadDataSize: 'u32',
|
||||
maxUpwardQueueCount: 'u32',
|
||||
maxUpwardQueueSize: 'u32',
|
||||
maxUpwardMessageSize: 'u32',
|
||||
maxUpwardMessageNumPerCandidate: 'u32',
|
||||
hrmpMaxMessageNumPerCandidate: 'u32',
|
||||
validationUpgradeCooldown: 'u32',
|
||||
validationUpgradeDelay: 'u32',
|
||||
asyncBackingParams: 'PolkadotPrimitivesV8AsyncBackingAsyncBackingParams'
|
||||
},
|
||||
/**
|
||||
* Lookup226: cumulus_pallet_parachain_system::pallet::Call<T>
|
||||
**/
|
||||
CumulusPalletParachainSystemCall: {
|
||||
_enum: {
|
||||
set_validation_data: {
|
||||
data: 'CumulusPrimitivesParachainInherentParachainInherentData',
|
||||
},
|
||||
sudo_send_upward_message: {
|
||||
message: 'Bytes'
|
||||
}
|
||||
}
|
||||
},
|
||||
/**
|
||||
* Lookup227: cumulus_primitives_parachain_inherent::ParachainInherentData
|
||||
**/
|
||||
CumulusPrimitivesParachainInherentParachainInherentData: {
|
||||
validationData: 'PolkadotPrimitivesV8PersistedValidationData',
|
||||
relayChainState: 'SpTrieStorageProof',
|
||||
downwardMessages: 'Vec<PolkadotCorePrimitivesInboundDownwardMessage>',
|
||||
horizontalMessages: 'BTreeMap<u32, Vec<PolkadotCorePrimitivesInboundHrmpMessage>>'
|
||||
},
|
||||
/**
|
||||
* Lookup235: cumulus_pallet_parachain_system::pallet::Error<T>
|
||||
**/
|
||||
CumulusPalletParachainSystemError: {
|
||||
_enum: ['OverlappingUpgrades', 'ProhibitedByPolkadot', 'TooBig', 'ValidationDataNotAvailable', 'HostConfigurationNotAvailable', 'NotScheduled', 'NothingAuthorized', 'Unauthorized']
|
||||
},
|
||||
/**
|
||||
* Lookup237: staging_parachain_info::pallet::Call<T>
|
||||
**/
|
||||
StagingParachainInfoCall: 'Null',
|
||||
/**
|
||||
* Lookup247: asset_hub_polkadot_runtime::RuntimeHoldReason
|
||||
**/
|
||||
AssetHubPolkadotRuntimeRuntimeHoldReason: {
|
||||
_enum: {
|
||||
__Unused0: 'Null',
|
||||
__Unused1: 'Null',
|
||||
__Unused2: 'Null',
|
||||
__Unused3: 'Null',
|
||||
__Unused4: 'Null',
|
||||
__Unused5: 'Null',
|
||||
__Unused6: 'Null',
|
||||
__Unused7: 'Null',
|
||||
__Unused8: 'Null',
|
||||
__Unused9: 'Null',
|
||||
__Unused10: 'Null',
|
||||
__Unused11: 'Null',
|
||||
__Unused12: 'Null',
|
||||
__Unused13: 'Null',
|
||||
__Unused14: 'Null',
|
||||
__Unused15: 'Null',
|
||||
__Unused16: 'Null',
|
||||
__Unused17: 'Null',
|
||||
__Unused18: 'Null',
|
||||
__Unused19: 'Null',
|
||||
__Unused20: 'Null',
|
||||
__Unused21: 'Null',
|
||||
__Unused22: 'Null',
|
||||
__Unused23: 'Null',
|
||||
__Unused24: 'Null',
|
||||
__Unused25: 'Null',
|
||||
__Unused26: 'Null',
|
||||
__Unused27: 'Null',
|
||||
__Unused28: 'Null',
|
||||
__Unused29: 'Null',
|
||||
__Unused30: 'Null',
|
||||
__Unused31: 'Null',
|
||||
__Unused32: 'Null',
|
||||
__Unused33: 'Null',
|
||||
__Unused34: 'Null',
|
||||
__Unused35: 'Null',
|
||||
__Unused36: 'Null',
|
||||
__Unused37: 'Null',
|
||||
__Unused38: 'Null',
|
||||
__Unused39: 'Null',
|
||||
__Unused40: 'Null',
|
||||
__Unused41: 'Null',
|
||||
__Unused42: 'Null',
|
||||
__Unused43: 'Null',
|
||||
__Unused44: 'Null',
|
||||
__Unused45: 'Null',
|
||||
__Unused46: 'Null',
|
||||
__Unused47: 'Null',
|
||||
__Unused48: 'Null',
|
||||
__Unused49: 'Null',
|
||||
__Unused50: 'Null',
|
||||
__Unused51: 'Null',
|
||||
__Unused52: 'Null',
|
||||
__Unused53: 'Null',
|
||||
__Unused54: 'Null',
|
||||
__Unused55: 'Null',
|
||||
__Unused56: 'Null',
|
||||
__Unused57: 'Null',
|
||||
__Unused58: 'Null',
|
||||
__Unused59: 'Null',
|
||||
__Unused60: 'Null',
|
||||
__Unused61: 'Null',
|
||||
__Unused62: 'Null',
|
||||
__Unused63: 'Null',
|
||||
__Unused64: 'Null',
|
||||
__Unused65: 'Null',
|
||||
__Unused66: 'Null',
|
||||
__Unused67: 'Null',
|
||||
__Unused68: 'Null',
|
||||
__Unused69: 'Null',
|
||||
StateTrieMigration: 'PalletStateTrieMigrationHoldReason'
|
||||
}
|
||||
},
|
||||
/**
|
||||
* Lookup267: pallet_collator_selection::pallet::CandidateInfo<sp_core::crypto::AccountId32, Balance>
|
||||
**/
|
||||
PalletCollatorSelectionCandidateInfo: {
|
||||
who: 'AccountId32',
|
||||
deposit: 'u128'
|
||||
},
|
||||
/**
|
||||
* Lookup269: pallet_collator_selection::pallet::Call<T>
|
||||
**/
|
||||
PalletCollatorSelectionCall: {
|
||||
_enum: {
|
||||
set_invulnerables: {
|
||||
_alias: {
|
||||
new_: 'new',
|
||||
},
|
||||
new_: 'Vec<AccountId32>',
|
||||
},
|
||||
set_desired_candidates: {
|
||||
max: 'u32',
|
||||
},
|
||||
set_candidacy_bond: {
|
||||
bond: 'u128',
|
||||
},
|
||||
register_as_candidate: 'Null',
|
||||
leave_intent: 'Null',
|
||||
add_invulnerable: {
|
||||
who: 'AccountId32',
|
||||
},
|
||||
remove_invulnerable: {
|
||||
who: 'AccountId32',
|
||||
},
|
||||
update_bond: {
|
||||
newDeposit: 'u128',
|
||||
},
|
||||
take_candidate_slot: {
|
||||
deposit: 'u128',
|
||||
target: 'AccountId32'
|
||||
}
|
||||
}
|
||||
},
|
||||
/**
|
||||
* Lookup270: pallet_collator_selection::pallet::Error<T>
|
||||
**/
|
||||
PalletCollatorSelectionError: {
|
||||
_enum: ['TooManyCandidates', 'TooFewEligibleCollators', 'AlreadyCandidate', 'NotCandidate', 'TooManyInvulnerables', 'AlreadyInvulnerable', 'NotInvulnerable', 'NoAssociatedValidatorId', 'ValidatorNotRegistered', 'InsertToCandidateListFailed', 'RemoveFromCandidateListFailed', 'DepositTooLow', 'UpdateCandidateListFailed', 'InsufficientBond', 'TargetIsNotCandidate', 'IdenticalDeposit', 'InvalidUnreserve']
|
||||
},
|
||||
/**
|
||||
* Lookup273: asset_hub_polkadot_runtime::SessionKeys
|
||||
**/
|
||||
AssetHubPolkadotRuntimeSessionKeys: {
|
||||
aura: 'SpConsensusAuraEd25519AppEd25519Public'
|
||||
},
|
||||
/**
|
||||
* Lookup274: sp_consensus_aura::ed25519::app_ed25519::Public
|
||||
**/
|
||||
SpConsensusAuraEd25519AppEd25519Public: '[u8;32]',
|
||||
/**
|
||||
* Lookup287: cumulus_pallet_xcmp_queue::OutboundChannelDetails
|
||||
**/
|
||||
CumulusPalletXcmpQueueOutboundChannelDetails: {
|
||||
recipient: 'u32',
|
||||
state: 'CumulusPalletXcmpQueueOutboundState',
|
||||
signalsExist: 'bool',
|
||||
firstIndex: 'u16',
|
||||
lastIndex: 'u16'
|
||||
},
|
||||
/**
|
||||
* Lookup288: cumulus_pallet_xcmp_queue::OutboundState
|
||||
**/
|
||||
CumulusPalletXcmpQueueOutboundState: {
|
||||
_enum: ['Ok', 'Suspended']
|
||||
},
|
||||
/**
|
||||
* Lookup292: cumulus_pallet_xcmp_queue::QueueConfigData
|
||||
**/
|
||||
CumulusPalletXcmpQueueQueueConfigData: {
|
||||
suspendThreshold: 'u32',
|
||||
dropThreshold: 'u32',
|
||||
resumeThreshold: 'u32'
|
||||
},
|
||||
/**
|
||||
* Lookup293: cumulus_pallet_xcmp_queue::pallet::Call<T>
|
||||
**/
|
||||
CumulusPalletXcmpQueueCall: {
|
||||
_enum: {
|
||||
__Unused0: 'Null',
|
||||
suspend_xcm_execution: 'Null',
|
||||
resume_xcm_execution: 'Null',
|
||||
update_suspend_threshold: {
|
||||
_alias: {
|
||||
new_: 'new',
|
||||
},
|
||||
new_: 'u32',
|
||||
},
|
||||
update_drop_threshold: {
|
||||
_alias: {
|
||||
new_: 'new',
|
||||
},
|
||||
new_: 'u32',
|
||||
},
|
||||
update_resume_threshold: {
|
||||
_alias: {
|
||||
new_: 'new',
|
||||
},
|
||||
new_: 'u32'
|
||||
}
|
||||
}
|
||||
},
|
||||
/**
|
||||
* Lookup294: cumulus_pallet_xcmp_queue::pallet::Error<T>
|
||||
**/
|
||||
CumulusPalletXcmpQueueError: {
|
||||
_enum: ['BadQueueConfig', 'AlreadySuspended', 'AlreadyResumed', 'TooManyActiveOutboundChannels', 'TooBig']
|
||||
},
|
||||
/**
|
||||
* Lookup360: cumulus_pallet_xcm::pallet::Call<T>
|
||||
**/
|
||||
CumulusPalletXcmCall: 'Null',
|
||||
/**
|
||||
* Lookup361: bp_xcm_bridge_hub_router::BridgeState
|
||||
**/
|
||||
BpXcmBridgeHubRouterBridgeState: {
|
||||
deliveryFeeFactor: 'u128',
|
||||
isCongested: 'bool'
|
||||
},
|
||||
/**
|
||||
* Lookup362: pallet_xcm_bridge_hub_router::pallet::Call<T, I>
|
||||
**/
|
||||
PalletXcmBridgeHubRouterCall: {
|
||||
_enum: {
|
||||
report_bridge_status: {
|
||||
bridgeId: 'H256',
|
||||
isCongested: 'bool'
|
||||
}
|
||||
}
|
||||
},
|
||||
/**
|
||||
* Lookup414: asset_hub_polkadot_runtime::OriginCaller
|
||||
**/
|
||||
AssetHubPolkadotRuntimeOriginCaller: {
|
||||
_enum: {
|
||||
system: 'FrameSupportDispatchRawOrigin',
|
||||
__Unused1: 'Null',
|
||||
__Unused2: 'Null',
|
||||
__Unused3: 'Null',
|
||||
__Unused4: 'Null',
|
||||
__Unused5: 'Null',
|
||||
__Unused6: 'Null',
|
||||
__Unused7: 'Null',
|
||||
__Unused8: 'Null',
|
||||
__Unused9: 'Null',
|
||||
__Unused10: 'Null',
|
||||
__Unused11: 'Null',
|
||||
__Unused12: 'Null',
|
||||
__Unused13: 'Null',
|
||||
__Unused14: 'Null',
|
||||
__Unused15: 'Null',
|
||||
__Unused16: 'Null',
|
||||
__Unused17: 'Null',
|
||||
__Unused18: 'Null',
|
||||
__Unused19: 'Null',
|
||||
__Unused20: 'Null',
|
||||
__Unused21: 'Null',
|
||||
__Unused22: 'Null',
|
||||
__Unused23: 'Null',
|
||||
__Unused24: 'Null',
|
||||
__Unused25: 'Null',
|
||||
__Unused26: 'Null',
|
||||
__Unused27: 'Null',
|
||||
__Unused28: 'Null',
|
||||
__Unused29: 'Null',
|
||||
__Unused30: 'Null',
|
||||
PolkadotXcm: 'PalletXcmOrigin',
|
||||
CumulusXcm: 'CumulusPalletXcmOrigin'
|
||||
}
|
||||
},
|
||||
/**
|
||||
* Lookup417: cumulus_pallet_xcm::pallet::Origin
|
||||
**/
|
||||
CumulusPalletXcmOrigin: {
|
||||
_enum: {
|
||||
Relay: 'Null',
|
||||
SiblingParachain: 'u32'
|
||||
}
|
||||
},
|
||||
/**
|
||||
* Lookup497: asset_hub_polkadot_runtime::Runtime
|
||||
**/
|
||||
AssetHubPolkadotRuntimeRuntime: 'Null',
|
||||
/**
|
||||
* Lookup547: assets_common::runtime_api::FungiblesAccessError
|
||||
**/
|
||||
AssetsCommonRuntimeApiFungiblesAccessError: {
|
||||
_enum: ['AssetIdConversionFailed', 'AmountToBalanceConversionFailed']
|
||||
},
|
||||
/**
|
||||
* Lookup548: cumulus_primitives_core::CollationInfo
|
||||
**/
|
||||
CumulusPrimitivesCoreCollationInfo: {
|
||||
upwardMessages: 'Vec<Bytes>',
|
||||
horizontalMessages: 'Vec<PolkadotCorePrimitivesOutboundHrmpMessage>',
|
||||
newValidationCode: 'Option<Bytes>',
|
||||
processedDownwardMessages: 'u32',
|
||||
hrmpWatermark: 'u32',
|
||||
headData: 'Bytes'
|
||||
},
|
||||
/**
|
||||
* Lookup556: asset_hub_polkadot_runtime::RuntimeError
|
||||
**/
|
||||
AssetHubPolkadotRuntimeRuntimeError: {
|
||||
_enum: {
|
||||
System: 'FrameSystemError',
|
||||
ParachainSystem: 'CumulusPalletParachainSystemError',
|
||||
__Unused2: 'Null',
|
||||
__Unused3: 'Null',
|
||||
__Unused4: 'Null',
|
||||
__Unused5: 'Null',
|
||||
__Unused6: 'Null',
|
||||
__Unused7: 'Null',
|
||||
__Unused8: 'Null',
|
||||
__Unused9: 'Null',
|
||||
Balances: 'PalletBalancesError',
|
||||
__Unused11: 'Null',
|
||||
__Unused12: 'Null',
|
||||
__Unused13: 'Null',
|
||||
Vesting: 'PalletVestingError',
|
||||
__Unused15: 'Null',
|
||||
__Unused16: 'Null',
|
||||
__Unused17: 'Null',
|
||||
__Unused18: 'Null',
|
||||
__Unused19: 'Null',
|
||||
__Unused20: 'Null',
|
||||
CollatorSelection: 'PalletCollatorSelectionError',
|
||||
Session: 'PalletSessionError',
|
||||
__Unused23: 'Null',
|
||||
__Unused24: 'Null',
|
||||
__Unused25: 'Null',
|
||||
__Unused26: 'Null',
|
||||
__Unused27: 'Null',
|
||||
__Unused28: 'Null',
|
||||
__Unused29: 'Null',
|
||||
XcmpQueue: 'CumulusPalletXcmpQueueError',
|
||||
PolkadotXcm: 'PalletXcmError',
|
||||
__Unused32: 'Null',
|
||||
__Unused33: 'Null',
|
||||
__Unused34: 'Null',
|
||||
MessageQueue: 'PalletMessageQueueError',
|
||||
__Unused36: 'Null',
|
||||
__Unused37: 'Null',
|
||||
__Unused38: 'Null',
|
||||
__Unused39: 'Null',
|
||||
Utility: 'PalletUtilityError',
|
||||
Multisig: 'PalletMultisigError',
|
||||
Proxy: 'PalletProxyError',
|
||||
__Unused43: 'Null',
|
||||
__Unused44: 'Null',
|
||||
__Unused45: 'Null',
|
||||
__Unused46: 'Null',
|
||||
__Unused47: 'Null',
|
||||
__Unused48: 'Null',
|
||||
__Unused49: 'Null',
|
||||
Assets: 'PalletAssetsError',
|
||||
Uniques: 'PalletUniquesError',
|
||||
Nfts: 'PalletNftsError',
|
||||
ForeignAssets: 'PalletAssetsError',
|
||||
PoolAssets: 'PalletAssetsError',
|
||||
AssetConversion: 'PalletAssetConversionError',
|
||||
__Unused56: 'Null',
|
||||
__Unused57: 'Null',
|
||||
__Unused58: 'Null',
|
||||
__Unused59: 'Null',
|
||||
__Unused60: 'Null',
|
||||
__Unused61: 'Null',
|
||||
__Unused62: 'Null',
|
||||
__Unused63: 'Null',
|
||||
__Unused64: 'Null',
|
||||
__Unused65: 'Null',
|
||||
__Unused66: 'Null',
|
||||
__Unused67: 'Null',
|
||||
__Unused68: 'Null',
|
||||
__Unused69: 'Null',
|
||||
StateTrieMigration: 'PalletStateTrieMigrationError'
|
||||
}
|
||||
}
|
||||
};
|
||||
@@ -5,6 +5,8 @@ import type { Definitions } from '@polkadot/types/types';
|
||||
|
||||
import { objectSpread } from '@polkadot/util';
|
||||
|
||||
import assetHubKusama from './assetHubKusama.js';
|
||||
import assetHubPolkadot from './assetHubPolkadot.js';
|
||||
import kusama from './kusama.js';
|
||||
import polkadot from './polkadot.js';
|
||||
import substrate from './substrate.js';
|
||||
@@ -13,5 +15,5 @@ export default {
|
||||
rpc: {},
|
||||
// Not 100% sure it is relevant, however the order here is the same
|
||||
// as exposed in the typegen lookup order
|
||||
types: objectSpread({}, substrate, polkadot, kusama)
|
||||
types: objectSpread({}, substrate, polkadot, kusama, assetHubPolkadot, assetHubKusama)
|
||||
} as Definitions;
|
||||
|
||||
@@ -0,0 +1,146 @@
|
||||
// Auto-generated via `yarn polkadot-types-from-defs`, do not edit
|
||||
/* eslint-disable */
|
||||
|
||||
// import type lookup before we augment - in some environments
|
||||
// this is required to allow for ambient/previous definitions
|
||||
import '@polkadot/types/lookup';
|
||||
|
||||
import type { Bytes, Enum, Null, Option, Struct, U8aFixed, Vec, u32 } from '@polkadot/types-codec';
|
||||
import type { Call, MultiAddress } from '@polkadot/types/interfaces/runtime';
|
||||
|
||||
declare module '@polkadot/types/lookup' {
|
||||
/** @name AssetHubKusamaRuntimeProxyType (146) */
|
||||
interface AssetHubKusamaRuntimeProxyType extends Enum {
|
||||
readonly isAny: boolean;
|
||||
readonly isNonTransfer: boolean;
|
||||
readonly isCancelProxy: boolean;
|
||||
readonly isAssets: boolean;
|
||||
readonly isAssetOwner: boolean;
|
||||
readonly isAssetManager: boolean;
|
||||
readonly isCollator: boolean;
|
||||
readonly type: 'Any' | 'NonTransfer' | 'CancelProxy' | 'Assets' | 'AssetOwner' | 'AssetManager' | 'Collator';
|
||||
}
|
||||
|
||||
/** @name AssetHubKusamaRuntimeRuntimeHoldReason (248) */
|
||||
interface AssetHubKusamaRuntimeRuntimeHoldReason extends Enum {
|
||||
readonly isNftFractionalization: boolean;
|
||||
readonly asNftFractionalization: PalletNftFractionalizationHoldReason;
|
||||
readonly isStateTrieMigration: boolean;
|
||||
readonly asStateTrieMigration: PalletStateTrieMigrationHoldReason;
|
||||
readonly type: 'NftFractionalization' | 'StateTrieMigration';
|
||||
}
|
||||
|
||||
/** @name AssetHubKusamaRuntimeSessionKeys (275) */
|
||||
interface AssetHubKusamaRuntimeSessionKeys extends Struct {
|
||||
readonly aura: SpConsensusAuraSr25519AppSr25519Public;
|
||||
}
|
||||
|
||||
/** @name SpConsensusAuraSr25519AppSr25519Public (276) */
|
||||
interface SpConsensusAuraSr25519AppSr25519Public extends U8aFixed {}
|
||||
|
||||
/** @name PalletRemoteProxyCall (380) */
|
||||
interface PalletRemoteProxyCall extends Enum {
|
||||
readonly isRemoteProxy: boolean;
|
||||
readonly asRemoteProxy: {
|
||||
readonly real: MultiAddress;
|
||||
readonly forceProxyType: Option<AssetHubKusamaRuntimeProxyType>;
|
||||
readonly call: Call;
|
||||
readonly proof: PalletRemoteProxyRemoteProxyProof;
|
||||
} & Struct;
|
||||
readonly isRegisterRemoteProxyProof: boolean;
|
||||
readonly asRegisterRemoteProxyProof: {
|
||||
readonly proof: PalletRemoteProxyRemoteProxyProof;
|
||||
} & Struct;
|
||||
readonly isRemoteProxyWithRegisteredProof: boolean;
|
||||
readonly asRemoteProxyWithRegisteredProof: {
|
||||
readonly real: MultiAddress;
|
||||
readonly forceProxyType: Option<AssetHubKusamaRuntimeProxyType>;
|
||||
readonly call: Call;
|
||||
} & Struct;
|
||||
readonly type: 'RemoteProxy' | 'RegisterRemoteProxyProof' | 'RemoteProxyWithRegisteredProof';
|
||||
}
|
||||
|
||||
/** @name PalletRemoteProxyRemoteProxyProof (381) */
|
||||
interface PalletRemoteProxyRemoteProxyProof extends Enum {
|
||||
readonly isRelayChain: boolean;
|
||||
readonly asRelayChain: {
|
||||
readonly proof: Vec<Bytes>;
|
||||
readonly block: u32;
|
||||
} & Struct;
|
||||
readonly type: 'RelayChain';
|
||||
}
|
||||
|
||||
/** @name AssetHubKusamaRuntimeOriginCaller (419) */
|
||||
interface AssetHubKusamaRuntimeOriginCaller extends Enum {
|
||||
readonly isSystem: boolean;
|
||||
readonly asSystem: FrameSupportDispatchRawOrigin;
|
||||
readonly isPolkadotXcm: boolean;
|
||||
readonly asPolkadotXcm: PalletXcmOrigin;
|
||||
readonly isCumulusXcm: boolean;
|
||||
readonly asCumulusXcm: CumulusPalletXcmOrigin;
|
||||
readonly type: 'System' | 'PolkadotXcm' | 'CumulusXcm';
|
||||
}
|
||||
|
||||
/** @name PalletRemoteProxyError (440) */
|
||||
interface PalletRemoteProxyError extends Enum {
|
||||
readonly isCouldNotConvertLocalToRemoteAccountId: boolean;
|
||||
readonly isUnknownProofAnchorBlock: boolean;
|
||||
readonly isInvalidProof: boolean;
|
||||
readonly isProxyDefinitionDecodingFailed: boolean;
|
||||
readonly isUnannounced: boolean;
|
||||
readonly isDidNotFindMatchingProxyDefinition: boolean;
|
||||
readonly isProxyProofNotRegistered: boolean;
|
||||
readonly type: 'CouldNotConvertLocalToRemoteAccountId' | 'UnknownProofAnchorBlock' | 'InvalidProof' | 'ProxyDefinitionDecodingFailed' | 'Unannounced' | 'DidNotFindMatchingProxyDefinition' | 'ProxyProofNotRegistered';
|
||||
}
|
||||
|
||||
/** @name AssetHubKusamaRuntimeRuntime (508) */
|
||||
type AssetHubKusamaRuntimeRuntime = Null;
|
||||
|
||||
/** @name AssetHubKusamaRuntimeRuntimeError (567) */
|
||||
interface AssetHubKusamaRuntimeRuntimeError extends Enum {
|
||||
readonly isSystem: boolean;
|
||||
readonly asSystem: FrameSystemError;
|
||||
readonly isParachainSystem: boolean;
|
||||
readonly asParachainSystem: CumulusPalletParachainSystemError;
|
||||
readonly isBalances: boolean;
|
||||
readonly asBalances: PalletBalancesError;
|
||||
readonly isVesting: boolean;
|
||||
readonly asVesting: PalletVestingError;
|
||||
readonly isCollatorSelection: boolean;
|
||||
readonly asCollatorSelection: PalletCollatorSelectionError;
|
||||
readonly isSession: boolean;
|
||||
readonly asSession: PalletSessionError;
|
||||
readonly isXcmpQueue: boolean;
|
||||
readonly asXcmpQueue: CumulusPalletXcmpQueueError;
|
||||
readonly isPolkadotXcm: boolean;
|
||||
readonly asPolkadotXcm: PalletXcmError;
|
||||
readonly isMessageQueue: boolean;
|
||||
readonly asMessageQueue: PalletMessageQueueError;
|
||||
readonly isUtility: boolean;
|
||||
readonly asUtility: PalletUtilityError;
|
||||
readonly isMultisig: boolean;
|
||||
readonly asMultisig: PalletMultisigError;
|
||||
readonly isProxy: boolean;
|
||||
readonly asProxy: PalletProxyError;
|
||||
readonly isRemoteProxyRelayChain: boolean;
|
||||
readonly asRemoteProxyRelayChain: PalletRemoteProxyError;
|
||||
readonly isAssets: boolean;
|
||||
readonly asAssets: PalletAssetsError;
|
||||
readonly isUniques: boolean;
|
||||
readonly asUniques: PalletUniquesError;
|
||||
readonly isNfts: boolean;
|
||||
readonly asNfts: PalletNftsError;
|
||||
readonly isForeignAssets: boolean;
|
||||
readonly asForeignAssets: PalletAssetsError;
|
||||
readonly isNftFractionalization: boolean;
|
||||
readonly asNftFractionalization: PalletNftFractionalizationError;
|
||||
readonly isPoolAssets: boolean;
|
||||
readonly asPoolAssets: PalletAssetsError;
|
||||
readonly isAssetConversion: boolean;
|
||||
readonly asAssetConversion: PalletAssetConversionError;
|
||||
readonly isStateTrieMigration: boolean;
|
||||
readonly asStateTrieMigration: PalletStateTrieMigrationError;
|
||||
readonly type: 'System' | 'ParachainSystem' | 'Balances' | 'Vesting' | 'CollatorSelection' | 'Session' | 'XcmpQueue' | 'PolkadotXcm' | 'MessageQueue' | 'Utility' | 'Multisig' | 'Proxy' | 'RemoteProxyRelayChain' | 'Assets' | 'Uniques' | 'Nfts' | 'ForeignAssets' | 'NftFractionalization' | 'PoolAssets' | 'AssetConversion' | 'StateTrieMigration';
|
||||
}
|
||||
|
||||
} // declare module
|
||||
@@ -0,0 +1,479 @@
|
||||
// Auto-generated via `yarn polkadot-types-from-defs`, do not edit
|
||||
/* eslint-disable */
|
||||
|
||||
// import type lookup before we augment - in some environments
|
||||
// this is required to allow for ambient/previous definitions
|
||||
import '@polkadot/types/lookup';
|
||||
|
||||
import type { BTreeMap, BTreeSet, Bytes, Enum, Null, Option, Struct, U8aFixed, Vec, bool, u128, u16, u32 } from '@polkadot/types-codec';
|
||||
import type { ITuple } from '@polkadot/types-codec/types';
|
||||
import type { AccountId32, H256 } from '@polkadot/types/interfaces/runtime';
|
||||
|
||||
declare module '@polkadot/types/lookup' {
|
||||
/** @name CumulusPalletParachainSystemEvent (32) */
|
||||
interface CumulusPalletParachainSystemEvent extends Enum {
|
||||
readonly isValidationFunctionStored: boolean;
|
||||
readonly isValidationFunctionApplied: boolean;
|
||||
readonly asValidationFunctionApplied: {
|
||||
readonly relayChainBlockNum: u32;
|
||||
} & Struct;
|
||||
readonly isValidationFunctionDiscarded: boolean;
|
||||
readonly isDownwardMessagesReceived: boolean;
|
||||
readonly asDownwardMessagesReceived: {
|
||||
readonly count: u32;
|
||||
} & Struct;
|
||||
readonly isDownwardMessagesProcessed: boolean;
|
||||
readonly asDownwardMessagesProcessed: {
|
||||
readonly weightUsed: SpWeightsWeightV2Weight;
|
||||
readonly dmqHead: H256;
|
||||
} & Struct;
|
||||
readonly isUpwardMessageSent: boolean;
|
||||
readonly asUpwardMessageSent: {
|
||||
readonly messageHash: Option<U8aFixed>;
|
||||
} & Struct;
|
||||
readonly type: 'ValidationFunctionStored' | 'ValidationFunctionApplied' | 'ValidationFunctionDiscarded' | 'DownwardMessagesReceived' | 'DownwardMessagesProcessed' | 'UpwardMessageSent';
|
||||
}
|
||||
|
||||
/** @name PalletCollatorSelectionEvent (57) */
|
||||
interface PalletCollatorSelectionEvent extends Enum {
|
||||
readonly isNewInvulnerables: boolean;
|
||||
readonly asNewInvulnerables: {
|
||||
readonly invulnerables: Vec<AccountId32>;
|
||||
} & Struct;
|
||||
readonly isInvulnerableAdded: boolean;
|
||||
readonly asInvulnerableAdded: {
|
||||
readonly accountId: AccountId32;
|
||||
} & Struct;
|
||||
readonly isInvulnerableRemoved: boolean;
|
||||
readonly asInvulnerableRemoved: {
|
||||
readonly accountId: AccountId32;
|
||||
} & Struct;
|
||||
readonly isNewDesiredCandidates: boolean;
|
||||
readonly asNewDesiredCandidates: {
|
||||
readonly desiredCandidates: u32;
|
||||
} & Struct;
|
||||
readonly isNewCandidacyBond: boolean;
|
||||
readonly asNewCandidacyBond: {
|
||||
readonly bondAmount: u128;
|
||||
} & Struct;
|
||||
readonly isCandidateAdded: boolean;
|
||||
readonly asCandidateAdded: {
|
||||
readonly accountId: AccountId32;
|
||||
readonly deposit: u128;
|
||||
} & Struct;
|
||||
readonly isCandidateBondUpdated: boolean;
|
||||
readonly asCandidateBondUpdated: {
|
||||
readonly accountId: AccountId32;
|
||||
readonly deposit: u128;
|
||||
} & Struct;
|
||||
readonly isCandidateRemoved: boolean;
|
||||
readonly asCandidateRemoved: {
|
||||
readonly accountId: AccountId32;
|
||||
} & Struct;
|
||||
readonly isCandidateReplaced: boolean;
|
||||
readonly asCandidateReplaced: {
|
||||
readonly old: AccountId32;
|
||||
readonly new_: AccountId32;
|
||||
readonly deposit: u128;
|
||||
} & Struct;
|
||||
readonly isInvalidInvulnerableSkipped: boolean;
|
||||
readonly asInvalidInvulnerableSkipped: {
|
||||
readonly accountId: AccountId32;
|
||||
} & Struct;
|
||||
readonly type: 'NewInvulnerables' | 'InvulnerableAdded' | 'InvulnerableRemoved' | 'NewDesiredCandidates' | 'NewCandidacyBond' | 'CandidateAdded' | 'CandidateBondUpdated' | 'CandidateRemoved' | 'CandidateReplaced' | 'InvalidInvulnerableSkipped';
|
||||
}
|
||||
|
||||
/** @name CumulusPalletXcmpQueueEvent (60) */
|
||||
interface CumulusPalletXcmpQueueEvent extends Enum {
|
||||
readonly isXcmpMessageSent: boolean;
|
||||
readonly asXcmpMessageSent: {
|
||||
readonly messageHash: U8aFixed;
|
||||
} & Struct;
|
||||
readonly type: 'XcmpMessageSent';
|
||||
}
|
||||
|
||||
/** @name CumulusPalletXcmEvent (133) */
|
||||
interface CumulusPalletXcmEvent extends Enum {
|
||||
readonly isInvalidFormat: boolean;
|
||||
readonly asInvalidFormat: U8aFixed;
|
||||
readonly isUnsupportedVersion: boolean;
|
||||
readonly asUnsupportedVersion: U8aFixed;
|
||||
readonly isExecutedDownward: boolean;
|
||||
readonly asExecutedDownward: ITuple<[U8aFixed, StagingXcmV5TraitsOutcome]>;
|
||||
readonly type: 'InvalidFormat' | 'UnsupportedVersion' | 'ExecutedDownward';
|
||||
}
|
||||
|
||||
/** @name PalletXcmBridgeHubRouterEvent (134) */
|
||||
interface PalletXcmBridgeHubRouterEvent extends Enum {
|
||||
readonly isDeliveryFeeFactorDecreased: boolean;
|
||||
readonly asDeliveryFeeFactorDecreased: {
|
||||
readonly newValue: u128;
|
||||
} & Struct;
|
||||
readonly isDeliveryFeeFactorIncreased: boolean;
|
||||
readonly asDeliveryFeeFactorIncreased: {
|
||||
readonly newValue: u128;
|
||||
} & Struct;
|
||||
readonly type: 'DeliveryFeeFactorDecreased' | 'DeliveryFeeFactorIncreased';
|
||||
}
|
||||
|
||||
/** @name CumulusPrimitivesCoreAggregateMessageOrigin (137) */
|
||||
interface CumulusPrimitivesCoreAggregateMessageOrigin extends Enum {
|
||||
readonly isHere: boolean;
|
||||
readonly isParent: boolean;
|
||||
readonly isSibling: boolean;
|
||||
readonly asSibling: u32;
|
||||
readonly type: 'Here' | 'Parent' | 'Sibling';
|
||||
}
|
||||
|
||||
/** @name AssetHubPolkadotRuntimeProxyType (146) */
|
||||
interface AssetHubPolkadotRuntimeProxyType extends Enum {
|
||||
readonly isAny: boolean;
|
||||
readonly isNonTransfer: boolean;
|
||||
readonly isCancelProxy: boolean;
|
||||
readonly isAssets: boolean;
|
||||
readonly isAssetOwner: boolean;
|
||||
readonly isAssetManager: boolean;
|
||||
readonly isCollator: boolean;
|
||||
readonly type: 'Any' | 'NonTransfer' | 'CancelProxy' | 'Assets' | 'AssetOwner' | 'AssetManager' | 'Collator';
|
||||
}
|
||||
|
||||
/** @name CumulusPalletParachainSystemUnincludedSegmentAncestor (197) */
|
||||
interface CumulusPalletParachainSystemUnincludedSegmentAncestor extends Struct {
|
||||
readonly usedBandwidth: CumulusPalletParachainSystemUnincludedSegmentUsedBandwidth;
|
||||
readonly paraHeadHash: Option<H256>;
|
||||
readonly consumedGoAheadSignal: Option<PolkadotPrimitivesV8UpgradeGoAhead>;
|
||||
}
|
||||
|
||||
/** @name CumulusPalletParachainSystemUnincludedSegmentUsedBandwidth (198) */
|
||||
interface CumulusPalletParachainSystemUnincludedSegmentUsedBandwidth extends Struct {
|
||||
readonly umpMsgCount: u32;
|
||||
readonly umpTotalBytes: u32;
|
||||
readonly hrmpOutgoing: BTreeMap<u32, CumulusPalletParachainSystemUnincludedSegmentHrmpChannelUpdate>;
|
||||
}
|
||||
|
||||
/** @name CumulusPalletParachainSystemUnincludedSegmentHrmpChannelUpdate (200) */
|
||||
interface CumulusPalletParachainSystemUnincludedSegmentHrmpChannelUpdate extends Struct {
|
||||
readonly msgCount: u32;
|
||||
readonly totalBytes: u32;
|
||||
}
|
||||
|
||||
/** @name CumulusPalletParachainSystemUnincludedSegmentSegmentTracker (206) */
|
||||
interface CumulusPalletParachainSystemUnincludedSegmentSegmentTracker extends Struct {
|
||||
readonly usedBandwidth: CumulusPalletParachainSystemUnincludedSegmentUsedBandwidth;
|
||||
readonly hrmpWatermark: Option<u32>;
|
||||
readonly consumedGoAheadSignal: Option<PolkadotPrimitivesV8UpgradeGoAhead>;
|
||||
}
|
||||
|
||||
/** @name SpTrieStorageProof (211) */
|
||||
interface SpTrieStorageProof extends Struct {
|
||||
readonly trieNodes: BTreeSet<Bytes>;
|
||||
}
|
||||
|
||||
/** @name CumulusPalletParachainSystemRelayStateSnapshotMessagingStateSnapshot (213) */
|
||||
interface CumulusPalletParachainSystemRelayStateSnapshotMessagingStateSnapshot extends Struct {
|
||||
readonly dmqMqcHead: H256;
|
||||
readonly relayDispatchQueueRemainingCapacity: CumulusPalletParachainSystemRelayStateSnapshotRelayDispatchQueueRemainingCapacity;
|
||||
readonly ingressChannels: Vec<ITuple<[u32, PolkadotPrimitivesV8AbridgedHrmpChannel]>>;
|
||||
readonly egressChannels: Vec<ITuple<[u32, PolkadotPrimitivesV8AbridgedHrmpChannel]>>;
|
||||
}
|
||||
|
||||
/** @name CumulusPalletParachainSystemRelayStateSnapshotRelayDispatchQueueRemainingCapacity (214) */
|
||||
interface CumulusPalletParachainSystemRelayStateSnapshotRelayDispatchQueueRemainingCapacity extends Struct {
|
||||
readonly remainingCount: u32;
|
||||
readonly remainingSize: u32;
|
||||
}
|
||||
|
||||
/** @name PolkadotPrimitivesV8AbridgedHrmpChannel (217) */
|
||||
interface PolkadotPrimitivesV8AbridgedHrmpChannel extends Struct {
|
||||
readonly maxCapacity: u32;
|
||||
readonly maxTotalSize: u32;
|
||||
readonly maxMessageSize: u32;
|
||||
readonly msgCount: u32;
|
||||
readonly totalSize: u32;
|
||||
readonly mqcHead: Option<H256>;
|
||||
}
|
||||
|
||||
/** @name PolkadotPrimitivesV8AbridgedHostConfiguration (218) */
|
||||
interface PolkadotPrimitivesV8AbridgedHostConfiguration extends Struct {
|
||||
readonly maxCodeSize: u32;
|
||||
readonly maxHeadDataSize: u32;
|
||||
readonly maxUpwardQueueCount: u32;
|
||||
readonly maxUpwardQueueSize: u32;
|
||||
readonly maxUpwardMessageSize: u32;
|
||||
readonly maxUpwardMessageNumPerCandidate: u32;
|
||||
readonly hrmpMaxMessageNumPerCandidate: u32;
|
||||
readonly validationUpgradeCooldown: u32;
|
||||
readonly validationUpgradeDelay: u32;
|
||||
readonly asyncBackingParams: PolkadotPrimitivesV8AsyncBackingAsyncBackingParams;
|
||||
}
|
||||
|
||||
/** @name CumulusPalletParachainSystemCall (226) */
|
||||
interface CumulusPalletParachainSystemCall extends Enum {
|
||||
readonly isSetValidationData: boolean;
|
||||
readonly asSetValidationData: {
|
||||
readonly data: CumulusPrimitivesParachainInherentParachainInherentData;
|
||||
} & Struct;
|
||||
readonly isSudoSendUpwardMessage: boolean;
|
||||
readonly asSudoSendUpwardMessage: {
|
||||
readonly message: Bytes;
|
||||
} & Struct;
|
||||
readonly type: 'SetValidationData' | 'SudoSendUpwardMessage';
|
||||
}
|
||||
|
||||
/** @name CumulusPrimitivesParachainInherentParachainInherentData (227) */
|
||||
interface CumulusPrimitivesParachainInherentParachainInherentData extends Struct {
|
||||
readonly validationData: PolkadotPrimitivesV8PersistedValidationData;
|
||||
readonly relayChainState: SpTrieStorageProof;
|
||||
readonly downwardMessages: Vec<PolkadotCorePrimitivesInboundDownwardMessage>;
|
||||
readonly horizontalMessages: BTreeMap<u32, Vec<PolkadotCorePrimitivesInboundHrmpMessage>>;
|
||||
}
|
||||
|
||||
/** @name CumulusPalletParachainSystemError (235) */
|
||||
interface CumulusPalletParachainSystemError extends Enum {
|
||||
readonly isOverlappingUpgrades: boolean;
|
||||
readonly isProhibitedByPolkadot: boolean;
|
||||
readonly isTooBig: boolean;
|
||||
readonly isValidationDataNotAvailable: boolean;
|
||||
readonly isHostConfigurationNotAvailable: boolean;
|
||||
readonly isNotScheduled: boolean;
|
||||
readonly isNothingAuthorized: boolean;
|
||||
readonly isUnauthorized: boolean;
|
||||
readonly type: 'OverlappingUpgrades' | 'ProhibitedByPolkadot' | 'TooBig' | 'ValidationDataNotAvailable' | 'HostConfigurationNotAvailable' | 'NotScheduled' | 'NothingAuthorized' | 'Unauthorized';
|
||||
}
|
||||
|
||||
/** @name StagingParachainInfoCall (237) */
|
||||
type StagingParachainInfoCall = Null;
|
||||
|
||||
/** @name AssetHubPolkadotRuntimeRuntimeHoldReason (247) */
|
||||
interface AssetHubPolkadotRuntimeRuntimeHoldReason extends Enum {
|
||||
readonly isStateTrieMigration: boolean;
|
||||
readonly asStateTrieMigration: PalletStateTrieMigrationHoldReason;
|
||||
readonly type: 'StateTrieMigration';
|
||||
}
|
||||
|
||||
/** @name PalletCollatorSelectionCandidateInfo (267) */
|
||||
interface PalletCollatorSelectionCandidateInfo extends Struct {
|
||||
readonly who: AccountId32;
|
||||
readonly deposit: u128;
|
||||
}
|
||||
|
||||
/** @name PalletCollatorSelectionCall (269) */
|
||||
interface PalletCollatorSelectionCall extends Enum {
|
||||
readonly isSetInvulnerables: boolean;
|
||||
readonly asSetInvulnerables: {
|
||||
readonly new_: Vec<AccountId32>;
|
||||
} & Struct;
|
||||
readonly isSetDesiredCandidates: boolean;
|
||||
readonly asSetDesiredCandidates: {
|
||||
readonly max: u32;
|
||||
} & Struct;
|
||||
readonly isSetCandidacyBond: boolean;
|
||||
readonly asSetCandidacyBond: {
|
||||
readonly bond: u128;
|
||||
} & Struct;
|
||||
readonly isRegisterAsCandidate: boolean;
|
||||
readonly isLeaveIntent: boolean;
|
||||
readonly isAddInvulnerable: boolean;
|
||||
readonly asAddInvulnerable: {
|
||||
readonly who: AccountId32;
|
||||
} & Struct;
|
||||
readonly isRemoveInvulnerable: boolean;
|
||||
readonly asRemoveInvulnerable: {
|
||||
readonly who: AccountId32;
|
||||
} & Struct;
|
||||
readonly isUpdateBond: boolean;
|
||||
readonly asUpdateBond: {
|
||||
readonly newDeposit: u128;
|
||||
} & Struct;
|
||||
readonly isTakeCandidateSlot: boolean;
|
||||
readonly asTakeCandidateSlot: {
|
||||
readonly deposit: u128;
|
||||
readonly target: AccountId32;
|
||||
} & Struct;
|
||||
readonly type: 'SetInvulnerables' | 'SetDesiredCandidates' | 'SetCandidacyBond' | 'RegisterAsCandidate' | 'LeaveIntent' | 'AddInvulnerable' | 'RemoveInvulnerable' | 'UpdateBond' | 'TakeCandidateSlot';
|
||||
}
|
||||
|
||||
/** @name PalletCollatorSelectionError (270) */
|
||||
interface PalletCollatorSelectionError extends Enum {
|
||||
readonly isTooManyCandidates: boolean;
|
||||
readonly isTooFewEligibleCollators: boolean;
|
||||
readonly isAlreadyCandidate: boolean;
|
||||
readonly isNotCandidate: boolean;
|
||||
readonly isTooManyInvulnerables: boolean;
|
||||
readonly isAlreadyInvulnerable: boolean;
|
||||
readonly isNotInvulnerable: boolean;
|
||||
readonly isNoAssociatedValidatorId: boolean;
|
||||
readonly isValidatorNotRegistered: boolean;
|
||||
readonly isInsertToCandidateListFailed: boolean;
|
||||
readonly isRemoveFromCandidateListFailed: boolean;
|
||||
readonly isDepositTooLow: boolean;
|
||||
readonly isUpdateCandidateListFailed: boolean;
|
||||
readonly isInsufficientBond: boolean;
|
||||
readonly isTargetIsNotCandidate: boolean;
|
||||
readonly isIdenticalDeposit: boolean;
|
||||
readonly isInvalidUnreserve: boolean;
|
||||
readonly type: 'TooManyCandidates' | 'TooFewEligibleCollators' | 'AlreadyCandidate' | 'NotCandidate' | 'TooManyInvulnerables' | 'AlreadyInvulnerable' | 'NotInvulnerable' | 'NoAssociatedValidatorId' | 'ValidatorNotRegistered' | 'InsertToCandidateListFailed' | 'RemoveFromCandidateListFailed' | 'DepositTooLow' | 'UpdateCandidateListFailed' | 'InsufficientBond' | 'TargetIsNotCandidate' | 'IdenticalDeposit' | 'InvalidUnreserve';
|
||||
}
|
||||
|
||||
/** @name AssetHubPolkadotRuntimeSessionKeys (273) */
|
||||
interface AssetHubPolkadotRuntimeSessionKeys extends Struct {
|
||||
readonly aura: SpConsensusAuraEd25519AppEd25519Public;
|
||||
}
|
||||
|
||||
/** @name SpConsensusAuraEd25519AppEd25519Public (274) */
|
||||
interface SpConsensusAuraEd25519AppEd25519Public extends U8aFixed {}
|
||||
|
||||
/** @name CumulusPalletXcmpQueueOutboundChannelDetails (287) */
|
||||
interface CumulusPalletXcmpQueueOutboundChannelDetails extends Struct {
|
||||
readonly recipient: u32;
|
||||
readonly state: CumulusPalletXcmpQueueOutboundState;
|
||||
readonly signalsExist: bool;
|
||||
readonly firstIndex: u16;
|
||||
readonly lastIndex: u16;
|
||||
}
|
||||
|
||||
/** @name CumulusPalletXcmpQueueOutboundState (288) */
|
||||
interface CumulusPalletXcmpQueueOutboundState extends Enum {
|
||||
readonly isOk: boolean;
|
||||
readonly isSuspended: boolean;
|
||||
readonly type: 'Ok' | 'Suspended';
|
||||
}
|
||||
|
||||
/** @name CumulusPalletXcmpQueueQueueConfigData (292) */
|
||||
interface CumulusPalletXcmpQueueQueueConfigData extends Struct {
|
||||
readonly suspendThreshold: u32;
|
||||
readonly dropThreshold: u32;
|
||||
readonly resumeThreshold: u32;
|
||||
}
|
||||
|
||||
/** @name CumulusPalletXcmpQueueCall (293) */
|
||||
interface CumulusPalletXcmpQueueCall extends Enum {
|
||||
readonly isSuspendXcmExecution: boolean;
|
||||
readonly isResumeXcmExecution: boolean;
|
||||
readonly isUpdateSuspendThreshold: boolean;
|
||||
readonly asUpdateSuspendThreshold: {
|
||||
readonly new_: u32;
|
||||
} & Struct;
|
||||
readonly isUpdateDropThreshold: boolean;
|
||||
readonly asUpdateDropThreshold: {
|
||||
readonly new_: u32;
|
||||
} & Struct;
|
||||
readonly isUpdateResumeThreshold: boolean;
|
||||
readonly asUpdateResumeThreshold: {
|
||||
readonly new_: u32;
|
||||
} & Struct;
|
||||
readonly type: 'SuspendXcmExecution' | 'ResumeXcmExecution' | 'UpdateSuspendThreshold' | 'UpdateDropThreshold' | 'UpdateResumeThreshold';
|
||||
}
|
||||
|
||||
/** @name CumulusPalletXcmpQueueError (294) */
|
||||
interface CumulusPalletXcmpQueueError extends Enum {
|
||||
readonly isBadQueueConfig: boolean;
|
||||
readonly isAlreadySuspended: boolean;
|
||||
readonly isAlreadyResumed: boolean;
|
||||
readonly isTooManyActiveOutboundChannels: boolean;
|
||||
readonly isTooBig: boolean;
|
||||
readonly type: 'BadQueueConfig' | 'AlreadySuspended' | 'AlreadyResumed' | 'TooManyActiveOutboundChannels' | 'TooBig';
|
||||
}
|
||||
|
||||
/** @name CumulusPalletXcmCall (360) */
|
||||
type CumulusPalletXcmCall = Null;
|
||||
|
||||
/** @name BpXcmBridgeHubRouterBridgeState (361) */
|
||||
interface BpXcmBridgeHubRouterBridgeState extends Struct {
|
||||
readonly deliveryFeeFactor: u128;
|
||||
readonly isCongested: bool;
|
||||
}
|
||||
|
||||
/** @name PalletXcmBridgeHubRouterCall (362) */
|
||||
interface PalletXcmBridgeHubRouterCall extends Enum {
|
||||
readonly isReportBridgeStatus: boolean;
|
||||
readonly asReportBridgeStatus: {
|
||||
readonly bridgeId: H256;
|
||||
readonly isCongested: bool;
|
||||
} & Struct;
|
||||
readonly type: 'ReportBridgeStatus';
|
||||
}
|
||||
|
||||
/** @name AssetHubPolkadotRuntimeOriginCaller (414) */
|
||||
interface AssetHubPolkadotRuntimeOriginCaller extends Enum {
|
||||
readonly isSystem: boolean;
|
||||
readonly asSystem: FrameSupportDispatchRawOrigin;
|
||||
readonly isPolkadotXcm: boolean;
|
||||
readonly asPolkadotXcm: PalletXcmOrigin;
|
||||
readonly isCumulusXcm: boolean;
|
||||
readonly asCumulusXcm: CumulusPalletXcmOrigin;
|
||||
readonly type: 'System' | 'PolkadotXcm' | 'CumulusXcm';
|
||||
}
|
||||
|
||||
/** @name CumulusPalletXcmOrigin (417) */
|
||||
interface CumulusPalletXcmOrigin extends Enum {
|
||||
readonly isRelay: boolean;
|
||||
readonly isSiblingParachain: boolean;
|
||||
readonly asSiblingParachain: u32;
|
||||
readonly type: 'Relay' | 'SiblingParachain';
|
||||
}
|
||||
|
||||
/** @name AssetHubPolkadotRuntimeRuntime (497) */
|
||||
type AssetHubPolkadotRuntimeRuntime = Null;
|
||||
|
||||
/** @name AssetsCommonRuntimeApiFungiblesAccessError (547) */
|
||||
interface AssetsCommonRuntimeApiFungiblesAccessError extends Enum {
|
||||
readonly isAssetIdConversionFailed: boolean;
|
||||
readonly isAmountToBalanceConversionFailed: boolean;
|
||||
readonly type: 'AssetIdConversionFailed' | 'AmountToBalanceConversionFailed';
|
||||
}
|
||||
|
||||
/** @name CumulusPrimitivesCoreCollationInfo (548) */
|
||||
interface CumulusPrimitivesCoreCollationInfo extends Struct {
|
||||
readonly upwardMessages: Vec<Bytes>;
|
||||
readonly horizontalMessages: Vec<PolkadotCorePrimitivesOutboundHrmpMessage>;
|
||||
readonly newValidationCode: Option<Bytes>;
|
||||
readonly processedDownwardMessages: u32;
|
||||
readonly hrmpWatermark: u32;
|
||||
readonly headData: Bytes;
|
||||
}
|
||||
|
||||
/** @name AssetHubPolkadotRuntimeRuntimeError (556) */
|
||||
interface AssetHubPolkadotRuntimeRuntimeError extends Enum {
|
||||
readonly isSystem: boolean;
|
||||
readonly asSystem: FrameSystemError;
|
||||
readonly isParachainSystem: boolean;
|
||||
readonly asParachainSystem: CumulusPalletParachainSystemError;
|
||||
readonly isBalances: boolean;
|
||||
readonly asBalances: PalletBalancesError;
|
||||
readonly isVesting: boolean;
|
||||
readonly asVesting: PalletVestingError;
|
||||
readonly isCollatorSelection: boolean;
|
||||
readonly asCollatorSelection: PalletCollatorSelectionError;
|
||||
readonly isSession: boolean;
|
||||
readonly asSession: PalletSessionError;
|
||||
readonly isXcmpQueue: boolean;
|
||||
readonly asXcmpQueue: CumulusPalletXcmpQueueError;
|
||||
readonly isPolkadotXcm: boolean;
|
||||
readonly asPolkadotXcm: PalletXcmError;
|
||||
readonly isMessageQueue: boolean;
|
||||
readonly asMessageQueue: PalletMessageQueueError;
|
||||
readonly isUtility: boolean;
|
||||
readonly asUtility: PalletUtilityError;
|
||||
readonly isMultisig: boolean;
|
||||
readonly asMultisig: PalletMultisigError;
|
||||
readonly isProxy: boolean;
|
||||
readonly asProxy: PalletProxyError;
|
||||
readonly isAssets: boolean;
|
||||
readonly asAssets: PalletAssetsError;
|
||||
readonly isUniques: boolean;
|
||||
readonly asUniques: PalletUniquesError;
|
||||
readonly isNfts: boolean;
|
||||
readonly asNfts: PalletNftsError;
|
||||
readonly isForeignAssets: boolean;
|
||||
readonly asForeignAssets: PalletAssetsError;
|
||||
readonly isPoolAssets: boolean;
|
||||
readonly asPoolAssets: PalletAssetsError;
|
||||
readonly isAssetConversion: boolean;
|
||||
readonly asAssetConversion: PalletAssetConversionError;
|
||||
readonly isStateTrieMigration: boolean;
|
||||
readonly asStateTrieMigration: PalletStateTrieMigrationError;
|
||||
readonly type: 'System' | 'ParachainSystem' | 'Balances' | 'Vesting' | 'CollatorSelection' | 'Session' | 'XcmpQueue' | 'PolkadotXcm' | 'MessageQueue' | 'Utility' | 'Multisig' | 'Proxy' | 'Assets' | 'Uniques' | 'Nfts' | 'ForeignAssets' | 'PoolAssets' | 'AssetConversion' | 'StateTrieMigration';
|
||||
}
|
||||
|
||||
} // declare module
|
||||
@@ -4,3 +4,5 @@
|
||||
import './types-substrate.js';
|
||||
import './types-polkadot.js';
|
||||
import './types-kusama.js';
|
||||
import './types-assetHubKusama.js';
|
||||
import './types-assetHubPolkadot.js';
|
||||
|
||||
@@ -3,4 +3,4 @@
|
||||
|
||||
// Do not edit, auto-generated by @polkadot/dev
|
||||
|
||||
export const packageInfo = { name: '@polkadot/types-augment', path: 'auto', type: 'auto', version: '15.10.2' };
|
||||
export const packageInfo = { name: '@polkadot/types-augment', path: 'auto', type: 'auto', version: '16.2.2' };
|
||||
|
||||
@@ -0,0 +1,23 @@
|
||||
// Auto-generated via `yarn polkadot-types-from-defs`, do not edit
|
||||
/* eslint-disable */
|
||||
|
||||
// import type lookup before we augment - in some environments
|
||||
// this is required to allow for ambient/previous definitions
|
||||
import '@polkadot/types/types/registry';
|
||||
|
||||
import type { AssetHubKusamaRuntimeOriginCaller, AssetHubKusamaRuntimeProxyType, AssetHubKusamaRuntimeRuntime, AssetHubKusamaRuntimeRuntimeError, AssetHubKusamaRuntimeRuntimeHoldReason, AssetHubKusamaRuntimeSessionKeys, PalletRemoteProxyCall, PalletRemoteProxyError, PalletRemoteProxyRemoteProxyProof, SpConsensusAuraSr25519AppSr25519Public } from '@polkadot/types/lookup';
|
||||
|
||||
declare module '@polkadot/types/types/registry' {
|
||||
interface InterfaceTypes {
|
||||
AssetHubKusamaRuntimeOriginCaller: AssetHubKusamaRuntimeOriginCaller;
|
||||
AssetHubKusamaRuntimeProxyType: AssetHubKusamaRuntimeProxyType;
|
||||
AssetHubKusamaRuntimeRuntime: AssetHubKusamaRuntimeRuntime;
|
||||
AssetHubKusamaRuntimeRuntimeError: AssetHubKusamaRuntimeRuntimeError;
|
||||
AssetHubKusamaRuntimeRuntimeHoldReason: AssetHubKusamaRuntimeRuntimeHoldReason;
|
||||
AssetHubKusamaRuntimeSessionKeys: AssetHubKusamaRuntimeSessionKeys;
|
||||
PalletRemoteProxyCall: PalletRemoteProxyCall;
|
||||
PalletRemoteProxyError: PalletRemoteProxyError;
|
||||
PalletRemoteProxyRemoteProxyProof: PalletRemoteProxyRemoteProxyProof;
|
||||
SpConsensusAuraSr25519AppSr25519Public: SpConsensusAuraSr25519AppSr25519Public;
|
||||
} // InterfaceTypes
|
||||
} // declare module
|
||||
@@ -0,0 +1,53 @@
|
||||
// Auto-generated via `yarn polkadot-types-from-defs`, do not edit
|
||||
/* eslint-disable */
|
||||
|
||||
// import type lookup before we augment - in some environments
|
||||
// this is required to allow for ambient/previous definitions
|
||||
import '@polkadot/types/types/registry';
|
||||
|
||||
import type { AssetHubPolkadotRuntimeOriginCaller, AssetHubPolkadotRuntimeProxyType, AssetHubPolkadotRuntimeRuntime, AssetHubPolkadotRuntimeRuntimeError, AssetHubPolkadotRuntimeRuntimeHoldReason, AssetHubPolkadotRuntimeSessionKeys, AssetsCommonRuntimeApiFungiblesAccessError, BpXcmBridgeHubRouterBridgeState, CumulusPalletParachainSystemCall, CumulusPalletParachainSystemError, CumulusPalletParachainSystemEvent, CumulusPalletParachainSystemRelayStateSnapshotMessagingStateSnapshot, CumulusPalletParachainSystemRelayStateSnapshotRelayDispatchQueueRemainingCapacity, CumulusPalletParachainSystemUnincludedSegmentAncestor, CumulusPalletParachainSystemUnincludedSegmentHrmpChannelUpdate, CumulusPalletParachainSystemUnincludedSegmentSegmentTracker, CumulusPalletParachainSystemUnincludedSegmentUsedBandwidth, CumulusPalletXcmCall, CumulusPalletXcmEvent, CumulusPalletXcmOrigin, CumulusPalletXcmpQueueCall, CumulusPalletXcmpQueueError, CumulusPalletXcmpQueueEvent, CumulusPalletXcmpQueueOutboundChannelDetails, CumulusPalletXcmpQueueOutboundState, CumulusPalletXcmpQueueQueueConfigData, CumulusPrimitivesCoreAggregateMessageOrigin, CumulusPrimitivesCoreCollationInfo, CumulusPrimitivesParachainInherentParachainInherentData, PalletCollatorSelectionCall, PalletCollatorSelectionCandidateInfo, PalletCollatorSelectionError, PalletCollatorSelectionEvent, PalletXcmBridgeHubRouterCall, PalletXcmBridgeHubRouterEvent, PolkadotPrimitivesV8AbridgedHostConfiguration, PolkadotPrimitivesV8AbridgedHrmpChannel, SpConsensusAuraEd25519AppEd25519Public, SpTrieStorageProof, StagingParachainInfoCall } from '@polkadot/types/lookup';
|
||||
|
||||
declare module '@polkadot/types/types/registry' {
|
||||
interface InterfaceTypes {
|
||||
AssetHubPolkadotRuntimeOriginCaller: AssetHubPolkadotRuntimeOriginCaller;
|
||||
AssetHubPolkadotRuntimeProxyType: AssetHubPolkadotRuntimeProxyType;
|
||||
AssetHubPolkadotRuntimeRuntime: AssetHubPolkadotRuntimeRuntime;
|
||||
AssetHubPolkadotRuntimeRuntimeError: AssetHubPolkadotRuntimeRuntimeError;
|
||||
AssetHubPolkadotRuntimeRuntimeHoldReason: AssetHubPolkadotRuntimeRuntimeHoldReason;
|
||||
AssetHubPolkadotRuntimeSessionKeys: AssetHubPolkadotRuntimeSessionKeys;
|
||||
AssetsCommonRuntimeApiFungiblesAccessError: AssetsCommonRuntimeApiFungiblesAccessError;
|
||||
BpXcmBridgeHubRouterBridgeState: BpXcmBridgeHubRouterBridgeState;
|
||||
CumulusPalletParachainSystemCall: CumulusPalletParachainSystemCall;
|
||||
CumulusPalletParachainSystemError: CumulusPalletParachainSystemError;
|
||||
CumulusPalletParachainSystemEvent: CumulusPalletParachainSystemEvent;
|
||||
CumulusPalletParachainSystemRelayStateSnapshotMessagingStateSnapshot: CumulusPalletParachainSystemRelayStateSnapshotMessagingStateSnapshot;
|
||||
CumulusPalletParachainSystemRelayStateSnapshotRelayDispatchQueueRemainingCapacity: CumulusPalletParachainSystemRelayStateSnapshotRelayDispatchQueueRemainingCapacity;
|
||||
CumulusPalletParachainSystemUnincludedSegmentAncestor: CumulusPalletParachainSystemUnincludedSegmentAncestor;
|
||||
CumulusPalletParachainSystemUnincludedSegmentHrmpChannelUpdate: CumulusPalletParachainSystemUnincludedSegmentHrmpChannelUpdate;
|
||||
CumulusPalletParachainSystemUnincludedSegmentSegmentTracker: CumulusPalletParachainSystemUnincludedSegmentSegmentTracker;
|
||||
CumulusPalletParachainSystemUnincludedSegmentUsedBandwidth: CumulusPalletParachainSystemUnincludedSegmentUsedBandwidth;
|
||||
CumulusPalletXcmCall: CumulusPalletXcmCall;
|
||||
CumulusPalletXcmEvent: CumulusPalletXcmEvent;
|
||||
CumulusPalletXcmOrigin: CumulusPalletXcmOrigin;
|
||||
CumulusPalletXcmpQueueCall: CumulusPalletXcmpQueueCall;
|
||||
CumulusPalletXcmpQueueError: CumulusPalletXcmpQueueError;
|
||||
CumulusPalletXcmpQueueEvent: CumulusPalletXcmpQueueEvent;
|
||||
CumulusPalletXcmpQueueOutboundChannelDetails: CumulusPalletXcmpQueueOutboundChannelDetails;
|
||||
CumulusPalletXcmpQueueOutboundState: CumulusPalletXcmpQueueOutboundState;
|
||||
CumulusPalletXcmpQueueQueueConfigData: CumulusPalletXcmpQueueQueueConfigData;
|
||||
CumulusPrimitivesCoreAggregateMessageOrigin: CumulusPrimitivesCoreAggregateMessageOrigin;
|
||||
CumulusPrimitivesCoreCollationInfo: CumulusPrimitivesCoreCollationInfo;
|
||||
CumulusPrimitivesParachainInherentParachainInherentData: CumulusPrimitivesParachainInherentParachainInherentData;
|
||||
PalletCollatorSelectionCall: PalletCollatorSelectionCall;
|
||||
PalletCollatorSelectionCandidateInfo: PalletCollatorSelectionCandidateInfo;
|
||||
PalletCollatorSelectionError: PalletCollatorSelectionError;
|
||||
PalletCollatorSelectionEvent: PalletCollatorSelectionEvent;
|
||||
PalletXcmBridgeHubRouterCall: PalletXcmBridgeHubRouterCall;
|
||||
PalletXcmBridgeHubRouterEvent: PalletXcmBridgeHubRouterEvent;
|
||||
PolkadotPrimitivesV8AbridgedHostConfiguration: PolkadotPrimitivesV8AbridgedHostConfiguration;
|
||||
PolkadotPrimitivesV8AbridgedHrmpChannel: PolkadotPrimitivesV8AbridgedHrmpChannel;
|
||||
SpConsensusAuraEd25519AppEd25519Public: SpConsensusAuraEd25519AppEd25519Public;
|
||||
SpTrieStorageProof: SpTrieStorageProof;
|
||||
StagingParachainInfoCall: StagingParachainInfoCall;
|
||||
} // InterfaceTypes
|
||||
} // declare module
|
||||
@@ -25,7 +25,7 @@ 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, CodeSource, CodeUploadRequest, CodeUploadResult, CodeUploadResultValue, ContractCallFlags, ContractCallRequest, ContractExecResult, ContractExecResultOk, ContractExecResultResult, ContractExecResultSuccessTo255, ContractExecResultSuccessTo260, ContractExecResultTo255, ContractExecResultTo260, ContractExecResultTo267, ContractExecResultU64, ContractInfo, ContractInstantiateResult, ContractInstantiateResultTo267, ContractInstantiateResultTo299, ContractInstantiateResultU64, ContractReturnFlags, ContractStorageKey, DeletedContract, ExecReturnValue, Gas, HostFnWeights, HostFnWeightsTo264, InstantiateRequest, InstantiateRequestV1, InstantiateRequestV2, InstantiateReturnValue, InstantiateReturnValueOk, InstantiateReturnValueTo267, InstructionWeights, Limits, LimitsTo264, PrefabWasmModule, RentProjection, Schedule, ScheduleTo212, ScheduleTo258, ScheduleTo264, SeedOf, StorageDeposit, TombstoneContractInfo, TrieId } from '@polkadot/types/interfaces/contracts';
|
||||
import type { ContractConstructorSpecLatest, ContractConstructorSpecV0, ContractConstructorSpecV1, ContractConstructorSpecV2, ContractConstructorSpecV3, ContractConstructorSpecV4, ContractContractSpecV0, ContractContractSpecV1, ContractContractSpecV2, ContractContractSpecV3, ContractContractSpecV4, ContractContractSpecV5, ContractCryptoHasher, ContractDiscriminant, ContractDisplayName, ContractEnvironmentV4, ContractEventParamSpecLatest, ContractEventParamSpecV0, ContractEventParamSpecV2, ContractEventSpecLatest, ContractEventSpecV0, ContractEventSpecV1, ContractEventSpecV2, ContractEventSpecV3, ContractLayoutArray, ContractLayoutCell, ContractLayoutEnum, ContractLayoutHash, ContractLayoutHashingStrategy, ContractLayoutKey, ContractLayoutStruct, ContractLayoutStructField, ContractMessageParamSpecLatest, ContractMessageParamSpecV0, ContractMessageParamSpecV2, ContractMessageSpecLatest, ContractMessageSpecV0, ContractMessageSpecV1, ContractMessageSpecV2, ContractMessageSpecV3, ContractMetadata, ContractMetadataLatest, ContractMetadataV0, ContractMetadataV1, ContractMetadataV2, ContractMetadataV3, ContractMetadataV4, ContractMetadataV5, ContractProject, ContractProjectContract, ContractProjectInfo, ContractProjectSource, ContractProjectV0, ContractSelector, ContractStorageLayout, ContractTypeSpec } from '@polkadot/types/interfaces/contractsAbi';
|
||||
import type { ContractConstructorSpecLatest, ContractConstructorSpecV0, ContractConstructorSpecV1, ContractConstructorSpecV2, ContractConstructorSpecV3, ContractConstructorSpecV4, ContractContractSpecV0, ContractContractSpecV1, ContractContractSpecV2, ContractContractSpecV3, ContractContractSpecV4, ContractContractSpecV5, ContractContractSpecV6, ContractCryptoHasher, ContractDiscriminant, ContractDisplayName, ContractEnvironmentV4, ContractEventParamSpecLatest, ContractEventParamSpecV0, ContractEventParamSpecV2, ContractEventSpecLatest, ContractEventSpecV0, ContractEventSpecV1, ContractEventSpecV2, ContractEventSpecV3, ContractLayoutArray, ContractLayoutCell, ContractLayoutEnum, ContractLayoutHash, ContractLayoutHashingStrategy, ContractLayoutKey, ContractLayoutStruct, ContractLayoutStructField, ContractMessageParamSpecLatest, ContractMessageParamSpecV0, ContractMessageParamSpecV2, ContractMessageSpecLatest, ContractMessageSpecV0, ContractMessageSpecV1, ContractMessageSpecV2, ContractMessageSpecV3, ContractMetadata, ContractMetadataLatest, ContractMetadataV0, ContractMetadataV1, ContractMetadataV2, ContractMetadataV3, ContractMetadataV4, ContractMetadataV5, ContractMetadataV6, ContractProject, ContractProjectContract, ContractProjectInfo, ContractProjectSource, ContractProjectV0, ContractReviveProjectInfo, ContractReviveProjectSource, ContractSelector, ContractStorageLayout, ContractTypeSpec } from '@polkadot/types/interfaces/contractsAbi';
|
||||
import type { FundIndex, FundInfo, LastContribution, TrieIndex } from '@polkadot/types/interfaces/crowdloan';
|
||||
import type { CollationInfo, CollationInfoV1, ConfigData, MessageId, OverweightIndex, PageCounter, PageIndexData } from '@polkadot/types/interfaces/cumulus';
|
||||
import type { AccountVote, AccountVoteSplit, AccountVoteStandard, Conviction, Delegations, PreimageStatus, PreimageStatusAvailable, PriorLock, PropIndex, Proposal, ProxyState, ReferendumIndex, ReferendumInfo, ReferendumInfoFinished, ReferendumInfoTo239, ReferendumStatus, Tally, Voting, VotingDelegating, VotingDirect, VotingDirectVote } from '@polkadot/types/interfaces/democracy';
|
||||
@@ -44,7 +44,7 @@ import type { AuthorityIndex, AuthorityList, AuthoritySet, AuthoritySetChange, A
|
||||
import type { IdentityFields, IdentityInfo, IdentityInfoAdditional, IdentityInfoTo198, IdentityJudgement, RegistrarIndex, RegistrarInfo, Registration, RegistrationJudgement, RegistrationTo198 } from '@polkadot/types/interfaces/identity';
|
||||
import type { AuthIndex, AuthoritySignature, Heartbeat, HeartbeatTo244, OpaqueMultiaddr, OpaqueNetworkState, OpaquePeerId } from '@polkadot/types/interfaces/imOnline';
|
||||
import type { CallIndex, LotteryConfig } from '@polkadot/types/interfaces/lottery';
|
||||
import type { CustomMetadata15, CustomValueMetadata15, ErrorMetadataLatest, ErrorMetadataV10, ErrorMetadataV11, ErrorMetadataV12, ErrorMetadataV13, ErrorMetadataV14, ErrorMetadataV9, EventMetadataLatest, EventMetadataV10, EventMetadataV11, EventMetadataV12, EventMetadataV13, EventMetadataV14, EventMetadataV9, ExtrinsicMetadataLatest, ExtrinsicMetadataV11, ExtrinsicMetadataV12, ExtrinsicMetadataV13, ExtrinsicMetadataV14, ExtrinsicMetadataV15, FunctionArgumentMetadataLatest, FunctionArgumentMetadataV10, FunctionArgumentMetadataV11, FunctionArgumentMetadataV12, FunctionArgumentMetadataV13, FunctionArgumentMetadataV14, FunctionArgumentMetadataV9, FunctionMetadataLatest, FunctionMetadataV10, FunctionMetadataV11, FunctionMetadataV12, FunctionMetadataV13, FunctionMetadataV14, FunctionMetadataV9, MetadataAll, MetadataLatest, MetadataV10, MetadataV11, MetadataV12, MetadataV13, MetadataV14, MetadataV15, MetadataV9, ModuleConstantMetadataV10, ModuleConstantMetadataV11, ModuleConstantMetadataV12, ModuleConstantMetadataV13, ModuleConstantMetadataV9, ModuleMetadataV10, ModuleMetadataV11, ModuleMetadataV12, ModuleMetadataV13, ModuleMetadataV9, OpaqueMetadata, OuterEnums15, PalletCallMetadataLatest, PalletCallMetadataV14, PalletConstantMetadataLatest, PalletConstantMetadataV14, PalletErrorMetadataLatest, PalletErrorMetadataV14, PalletEventMetadataLatest, PalletEventMetadataV14, PalletMetadataLatest, PalletMetadataV14, PalletMetadataV15, PalletStorageMetadataLatest, PalletStorageMetadataV14, PortableType, PortableTypeV14, RuntimeApiMetadataLatest, RuntimeApiMetadataV15, RuntimeApiMethodMetadataV15, RuntimeApiMethodParamMetadataV15, SignedExtensionMetadataLatest, SignedExtensionMetadataV14, StorageEntryMetadataLatest, StorageEntryMetadataV10, StorageEntryMetadataV11, StorageEntryMetadataV12, StorageEntryMetadataV13, StorageEntryMetadataV14, StorageEntryMetadataV9, StorageEntryModifierLatest, StorageEntryModifierV10, StorageEntryModifierV11, StorageEntryModifierV12, StorageEntryModifierV13, StorageEntryModifierV14, StorageEntryModifierV9, StorageEntryTypeLatest, StorageEntryTypeV10, StorageEntryTypeV11, StorageEntryTypeV12, StorageEntryTypeV13, StorageEntryTypeV14, StorageEntryTypeV9, StorageHasher, StorageHasherV10, StorageHasherV11, StorageHasherV12, StorageHasherV13, StorageHasherV14, StorageHasherV9, StorageMetadataV10, StorageMetadataV11, StorageMetadataV12, StorageMetadataV13, StorageMetadataV9 } from '@polkadot/types/interfaces/metadata';
|
||||
import type { CustomMetadata15, CustomValueMetadata15, EnumDeprecationInfoV16, ErrorMetadataLatest, ErrorMetadataV10, ErrorMetadataV11, ErrorMetadataV12, ErrorMetadataV13, ErrorMetadataV14, ErrorMetadataV9, EventMetadataLatest, EventMetadataV10, EventMetadataV11, EventMetadataV12, EventMetadataV13, EventMetadataV14, EventMetadataV9, ExtrinsicMetadataLatest, ExtrinsicMetadataV11, ExtrinsicMetadataV12, ExtrinsicMetadataV13, ExtrinsicMetadataV14, ExtrinsicMetadataV15, ExtrinsicMetadataV16, FunctionArgumentMetadataLatest, FunctionArgumentMetadataV10, FunctionArgumentMetadataV11, FunctionArgumentMetadataV12, FunctionArgumentMetadataV13, FunctionArgumentMetadataV14, FunctionArgumentMetadataV9, FunctionMetadataLatest, FunctionMetadataV10, FunctionMetadataV11, FunctionMetadataV12, FunctionMetadataV13, FunctionMetadataV14, FunctionMetadataV9, ItemDeprecationInfoV16, MetadataAll, MetadataLatest, MetadataV10, MetadataV11, MetadataV12, MetadataV13, MetadataV14, MetadataV15, MetadataV16, MetadataV9, ModuleConstantMetadataV10, ModuleConstantMetadataV11, ModuleConstantMetadataV12, ModuleConstantMetadataV13, ModuleConstantMetadataV9, ModuleMetadataV10, ModuleMetadataV11, ModuleMetadataV12, ModuleMetadataV13, ModuleMetadataV9, OpaqueMetadata, OuterEnums15, PalletAssociatedTypeMetadataV16, PalletCallMetadataLatest, PalletCallMetadataV14, PalletCallMetadataV16, PalletConstantMetadataLatest, PalletConstantMetadataV14, PalletConstantMetadataV16, PalletErrorMetadataLatest, PalletErrorMetadataV14, PalletErrorMetadataV16, PalletEventMetadataLatest, PalletEventMetadataV14, PalletEventMetadataV16, PalletMetadataLatest, PalletMetadataV14, PalletMetadataV15, PalletMetadataV16, PalletStorageMetadataLatest, PalletStorageMetadataV14, PalletStorageMetadataV16, PalletViewFunctionMetadataV16, PortableType, PortableTypeV14, RuntimeApiMetadataLatest, RuntimeApiMetadataV15, RuntimeApiMetadataV16, RuntimeApiMethodMetadataV15, RuntimeApiMethodMetadataV16, RuntimeApiMethodParamMetadataV15, SignedExtensionMetadataLatest, SignedExtensionMetadataV14, StorageEntryMetadataLatest, StorageEntryMetadataV10, StorageEntryMetadataV11, StorageEntryMetadataV12, StorageEntryMetadataV13, StorageEntryMetadataV14, StorageEntryMetadataV16, StorageEntryMetadataV9, StorageEntryModifierLatest, StorageEntryModifierV10, StorageEntryModifierV11, StorageEntryModifierV12, StorageEntryModifierV13, StorageEntryModifierV14, StorageEntryModifierV9, StorageEntryTypeLatest, StorageEntryTypeV10, StorageEntryTypeV11, StorageEntryTypeV12, StorageEntryTypeV13, StorageEntryTypeV14, StorageEntryTypeV9, StorageHasher, StorageHasherV10, StorageHasherV11, StorageHasherV12, StorageHasherV13, StorageHasherV14, StorageHasherV9, StorageMetadataV10, StorageMetadataV11, StorageMetadataV12, StorageMetadataV13, StorageMetadataV9, TransactionExtensionMetadataLatest, TransactionExtensionMetadataV16, VariantDeprecationInfoV16 } from '@polkadot/types/interfaces/metadata';
|
||||
import type { Mixnode, MixnodesErr, SessionPhase, SessionStatus } from '@polkadot/types/interfaces/mixnet';
|
||||
import type { MmrBatchProof, MmrEncodableOpaqueLeaf, MmrError, MmrHash, MmrLeafBatchProof, MmrLeafIndex, MmrLeafProof, MmrNodeIndex, MmrProof } from '@polkadot/types/interfaces/mmr';
|
||||
import type { NftCollectionId, NftItemId } from '@polkadot/types/interfaces/nfts';
|
||||
@@ -285,6 +285,7 @@ declare module '@polkadot/types/types/registry' {
|
||||
ContractContractSpecV3: ContractContractSpecV3;
|
||||
ContractContractSpecV4: ContractContractSpecV4;
|
||||
ContractContractSpecV5: ContractContractSpecV5;
|
||||
ContractContractSpecV6: ContractContractSpecV6;
|
||||
ContractCryptoHasher: ContractCryptoHasher;
|
||||
ContractDiscriminant: ContractDiscriminant;
|
||||
ContractDisplayName: ContractDisplayName;
|
||||
@@ -335,12 +336,15 @@ declare module '@polkadot/types/types/registry' {
|
||||
ContractMetadataV3: ContractMetadataV3;
|
||||
ContractMetadataV4: ContractMetadataV4;
|
||||
ContractMetadataV5: ContractMetadataV5;
|
||||
ContractMetadataV6: ContractMetadataV6;
|
||||
ContractProject: ContractProject;
|
||||
ContractProjectContract: ContractProjectContract;
|
||||
ContractProjectInfo: ContractProjectInfo;
|
||||
ContractProjectSource: ContractProjectSource;
|
||||
ContractProjectV0: ContractProjectV0;
|
||||
ContractReturnFlags: ContractReturnFlags;
|
||||
ContractReviveProjectInfo: ContractReviveProjectInfo;
|
||||
ContractReviveProjectSource: ContractReviveProjectSource;
|
||||
ContractSelector: ContractSelector;
|
||||
ContractStorageKey: ContractStorageKey;
|
||||
ContractStorageLayout: ContractStorageLayout;
|
||||
@@ -410,6 +414,7 @@ declare module '@polkadot/types/types/registry' {
|
||||
ElectionStatus: ElectionStatus;
|
||||
EncodedFinalityProofs: EncodedFinalityProofs;
|
||||
EncodedJustification: EncodedJustification;
|
||||
EnumDeprecationInfoV16: EnumDeprecationInfoV16;
|
||||
Epoch: Epoch;
|
||||
EpochAuthorship: EpochAuthorship;
|
||||
Era: Era;
|
||||
@@ -503,6 +508,7 @@ declare module '@polkadot/types/types/registry' {
|
||||
ExtrinsicMetadataV13: ExtrinsicMetadataV13;
|
||||
ExtrinsicMetadataV14: ExtrinsicMetadataV14;
|
||||
ExtrinsicMetadataV15: ExtrinsicMetadataV15;
|
||||
ExtrinsicMetadataV16: ExtrinsicMetadataV16;
|
||||
ExtrinsicOrHash: ExtrinsicOrHash;
|
||||
ExtrinsicPayload: ExtrinsicPayload;
|
||||
ExtrinsicPayloadUnknown: ExtrinsicPayloadUnknown;
|
||||
@@ -653,6 +659,7 @@ declare module '@polkadot/types/types/registry' {
|
||||
InvalidTransaction: InvalidTransaction;
|
||||
isize: isize;
|
||||
ISize: ISize;
|
||||
ItemDeprecationInfoV16: ItemDeprecationInfoV16;
|
||||
Json: Json;
|
||||
Junction: Junction;
|
||||
Junctions: Junctions;
|
||||
@@ -716,6 +723,7 @@ declare module '@polkadot/types/types/registry' {
|
||||
MetadataV13: MetadataV13;
|
||||
MetadataV14: MetadataV14;
|
||||
MetadataV15: MetadataV15;
|
||||
MetadataV16: MetadataV16;
|
||||
MetadataV9: MetadataV9;
|
||||
MigrationStatusResult: MigrationStatusResult;
|
||||
Mixnode: Mixnode;
|
||||
@@ -841,14 +849,19 @@ declare module '@polkadot/types/types/registry' {
|
||||
Owner: Owner;
|
||||
PageCounter: PageCounter;
|
||||
PageIndexData: PageIndexData;
|
||||
PalletAssociatedTypeMetadataV16: PalletAssociatedTypeMetadataV16;
|
||||
PalletCallMetadataLatest: PalletCallMetadataLatest;
|
||||
PalletCallMetadataV14: PalletCallMetadataV14;
|
||||
PalletCallMetadataV16: PalletCallMetadataV16;
|
||||
PalletConstantMetadataLatest: PalletConstantMetadataLatest;
|
||||
PalletConstantMetadataV14: PalletConstantMetadataV14;
|
||||
PalletConstantMetadataV16: PalletConstantMetadataV16;
|
||||
PalletErrorMetadataLatest: PalletErrorMetadataLatest;
|
||||
PalletErrorMetadataV14: PalletErrorMetadataV14;
|
||||
PalletErrorMetadataV16: PalletErrorMetadataV16;
|
||||
PalletEventMetadataLatest: PalletEventMetadataLatest;
|
||||
PalletEventMetadataV14: PalletEventMetadataV14;
|
||||
PalletEventMetadataV16: PalletEventMetadataV16;
|
||||
PalletId: PalletId;
|
||||
PalletInfoV3: PalletInfoV3;
|
||||
PalletInfoV4: PalletInfoV4;
|
||||
@@ -856,10 +869,13 @@ declare module '@polkadot/types/types/registry' {
|
||||
PalletMetadataLatest: PalletMetadataLatest;
|
||||
PalletMetadataV14: PalletMetadataV14;
|
||||
PalletMetadataV15: PalletMetadataV15;
|
||||
PalletMetadataV16: PalletMetadataV16;
|
||||
PalletsOrigin: PalletsOrigin;
|
||||
PalletStorageMetadataLatest: PalletStorageMetadataLatest;
|
||||
PalletStorageMetadataV14: PalletStorageMetadataV14;
|
||||
PalletStorageMetadataV16: PalletStorageMetadataV16;
|
||||
PalletVersion: PalletVersion;
|
||||
PalletViewFunctionMetadataV16: PalletViewFunctionMetadataV16;
|
||||
ParachainDispatchOrigin: ParachainDispatchOrigin;
|
||||
ParachainInherentData: ParachainInherentData;
|
||||
ParachainProposal: ParachainProposal;
|
||||
@@ -999,7 +1015,9 @@ declare module '@polkadot/types/types/registry' {
|
||||
RpcMethods: RpcMethods;
|
||||
RuntimeApiMetadataLatest: RuntimeApiMetadataLatest;
|
||||
RuntimeApiMetadataV15: RuntimeApiMetadataV15;
|
||||
RuntimeApiMetadataV16: RuntimeApiMetadataV16;
|
||||
RuntimeApiMethodMetadataV15: RuntimeApiMethodMetadataV15;
|
||||
RuntimeApiMethodMetadataV16: RuntimeApiMethodMetadataV16;
|
||||
RuntimeApiMethodParamMetadataV15: RuntimeApiMethodParamMetadataV15;
|
||||
RuntimeCall: RuntimeCall;
|
||||
RuntimeDbWeight: RuntimeDbWeight;
|
||||
@@ -1144,6 +1162,7 @@ declare module '@polkadot/types/types/registry' {
|
||||
StorageEntryMetadataV12: StorageEntryMetadataV12;
|
||||
StorageEntryMetadataV13: StorageEntryMetadataV13;
|
||||
StorageEntryMetadataV14: StorageEntryMetadataV14;
|
||||
StorageEntryMetadataV16: StorageEntryMetadataV16;
|
||||
StorageEntryMetadataV9: StorageEntryMetadataV9;
|
||||
StorageEntryModifierLatest: StorageEntryModifierLatest;
|
||||
StorageEntryModifierV10: StorageEntryModifierV10;
|
||||
@@ -1196,6 +1215,8 @@ declare module '@polkadot/types/types/registry' {
|
||||
TraceBlockResponse: TraceBlockResponse;
|
||||
TraceError: TraceError;
|
||||
TransactionalError: TransactionalError;
|
||||
TransactionExtensionMetadataLatest: TransactionExtensionMetadataLatest;
|
||||
TransactionExtensionMetadataV16: TransactionExtensionMetadataV16;
|
||||
TransactionInfo: TransactionInfo;
|
||||
TransactionLongevity: TransactionLongevity;
|
||||
TransactionPriority: TransactionPriority;
|
||||
@@ -1260,6 +1281,7 @@ declare module '@polkadot/types/types/registry' {
|
||||
ValidDisputeStatementKind: ValidDisputeStatementKind;
|
||||
ValidityAttestation: ValidityAttestation;
|
||||
ValidTransaction: ValidTransaction;
|
||||
VariantDeprecationInfoV16: VariantDeprecationInfoV16;
|
||||
VecInboundHrmpMessage: VecInboundHrmpMessage;
|
||||
VersionedMultiAsset: VersionedMultiAsset;
|
||||
VersionedMultiAssets: VersionedMultiAssets;
|
||||
|
||||
@@ -18,17 +18,17 @@
|
||||
"./packageDetect.cjs"
|
||||
],
|
||||
"type": "module",
|
||||
"version": "15.10.2",
|
||||
"version": "16.2.2",
|
||||
"main": "index.js",
|
||||
"dependencies": {
|
||||
"@polkadot/util": "^13.4.4",
|
||||
"@polkadot/x-bigint": "^13.4.4",
|
||||
"@polkadot/util": "^13.5.2",
|
||||
"@polkadot/x-bigint": "^13.5.2",
|
||||
"tslib": "^2.8.1"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@polkadot/types": "15.10.2",
|
||||
"@polkadot/types-augment": "15.10.2",
|
||||
"@polkadot/types-support": "15.10.2",
|
||||
"@polkadot/util-crypto": "^13.4.4"
|
||||
"@polkadot/types": "16.2.2",
|
||||
"@polkadot/types-augment": "16.2.2",
|
||||
"@polkadot/types-support": "16.2.2",
|
||||
"@polkadot/util-crypto": "^13.5.2"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -90,7 +90,8 @@ describe('BitVec', (): void => {
|
||||
expect(
|
||||
new BitVec(registry, '0x0837').inspect()
|
||||
).toEqual({
|
||||
outer: [new Uint8Array([0]), new Uint8Array([0x08, 0x37])]
|
||||
// For input '0x0837' (yields 16 bits): compactToU8a(16) is 16<<2 = 64.
|
||||
outer: [new Uint8Array([64]), new Uint8Array([0x08, 0x37])]
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
@@ -29,7 +29,7 @@ function decodeBitVec (value?: AnyU8a): [number, Uint8Array] {
|
||||
if (Array.isArray(value) || isString(value)) {
|
||||
const u8a = u8aToU8a(value);
|
||||
|
||||
return [u8a.length / 8, u8a];
|
||||
return [u8a.length * 8, u8a];
|
||||
}
|
||||
|
||||
return decodeBitVecU8a(value);
|
||||
|
||||
@@ -3,4 +3,4 @@
|
||||
|
||||
// Do not edit, auto-generated by @polkadot/dev
|
||||
|
||||
export const packageInfo = { name: '@polkadot/types-codec', path: 'auto', type: 'auto', version: '15.10.2' };
|
||||
export const packageInfo = { name: '@polkadot/types-codec', path: 'auto', type: 'auto', version: '16.2.2' };
|
||||
|
||||
@@ -5,6 +5,15 @@ import type { Codec, CodecClass, Registry } from '../types/index.js';
|
||||
|
||||
import { u8aToHex } from '@polkadot/util';
|
||||
|
||||
const MAX_DEPTH = 1024;
|
||||
|
||||
/** @internal */
|
||||
function isComplexType (Type: CodecClass): boolean {
|
||||
const typeName = Type.name?.toLowerCase() || '';
|
||||
|
||||
return ['enum', 'hashmap', 'linkage', 'null', 'option', 'range', 'rangeinclusive', 'result', 'struct', 'tuple', 'vec', 'vecfixed'].includes(typeName);
|
||||
}
|
||||
|
||||
/** @internal */
|
||||
function formatFailure (registry: Registry, fn: 'decodeU8a' | 'decodeU8aStruct' | 'decodeU8aVec', _result: unknown[], { message }: Error, u8a: Uint8Array, i: number, count: number, Type: CodecClass, key?: string): string {
|
||||
let type = '';
|
||||
@@ -63,6 +72,10 @@ export function decodeU8aStruct (registry: Registry, result: [string, Codec][],
|
||||
let offset = 0;
|
||||
let i = 0;
|
||||
|
||||
if (count > MAX_DEPTH && isComplexType(Types[i])) {
|
||||
throw new Error(`decodeU8aStruct: Maximum depth exceeded, received ${count} elements, limit ${MAX_DEPTH}`);
|
||||
}
|
||||
|
||||
try {
|
||||
while (i < count) {
|
||||
const value = new Types[i](registry, u8a.subarray(offset));
|
||||
@@ -86,6 +99,11 @@ export function decodeU8aStruct (registry: Registry, result: [string, Codec][],
|
||||
*/
|
||||
export function decodeU8aVec <T extends Codec = Codec> (registry: Registry, result: unknown[], u8a: Uint8Array, startAt: number, Type: CodecClass<T>): [number, number] {
|
||||
const count = result.length;
|
||||
|
||||
if (count > MAX_DEPTH && isComplexType(Type)) {
|
||||
throw new Error(`decodeU8aVec: Maximum depth exceeded, received ${count} elements, limit ${MAX_DEPTH}`);
|
||||
}
|
||||
|
||||
let offset = startAt;
|
||||
let i = 0;
|
||||
|
||||
|
||||
@@ -18,14 +18,14 @@
|
||||
"./packageDetect.cjs"
|
||||
],
|
||||
"type": "module",
|
||||
"version": "15.10.2",
|
||||
"version": "16.2.2",
|
||||
"main": "index.js",
|
||||
"dependencies": {
|
||||
"@polkadot/types-codec": "15.10.2",
|
||||
"@polkadot/util": "^13.4.4",
|
||||
"@polkadot/types-codec": "16.2.2",
|
||||
"@polkadot/util": "^13.5.2",
|
||||
"tslib": "^2.8.1"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@polkadot/types": "15.10.2"
|
||||
"@polkadot/types": "16.2.2"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3,4 +3,4 @@
|
||||
|
||||
// Do not edit, auto-generated by @polkadot/dev
|
||||
|
||||
export const packageInfo = { name: '@polkadot/types-create', path: 'auto', type: 'auto', version: '15.10.2' };
|
||||
export const packageInfo = { name: '@polkadot/types-create', path: 'auto', type: 'auto', version: '16.2.2' };
|
||||
|
||||
@@ -18,17 +18,17 @@
|
||||
"./packageDetect.cjs"
|
||||
],
|
||||
"type": "module",
|
||||
"version": "15.10.2",
|
||||
"version": "16.2.2",
|
||||
"main": "index.js",
|
||||
"dependencies": {
|
||||
"@polkadot/networks": "^13.4.4",
|
||||
"@polkadot/types": "15.10.2",
|
||||
"@polkadot/types-codec": "15.10.2",
|
||||
"@polkadot/types-create": "15.10.2",
|
||||
"@polkadot/util": "^13.4.4",
|
||||
"@polkadot/networks": "^13.5.2",
|
||||
"@polkadot/types": "16.2.2",
|
||||
"@polkadot/types-codec": "16.2.2",
|
||||
"@polkadot/types-create": "16.2.2",
|
||||
"@polkadot/util": "^13.5.2",
|
||||
"tslib": "^2.8.1"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@polkadot/api": "15.10.2"
|
||||
"@polkadot/api": "16.2.2"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3,4 +3,4 @@
|
||||
|
||||
// Do not edit, auto-generated by @polkadot/dev
|
||||
|
||||
export const packageInfo = { name: '@polkadot/types-known', path: 'auto', type: 'auto', version: '15.10.2' };
|
||||
export const packageInfo = { name: '@polkadot/types-known', path: 'auto', type: 'auto', version: '16.2.2' };
|
||||
|
||||
@@ -18,10 +18,10 @@
|
||||
"./packageDetect.cjs"
|
||||
],
|
||||
"type": "module",
|
||||
"version": "15.10.2",
|
||||
"version": "16.2.2",
|
||||
"main": "index.js",
|
||||
"dependencies": {
|
||||
"@polkadot/util": "^13.4.4",
|
||||
"@polkadot/util": "^13.5.2",
|
||||
"tslib": "^2.8.1"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -49,7 +49,31 @@ To retrieve the runtime versions -
|
||||
|
||||
- Add it to the relevant folders e.g. `v14/{kusama, polkadot, substrate}-ver.ts`
|
||||
|
||||
NOTE: This all works for manual updating, but for an easier process run from root for each respective chain: `node ./scripts/metadata-get.mjs`
|
||||
## NOTE:
|
||||
|
||||
1. This all works for manual updating, but for an easier process run from root for each respective chain: `node ./scripts/metadata-get.mjs`.
|
||||
|
||||
2. If the chain is already live, running it locally is unnecessary — update the metadata & types using `node ./scripts/metadata-get.mjs --url <ws_chain_url>`.
|
||||
|
||||
3. Run `yarn test:one packages/types/src/metadata/v14` for Metadata checks
|
||||
|
||||
## Caveat
|
||||
|
||||
Occasionally, running the tests may result in a failure due to outdated metadata. The error message might look like this:
|
||||
|
||||
```bash
|
||||
/api/packages/types/src/metadata/v14/Metadata.spec.ts
|
||||
|
||||
undefined / undefined
|
||||
```
|
||||
|
||||
### How to Fix
|
||||
|
||||
1. Navigate to the file mentioned in the error.
|
||||
2. Paste the line `writeJson(json, version, type, 'json');` into the `try` block.
|
||||
3. Rerun the tests — they should pass now.
|
||||
4. **Important:** After verifying that the tests pass, revert your changes and run the tests again to ensure everything still works as expected.
|
||||
|
||||
|
||||
## extraction (Legacy)
|
||||
|
||||
@@ -67,4 +91,4 @@ To retrieve the metadata -
|
||||
|
||||
- Add it to the relevant folders e.g. `v14/{kusama, polkadot, substrate}-hex.json`
|
||||
- Run `yarn build:interfaces` to re-generate all TS
|
||||
- Run `yarn test:one packages/types/src/metadatra/v14` for Metadata checks
|
||||
- Run `yarn test:one packages/types/src/metadata/v14` for Metadata checks
|
||||
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because it is too large
Load Diff
@@ -8,6 +8,16 @@
|
||||
export default {
|
||||
"methods": [
|
||||
"account_nextIndex",
|
||||
"archive_v1_body",
|
||||
"archive_v1_call",
|
||||
"archive_v1_finalizedHeight",
|
||||
"archive_v1_genesisHash",
|
||||
"archive_v1_hashByHeight",
|
||||
"archive_v1_header",
|
||||
"archive_v1_stopStorage",
|
||||
"archive_v1_storage",
|
||||
"archive_v1_storageDiff",
|
||||
"archive_v1_storageDiff_stopStorageDiff",
|
||||
"author_hasKey",
|
||||
"author_hasSessionKeys",
|
||||
"author_insertKey",
|
||||
@@ -56,8 +66,7 @@ export default {
|
||||
"childstate_getStorageHash",
|
||||
"childstate_getStorageSize",
|
||||
"dev_getBlockStats",
|
||||
"engine_createBlock",
|
||||
"engine_finalizeBlock",
|
||||
"offchain_localStorageClear",
|
||||
"offchain_localStorageGet",
|
||||
"offchain_localStorageSet",
|
||||
"payment_queryFeeDetails",
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user