Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
ac07123e54 | ||
|
|
a9865bb60a | ||
|
|
62741a10dd | ||
|
|
c277b3d865 | ||
|
|
edde226740 | ||
|
|
88a9316dbd | ||
|
|
23b7ff1794 | ||
|
|
f1fda12353 | ||
|
|
e2e0e38d35 | ||
|
|
74279380e3 | ||
|
|
e0c5f7cab0 | ||
|
|
7a088f9ce7 | ||
|
|
d9ea5ee921 | ||
|
|
4b8792fe7c | ||
|
|
5cc25fb40c | ||
|
|
2494801d50 | ||
|
|
dbcb39734a | ||
|
|
0be50b285b |
@@ -1,5 +1,25 @@
|
||||
# CHANGELOG
|
||||
|
||||
## 10.9.1 Jun 12, 2023
|
||||
|
||||
Changes:
|
||||
|
||||
- Adjust object index access for stricter tsconfig settings
|
||||
- Update to latest Polkadot, Kusama & Substrate metadata
|
||||
|
||||
|
||||
## 10.8.1 Jun 5, 2023
|
||||
|
||||
Contributed:
|
||||
|
||||
- Added support for extended Contracts ABI V4 definitions (Thanks to https://github.com/statictype)
|
||||
|
||||
Changes:
|
||||
|
||||
- Update to latest Polkadot, Kusama & Substrate metadata
|
||||
- Cleanup (some) linting overrides
|
||||
|
||||
|
||||
## 10.7.3 May 28, 2023
|
||||
|
||||
Changes:
|
||||
|
||||
+2
-2
@@ -1,4 +1,4 @@
|
||||
3467 Jaco 10.7.3 (#5660)
|
||||
3475 Jaco 10.9.1 (#5672)
|
||||
83 Amaury Martiny StatementKind: Regular and Saft (#2303)
|
||||
37 Keith Ingram Update contract types and rpc (#4541)
|
||||
35 Stefanie Doll Updated child storage parameters (#1709)
|
||||
@@ -8,13 +8,13 @@
|
||||
14 Nikos Kontakis Bump substrate connect to 0.7.16 (#5307)
|
||||
11 Ian He HttpProvider support clone() (#3949)
|
||||
10 Axel Chalon Make Enum/Tuple constructor use value directly if instance (#1954)
|
||||
5 Andreea Eftene Add suport for latest ink! metadata (#5650)
|
||||
5 Chevdor Fix metadata package link (#3458)
|
||||
5 Jake Naviasky Fixing approvalFlagsToBools. (#1250)
|
||||
5 Julien Eluard General WsProvider extensibility improvements (#5467)
|
||||
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 Andreea Eftene add type overrides (#5506)
|
||||
4 Joshy Orndorff spelling; efect -> effect (#2295)
|
||||
4 Nantian fix bigint type (#3869)
|
||||
4 Scott Twiname Add support for historical BlockNumber rpc methods (#4574)
|
||||
|
||||
@@ -4,6 +4,13 @@
|
||||
import baseConfig from '@polkadot/dev/config/eslint';
|
||||
|
||||
export default [
|
||||
{
|
||||
ignores: [
|
||||
// see the tsconfig.eslint.json for explanation
|
||||
'packages/api-augment/src/kusama/*.ts',
|
||||
'packages/api-augment/src/polkadot/*.ts'
|
||||
]
|
||||
},
|
||||
...baseConfig,
|
||||
{
|
||||
rules: {
|
||||
|
||||
+4
-4
@@ -14,10 +14,10 @@
|
||||
},
|
||||
"sideEffects": false,
|
||||
"type": "module",
|
||||
"version": "10.7.3",
|
||||
"version": "10.9.1",
|
||||
"versions": {
|
||||
"git": "10.7.3",
|
||||
"npm": "10.7.3"
|
||||
"git": "10.9.1",
|
||||
"npm": "10.9.1"
|
||||
},
|
||||
"workspaces": [
|
||||
"packages/*"
|
||||
@@ -40,7 +40,7 @@
|
||||
"test:one": "polkadot-dev-run-test --env node"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@polkadot/dev": "^0.75.10",
|
||||
"@polkadot/dev": "^0.75.19",
|
||||
"@polkadot/typegen": "workspace:packages/typegen",
|
||||
"@types/node": "^20.2.5"
|
||||
},
|
||||
|
||||
@@ -18,15 +18,15 @@
|
||||
"./detectPackage.cjs"
|
||||
],
|
||||
"type": "module",
|
||||
"version": "10.7.3",
|
||||
"version": "10.9.1",
|
||||
"main": "index.js",
|
||||
"dependencies": {
|
||||
"@polkadot/api-base": "10.7.3",
|
||||
"@polkadot/rpc-augment": "10.7.3",
|
||||
"@polkadot/types": "10.7.3",
|
||||
"@polkadot/types-augment": "10.7.3",
|
||||
"@polkadot/types-codec": "10.7.3",
|
||||
"@polkadot/util": "^12.2.1",
|
||||
"tslib": "^2.5.2"
|
||||
"@polkadot/api-base": "10.9.1",
|
||||
"@polkadot/rpc-augment": "10.9.1",
|
||||
"@polkadot/types": "10.9.1",
|
||||
"@polkadot/types-augment": "10.9.1",
|
||||
"@polkadot/types-codec": "10.9.1",
|
||||
"@polkadot/util": "^12.3.1",
|
||||
"tslib": "^2.5.3"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -9,7 +9,7 @@ import type { ApiTypes, AugmentedConst } from '@polkadot/api-base/types';
|
||||
import type { Bytes, Option, Vec, u128, u16, u32, u64, u8 } from '@polkadot/types-codec';
|
||||
import type { Codec, ITuple } from '@polkadot/types-codec/types';
|
||||
import type { Perbill, Permill, Perquintill } from '@polkadot/types/interfaces/runtime';
|
||||
import type { FrameSupportPalletId, FrameSystemLimitsBlockLength, FrameSystemLimitsBlockWeights, KusamaRuntimeRuntimeHoldReason, PalletReferendaTrackInfo, SpVersionRuntimeVersion, SpWeightsRuntimeDbWeight, SpWeightsWeightV2Weight } from '@polkadot/types/lookup';
|
||||
import type { FrameSupportPalletId, FrameSystemLimitsBlockLength, FrameSystemLimitsBlockWeights, PalletReferendaTrackInfo, SpVersionRuntimeVersion, SpWeightsRuntimeDbWeight, SpWeightsWeightV2Weight } from '@polkadot/types/lookup';
|
||||
|
||||
export type __AugmentedConst<ApiType extends ApiTypes> = AugmentedConst<ApiType>;
|
||||
|
||||
@@ -408,6 +408,34 @@ declare module '@polkadot/api-base/types/consts' {
|
||||
**/
|
||||
[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 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.
|
||||
*
|
||||
* This may be legitimately `None` in the case that you will call
|
||||
* `ServiceQueues::service_queues` manually.
|
||||
**/
|
||||
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
|
||||
@@ -445,10 +473,6 @@ declare module '@polkadot/api-base/types/consts' {
|
||||
* Must be no greater than `MaxQueueLen`.
|
||||
**/
|
||||
fifoQueueLen: u32 & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* The identifier of the hold reason.
|
||||
**/
|
||||
holdReason: KusamaRuntimeRuntimeHoldReason & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* The number of blocks between consecutive attempts to dequeue bids and create receipts.
|
||||
*
|
||||
|
||||
@@ -806,6 +806,44 @@ declare module '@polkadot/api-base/types/errors' {
|
||||
**/
|
||||
[key: string]: AugmentedError<ApiType>;
|
||||
};
|
||||
messageQueue: {
|
||||
/**
|
||||
* The message was already processed and cannot be processed again.
|
||||
**/
|
||||
AlreadyProcessed: AugmentedError<ApiType>;
|
||||
/**
|
||||
* There is temporarily not enough weight to continue servicing messages.
|
||||
**/
|
||||
InsufficientWeight: AugmentedError<ApiType>;
|
||||
/**
|
||||
* The referenced message could not be found.
|
||||
**/
|
||||
NoMessage: AugmentedError<ApiType>;
|
||||
/**
|
||||
* Page to be reaped does not exist.
|
||||
**/
|
||||
NoPage: AugmentedError<ApiType>;
|
||||
/**
|
||||
* Page is not reapable because it has items remaining to be processed and is not old
|
||||
* enough.
|
||||
**/
|
||||
NotReapable: AugmentedError<ApiType>;
|
||||
/**
|
||||
* The message is queued for future execution.
|
||||
**/
|
||||
Queued: AugmentedError<ApiType>;
|
||||
/**
|
||||
* This message is temporarily unprocessable.
|
||||
*
|
||||
* Such errors are expected, but not guaranteed, to resolve themselves eventually through
|
||||
* retrying.
|
||||
**/
|
||||
TemporarilyUnprocessable: AugmentedError<ApiType>;
|
||||
/**
|
||||
* Generic error
|
||||
**/
|
||||
[key: string]: AugmentedError<ApiType>;
|
||||
};
|
||||
multisig: {
|
||||
/**
|
||||
* Call is already approved by this signatory.
|
||||
@@ -1972,20 +2010,6 @@ declare module '@polkadot/api-base/types/errors' {
|
||||
**/
|
||||
[key: string]: AugmentedError<ApiType>;
|
||||
};
|
||||
ump: {
|
||||
/**
|
||||
* The message index given is unknown.
|
||||
**/
|
||||
UnknownMessageIndex: AugmentedError<ApiType>;
|
||||
/**
|
||||
* The amount of weight given is possibly not enough for executing the message.
|
||||
**/
|
||||
WeightOverLimit: AugmentedError<ApiType>;
|
||||
/**
|
||||
* Generic error
|
||||
**/
|
||||
[key: string]: AugmentedError<ApiType>;
|
||||
};
|
||||
utility: {
|
||||
/**
|
||||
* Too many calls batched.
|
||||
|
||||
@@ -10,7 +10,7 @@ import type { Bytes, Null, Option, Result, U8aFixed, Vec, bool, u128, u16, u32,
|
||||
import type { ITuple } from '@polkadot/types-codec/types';
|
||||
import type { EthereumAddress } from '@polkadot/types/interfaces/eth';
|
||||
import type { AccountId32, H256, Perbill, Perquintill } from '@polkadot/types/interfaces/runtime';
|
||||
import type { FrameSupportDispatchDispatchInfo, FrameSupportDispatchPostDispatchInfo, FrameSupportPreimagesBounded, FrameSupportTokensMiscBalanceStatus, KusamaRuntimeProxyType, PalletConvictionVotingTally, PalletElectionProviderMultiPhaseElectionCompute, PalletElectionProviderMultiPhasePhase, PalletImOnlineSr25519AppSr25519Public, PalletMultisigTimepoint, PalletNominationPoolsCommissionChangeRate, PalletNominationPoolsPoolState, PalletRankedCollectiveTally, PalletRankedCollectiveVoteRecord, PalletStakingExposure, PalletStakingForcing, PalletStakingValidatorPrefs, PolkadotParachainPrimitivesHrmpChannelId, PolkadotPrimitivesV4CandidateReceipt, PolkadotRuntimeParachainsDisputesDisputeLocation, PolkadotRuntimeParachainsDisputesDisputeResult, SpConsensusGrandpaAppPublic, SpNposElectionsElectionScore, SpRuntimeDispatchError, SpRuntimeDispatchErrorWithPostInfo, SpWeightsWeightV2Weight, XcmV3MultiLocation, XcmV3MultiassetMultiAssets, XcmV3Response, XcmV3TraitsError, XcmV3TraitsOutcome, XcmV3Xcm, XcmVersionedMultiAssets, XcmVersionedMultiLocation } from '@polkadot/types/lookup';
|
||||
import type { FrameSupportDispatchDispatchInfo, FrameSupportDispatchPostDispatchInfo, FrameSupportMessagesProcessMessageError, FrameSupportPreimagesBounded, FrameSupportTokensMiscBalanceStatus, KusamaRuntimeProxyType, PalletConvictionVotingTally, PalletElectionProviderMultiPhaseElectionCompute, PalletElectionProviderMultiPhasePhase, PalletImOnlineSr25519AppSr25519Public, PalletMultisigTimepoint, PalletNominationPoolsCommissionChangeRate, PalletNominationPoolsPoolState, PalletRankedCollectiveTally, PalletRankedCollectiveVoteRecord, PalletStakingExposure, PalletStakingForcing, PalletStakingValidatorPrefs, PolkadotParachainPrimitivesHrmpChannelId, PolkadotPrimitivesV4CandidateReceipt, PolkadotRuntimeParachainsDisputesDisputeLocation, PolkadotRuntimeParachainsDisputesDisputeResult, PolkadotRuntimeParachainsInclusionAggregateMessageOrigin, SpConsensusGrandpaAppPublic, SpNposElectionsElectionScore, SpRuntimeDispatchError, SpRuntimeDispatchErrorWithPostInfo, SpWeightsWeightV2Weight, XcmV3MultiLocation, XcmV3MultiassetMultiAssets, XcmV3Response, XcmV3TraitsError, XcmV3TraitsOutcome, XcmV3Xcm, XcmVersionedMultiAssets, XcmVersionedMultiLocation } from '@polkadot/types/lookup';
|
||||
|
||||
export type __AugmentedEvent<ApiType extends ApiTypes> = AugmentedEvent<ApiType>;
|
||||
|
||||
@@ -556,6 +556,28 @@ declare module '@polkadot/api-base/types/events' {
|
||||
**/
|
||||
[key: string]: AugmentedEvent<ApiType>;
|
||||
};
|
||||
messageQueue: {
|
||||
/**
|
||||
* Message placed in overweight queue.
|
||||
**/
|
||||
OverweightEnqueued: AugmentedEvent<ApiType, [id: U8aFixed, origin: PolkadotRuntimeParachainsInclusionAggregateMessageOrigin, pageIndex: u32, messageIndex: u32], { id: U8aFixed, origin: PolkadotRuntimeParachainsInclusionAggregateMessageOrigin, pageIndex: u32, messageIndex: u32 }>;
|
||||
/**
|
||||
* This page was reaped.
|
||||
**/
|
||||
PageReaped: AugmentedEvent<ApiType, [origin: PolkadotRuntimeParachainsInclusionAggregateMessageOrigin, index: u32], { origin: PolkadotRuntimeParachainsInclusionAggregateMessageOrigin, index: u32 }>;
|
||||
/**
|
||||
* Message is processed.
|
||||
**/
|
||||
Processed: AugmentedEvent<ApiType, [id: U8aFixed, origin: PolkadotRuntimeParachainsInclusionAggregateMessageOrigin, weightUsed: SpWeightsWeightV2Weight, success: bool], { id: U8aFixed, origin: PolkadotRuntimeParachainsInclusionAggregateMessageOrigin, weightUsed: SpWeightsWeightV2Weight, success: bool }>;
|
||||
/**
|
||||
* Message discarded due to an error in the `MessageProcessor` (usually a format error).
|
||||
**/
|
||||
ProcessingFailed: AugmentedEvent<ApiType, [id: U8aFixed, origin: PolkadotRuntimeParachainsInclusionAggregateMessageOrigin, error: FrameSupportMessagesProcessMessageError], { id: U8aFixed, origin: PolkadotRuntimeParachainsInclusionAggregateMessageOrigin, error: FrameSupportMessagesProcessMessageError }>;
|
||||
/**
|
||||
* Generic event
|
||||
**/
|
||||
[key: string]: AugmentedEvent<ApiType>;
|
||||
};
|
||||
multisig: {
|
||||
/**
|
||||
* A multisig operation has been approved by someone.
|
||||
@@ -813,6 +835,10 @@ declare module '@polkadot/api-base/types/events' {
|
||||
* A candidate timed out. `[candidate, head_data]`
|
||||
**/
|
||||
CandidateTimedOut: AugmentedEvent<ApiType, [PolkadotPrimitivesV4CandidateReceipt, Bytes, u32]>;
|
||||
/**
|
||||
* Some upward messages have been received and will be processed.
|
||||
**/
|
||||
UpwardMessagesReceived: AugmentedEvent<ApiType, [from: u32, count: u32], { from: u32, count: u32 }>;
|
||||
/**
|
||||
* Generic event
|
||||
**/
|
||||
@@ -1320,53 +1346,6 @@ declare module '@polkadot/api-base/types/events' {
|
||||
**/
|
||||
[key: string]: AugmentedEvent<ApiType>;
|
||||
};
|
||||
ump: {
|
||||
/**
|
||||
* Upward message executed with the given outcome.
|
||||
* \[ id, outcome \]
|
||||
**/
|
||||
ExecutedUpward: AugmentedEvent<ApiType, [U8aFixed, XcmV3TraitsOutcome]>;
|
||||
/**
|
||||
* Upward message is invalid XCM.
|
||||
* \[ id \]
|
||||
**/
|
||||
InvalidFormat: AugmentedEvent<ApiType, [U8aFixed]>;
|
||||
/**
|
||||
* The weight budget was exceeded for an individual upward message.
|
||||
*
|
||||
* This message can be later dispatched manually using `service_overweight` dispatchable
|
||||
* using the assigned `overweight_index`.
|
||||
*
|
||||
* \[ para, id, overweight_index, required \]
|
||||
**/
|
||||
OverweightEnqueued: AugmentedEvent<ApiType, [u32, U8aFixed, u64, SpWeightsWeightV2Weight]>;
|
||||
/**
|
||||
* Upward message from the overweight queue was executed with the given actual weight
|
||||
* used.
|
||||
*
|
||||
* \[ overweight_index, used \]
|
||||
**/
|
||||
OverweightServiced: AugmentedEvent<ApiType, [u64, SpWeightsWeightV2Weight]>;
|
||||
/**
|
||||
* Upward message is unsupported version of XCM.
|
||||
* \[ id \]
|
||||
**/
|
||||
UnsupportedVersion: AugmentedEvent<ApiType, [U8aFixed]>;
|
||||
/**
|
||||
* Some upward messages have been received and will be processed.
|
||||
* \[ para, count, size \]
|
||||
**/
|
||||
UpwardMessagesReceived: AugmentedEvent<ApiType, [u32, u32, u32]>;
|
||||
/**
|
||||
* The weight limit for handling upward messages was reached.
|
||||
* \[ id, remaining, required \]
|
||||
**/
|
||||
WeightExhausted: AugmentedEvent<ApiType, [U8aFixed, SpWeightsWeightV2Weight, SpWeightsWeightV2Weight]>;
|
||||
/**
|
||||
* Generic event
|
||||
**/
|
||||
[key: string]: AugmentedEvent<ApiType>;
|
||||
};
|
||||
utility: {
|
||||
/**
|
||||
* Batch of dispatches completed fully with no error.
|
||||
@@ -1439,36 +1418,26 @@ declare module '@polkadot/api-base/types/events' {
|
||||
xcmPallet: {
|
||||
/**
|
||||
* Some assets have been claimed from an asset trap
|
||||
*
|
||||
* \[ hash, origin, assets \]
|
||||
**/
|
||||
AssetsClaimed: AugmentedEvent<ApiType, [H256, XcmV3MultiLocation, XcmVersionedMultiAssets]>;
|
||||
AssetsClaimed: AugmentedEvent<ApiType, [hash_: H256, origin: XcmV3MultiLocation, assets: XcmVersionedMultiAssets], { hash_: H256, origin: XcmV3MultiLocation, assets: XcmVersionedMultiAssets }>;
|
||||
/**
|
||||
* Some assets have been placed in an asset trap.
|
||||
*
|
||||
* \[ hash, origin, assets \]
|
||||
**/
|
||||
AssetsTrapped: AugmentedEvent<ApiType, [H256, XcmV3MultiLocation, XcmVersionedMultiAssets]>;
|
||||
AssetsTrapped: AugmentedEvent<ApiType, [hash_: H256, origin: XcmV3MultiLocation, assets: XcmVersionedMultiAssets], { hash_: H256, origin: XcmV3MultiLocation, assets: XcmVersionedMultiAssets }>;
|
||||
/**
|
||||
* Execution of an XCM message was attempted.
|
||||
*
|
||||
* \[ outcome \]
|
||||
**/
|
||||
Attempted: AugmentedEvent<ApiType, [XcmV3TraitsOutcome]>;
|
||||
Attempted: AugmentedEvent<ApiType, [outcome: XcmV3TraitsOutcome], { outcome: XcmV3TraitsOutcome }>;
|
||||
/**
|
||||
* Fees were paid from a location for an operation (often for using `SendXcm`).
|
||||
*
|
||||
* \[ paying location, fees \]
|
||||
**/
|
||||
FeesPaid: AugmentedEvent<ApiType, [XcmV3MultiLocation, XcmV3MultiassetMultiAssets]>;
|
||||
FeesPaid: AugmentedEvent<ApiType, [paying: XcmV3MultiLocation, fees: XcmV3MultiassetMultiAssets], { paying: XcmV3MultiLocation, fees: XcmV3MultiassetMultiAssets }>;
|
||||
/**
|
||||
* Expected query response has been received but the querier location of the response does
|
||||
* not match the expected. The query remains registered for a later, valid, response to
|
||||
* be received and acted upon.
|
||||
*
|
||||
* \[ origin location, id, expected querier, maybe actual querier \]
|
||||
**/
|
||||
InvalidQuerier: AugmentedEvent<ApiType, [XcmV3MultiLocation, u64, XcmV3MultiLocation, Option<XcmV3MultiLocation>]>;
|
||||
InvalidQuerier: AugmentedEvent<ApiType, [origin: XcmV3MultiLocation, queryId: u64, expectedQuerier: XcmV3MultiLocation, maybeActualQuerier: Option<XcmV3MultiLocation>], { origin: XcmV3MultiLocation, queryId: u64, expectedQuerier: XcmV3MultiLocation, maybeActualQuerier: Option<XcmV3MultiLocation> }>;
|
||||
/**
|
||||
* Expected query response has been received but the expected querier location placed in
|
||||
* storage by this runtime previously cannot be decoded. The query remains registered.
|
||||
@@ -1477,18 +1446,14 @@ declare module '@polkadot/api-base/types/events' {
|
||||
* runtime should be readable prior to query timeout) and dangerous since the possibly
|
||||
* valid response will be dropped. Manual governance intervention is probably going to be
|
||||
* needed.
|
||||
*
|
||||
* \[ origin location, id \]
|
||||
**/
|
||||
InvalidQuerierVersion: AugmentedEvent<ApiType, [XcmV3MultiLocation, u64]>;
|
||||
InvalidQuerierVersion: AugmentedEvent<ApiType, [origin: XcmV3MultiLocation, queryId: u64], { origin: XcmV3MultiLocation, queryId: u64 }>;
|
||||
/**
|
||||
* Expected query response has been received but the origin location of the response does
|
||||
* not match that expected. The query remains registered for a later, valid, response to
|
||||
* be received and acted upon.
|
||||
*
|
||||
* \[ origin location, id, expected location \]
|
||||
**/
|
||||
InvalidResponder: AugmentedEvent<ApiType, [XcmV3MultiLocation, u64, Option<XcmV3MultiLocation>]>;
|
||||
InvalidResponder: AugmentedEvent<ApiType, [origin: XcmV3MultiLocation, queryId: u64, expectedLocation: Option<XcmV3MultiLocation>], { origin: XcmV3MultiLocation, queryId: u64, expectedLocation: Option<XcmV3MultiLocation> }>;
|
||||
/**
|
||||
* Expected query response has been received but the expected origin location placed in
|
||||
* storage by this runtime previously cannot be decoded. The query remains registered.
|
||||
@@ -1497,115 +1462,83 @@ declare module '@polkadot/api-base/types/events' {
|
||||
* runtime should be readable prior to query timeout) and dangerous since the possibly
|
||||
* valid response will be dropped. Manual governance intervention is probably going to be
|
||||
* needed.
|
||||
*
|
||||
* \[ origin location, id \]
|
||||
**/
|
||||
InvalidResponderVersion: AugmentedEvent<ApiType, [XcmV3MultiLocation, u64]>;
|
||||
InvalidResponderVersion: AugmentedEvent<ApiType, [origin: XcmV3MultiLocation, queryId: u64], { origin: XcmV3MultiLocation, queryId: u64 }>;
|
||||
/**
|
||||
* Query response has been received and query is removed. The registered notification has
|
||||
* been dispatched and executed successfully.
|
||||
*
|
||||
* \[ id, pallet index, call index \]
|
||||
**/
|
||||
Notified: AugmentedEvent<ApiType, [u64, u8, u8]>;
|
||||
Notified: AugmentedEvent<ApiType, [queryId: u64, palletIndex: u8, callIndex: u8], { queryId: u64, palletIndex: u8, callIndex: u8 }>;
|
||||
/**
|
||||
* Query response has been received and query is removed. The dispatch was unable to be
|
||||
* decoded into a `Call`; this might be due to dispatch function having a signature which
|
||||
* is not `(origin, QueryId, Response)`.
|
||||
*
|
||||
* \[ id, pallet index, call index \]
|
||||
**/
|
||||
NotifyDecodeFailed: AugmentedEvent<ApiType, [u64, u8, u8]>;
|
||||
NotifyDecodeFailed: AugmentedEvent<ApiType, [queryId: u64, palletIndex: u8, callIndex: u8], { queryId: u64, palletIndex: u8, callIndex: u8 }>;
|
||||
/**
|
||||
* Query response has been received and query is removed. There was a general error with
|
||||
* dispatching the notification call.
|
||||
*
|
||||
* \[ id, pallet index, call index \]
|
||||
**/
|
||||
NotifyDispatchError: AugmentedEvent<ApiType, [u64, u8, u8]>;
|
||||
NotifyDispatchError: AugmentedEvent<ApiType, [queryId: u64, palletIndex: u8, callIndex: u8], { queryId: u64, palletIndex: u8, callIndex: u8 }>;
|
||||
/**
|
||||
* Query response has been received and query is removed. The registered notification could
|
||||
* not be dispatched because the dispatch weight is greater than the maximum weight
|
||||
* originally budgeted by this runtime for the query result.
|
||||
*
|
||||
* \[ id, pallet index, call index, actual weight, max budgeted weight \]
|
||||
**/
|
||||
NotifyOverweight: AugmentedEvent<ApiType, [u64, u8, u8, SpWeightsWeightV2Weight, SpWeightsWeightV2Weight]>;
|
||||
NotifyOverweight: AugmentedEvent<ApiType, [queryId: u64, palletIndex: u8, callIndex: u8, actualWeight: SpWeightsWeightV2Weight, maxBudgetedWeight: SpWeightsWeightV2Weight], { queryId: u64, palletIndex: u8, callIndex: u8, actualWeight: SpWeightsWeightV2Weight, maxBudgetedWeight: SpWeightsWeightV2Weight }>;
|
||||
/**
|
||||
* A given location which had a version change subscription was dropped owing to an error
|
||||
* migrating the location to our new XCM format.
|
||||
*
|
||||
* \[ location, query ID \]
|
||||
**/
|
||||
NotifyTargetMigrationFail: AugmentedEvent<ApiType, [XcmVersionedMultiLocation, u64]>;
|
||||
NotifyTargetMigrationFail: AugmentedEvent<ApiType, [location: XcmVersionedMultiLocation, queryId: u64], { location: XcmVersionedMultiLocation, queryId: u64 }>;
|
||||
/**
|
||||
* A given location which had a version change subscription was dropped owing to an error
|
||||
* sending the notification to it.
|
||||
*
|
||||
* \[ location, query ID, error \]
|
||||
**/
|
||||
NotifyTargetSendFail: AugmentedEvent<ApiType, [XcmV3MultiLocation, u64, XcmV3TraitsError]>;
|
||||
NotifyTargetSendFail: AugmentedEvent<ApiType, [location: XcmV3MultiLocation, queryId: u64, error: XcmV3TraitsError], { location: XcmV3MultiLocation, queryId: u64, error: XcmV3TraitsError }>;
|
||||
/**
|
||||
* Query response has been received and is ready for taking with `take_response`. There is
|
||||
* no registered notification call.
|
||||
*
|
||||
* \[ id, response \]
|
||||
**/
|
||||
ResponseReady: AugmentedEvent<ApiType, [u64, XcmV3Response]>;
|
||||
ResponseReady: AugmentedEvent<ApiType, [queryId: u64, response: XcmV3Response], { queryId: u64, response: XcmV3Response }>;
|
||||
/**
|
||||
* Received query response has been read and removed.
|
||||
*
|
||||
* \[ id \]
|
||||
**/
|
||||
ResponseTaken: AugmentedEvent<ApiType, [u64]>;
|
||||
ResponseTaken: AugmentedEvent<ApiType, [queryId: u64], { queryId: u64 }>;
|
||||
/**
|
||||
* A XCM message was sent.
|
||||
*
|
||||
* \[ origin, destination, message \]
|
||||
**/
|
||||
Sent: AugmentedEvent<ApiType, [XcmV3MultiLocation, XcmV3MultiLocation, XcmV3Xcm]>;
|
||||
Sent: AugmentedEvent<ApiType, [origin: XcmV3MultiLocation, destination: XcmV3MultiLocation, message: XcmV3Xcm, messageId: U8aFixed], { origin: XcmV3MultiLocation, destination: XcmV3MultiLocation, message: XcmV3Xcm, messageId: U8aFixed }>;
|
||||
/**
|
||||
* The supported version of a location has been changed. This might be through an
|
||||
* automatic notification or a manual intervention.
|
||||
*
|
||||
* \[ location, XCM version \]
|
||||
**/
|
||||
SupportedVersionChanged: AugmentedEvent<ApiType, [XcmV3MultiLocation, u32]>;
|
||||
SupportedVersionChanged: AugmentedEvent<ApiType, [location: XcmV3MultiLocation, version: u32], { location: XcmV3MultiLocation, version: u32 }>;
|
||||
/**
|
||||
* Query response received which does not match a registered query. This may be because a
|
||||
* matching query was never registered, it may be because it is a duplicate response, or
|
||||
* because the query timed out.
|
||||
*
|
||||
* \[ origin location, id \]
|
||||
**/
|
||||
UnexpectedResponse: AugmentedEvent<ApiType, [XcmV3MultiLocation, u64]>;
|
||||
UnexpectedResponse: AugmentedEvent<ApiType, [origin: XcmV3MultiLocation, queryId: u64], { origin: XcmV3MultiLocation, queryId: u64 }>;
|
||||
/**
|
||||
* An XCM version change notification message has been attempted to be sent.
|
||||
*
|
||||
* The cost of sending it (borne by the chain) is included.
|
||||
*
|
||||
* \[ destination, result, cost \]
|
||||
**/
|
||||
VersionChangeNotified: AugmentedEvent<ApiType, [XcmV3MultiLocation, u32, XcmV3MultiassetMultiAssets]>;
|
||||
VersionChangeNotified: AugmentedEvent<ApiType, [destination: XcmV3MultiLocation, result: u32, cost: XcmV3MultiassetMultiAssets, messageId: U8aFixed], { destination: XcmV3MultiLocation, result: u32, cost: XcmV3MultiassetMultiAssets, messageId: U8aFixed }>;
|
||||
/**
|
||||
* We have requested that a remote chain sends us XCM version change notifications.
|
||||
*
|
||||
* \[ destination location, cost \]
|
||||
* We have requested that a remote chain send us XCM version change notifications.
|
||||
**/
|
||||
VersionNotifyRequested: AugmentedEvent<ApiType, [XcmV3MultiLocation, XcmV3MultiassetMultiAssets]>;
|
||||
VersionNotifyRequested: AugmentedEvent<ApiType, [destination: XcmV3MultiLocation, cost: XcmV3MultiassetMultiAssets, messageId: U8aFixed], { destination: XcmV3MultiLocation, cost: XcmV3MultiassetMultiAssets, messageId: U8aFixed }>;
|
||||
/**
|
||||
* A remote has requested XCM version change notification from us and we have honored it.
|
||||
* A version information message is sent to them and its cost is included.
|
||||
*
|
||||
* \[ destination location, cost \]
|
||||
**/
|
||||
VersionNotifyStarted: AugmentedEvent<ApiType, [XcmV3MultiLocation, XcmV3MultiassetMultiAssets]>;
|
||||
VersionNotifyStarted: AugmentedEvent<ApiType, [destination: XcmV3MultiLocation, cost: XcmV3MultiassetMultiAssets, messageId: U8aFixed], { destination: XcmV3MultiLocation, cost: XcmV3MultiassetMultiAssets, messageId: U8aFixed }>;
|
||||
/**
|
||||
* We have requested that a remote chain stops sending us XCM version change notifications.
|
||||
*
|
||||
* \[ destination location, cost \]
|
||||
**/
|
||||
VersionNotifyUnrequested: AugmentedEvent<ApiType, [XcmV3MultiLocation, XcmV3MultiassetMultiAssets]>;
|
||||
VersionNotifyUnrequested: AugmentedEvent<ApiType, [destination: XcmV3MultiLocation, cost: XcmV3MultiassetMultiAssets, messageId: U8aFixed], { destination: XcmV3MultiLocation, cost: XcmV3MultiassetMultiAssets, messageId: U8aFixed }>;
|
||||
/**
|
||||
* Generic event
|
||||
**/
|
||||
|
||||
@@ -11,7 +11,7 @@ import type { BTreeSet, Bytes, Null, Option, Struct, U8aFixed, Vec, WrapperOpaqu
|
||||
import type { AnyNumber, ITuple } from '@polkadot/types-codec/types';
|
||||
import type { EthereumAddress } from '@polkadot/types/interfaces/eth';
|
||||
import type { AccountId32, H256, Perbill, Percent } from '@polkadot/types/interfaces/runtime';
|
||||
import type { FrameSupportDispatchPerDispatchClassWeight, FrameSystemAccountInfo, FrameSystemEventRecord, FrameSystemLastRuntimeUpgradeInfo, FrameSystemPhase, KusamaRuntimeRuntimeHoldReason, KusamaRuntimeSessionKeys, PalletBagsListListBag, PalletBagsListListNode, PalletBalancesAccountData, PalletBalancesBalanceLock, PalletBalancesIdAmount, PalletBalancesReserveData, PalletBountiesBounty, PalletChildBountiesChildBounty, PalletConvictionVotingVoteVoting, PalletElectionProviderMultiPhasePhase, PalletElectionProviderMultiPhaseReadySolution, PalletElectionProviderMultiPhaseRoundSnapshot, PalletElectionProviderMultiPhaseSignedSignedSubmission, PalletElectionProviderMultiPhaseSolutionOrSnapshotSize, PalletFastUnstakeUnstakeRequest, PalletGrandpaStoredPendingChange, PalletGrandpaStoredState, PalletIdentityRegistrarInfo, PalletIdentityRegistration, PalletImOnlineBoundedOpaqueNetworkState, PalletImOnlineSr25519AppSr25519Public, PalletMultisigMultisig, PalletNisBid, PalletNisReceiptRecord, PalletNisSummaryRecord, PalletNominationPoolsBondedPoolInner, PalletNominationPoolsClaimPermission, PalletNominationPoolsPoolMember, PalletNominationPoolsRewardPool, PalletNominationPoolsSubPools, PalletPreimageRequestStatus, PalletProxyAnnouncement, PalletProxyProxyDefinition, PalletRankedCollectiveMemberRecord, PalletRankedCollectiveVoteRecord, PalletRecoveryActiveRecovery, PalletRecoveryRecoveryConfig, PalletReferendaReferendumInfoConvictionVotingTally, PalletReferendaReferendumInfoRankedCollectiveTally, PalletSchedulerScheduled, PalletSocietyBid, PalletSocietyBidKind, PalletSocietyVote, PalletSocietyVouchingStatus, PalletStakingActiveEraInfo, PalletStakingEraRewardPoints, PalletStakingExposure, PalletStakingForcing, PalletStakingNominations, PalletStakingRewardDestination, PalletStakingSlashingSlashingSpans, PalletStakingSlashingSpanRecord, PalletStakingStakingLedger, PalletStakingUnappliedSlash, PalletStakingValidatorPrefs, PalletTransactionPaymentReleases, PalletTreasuryProposal, PalletVestingReleases, PalletVestingVestingInfo, PalletXcmQueryStatus, PalletXcmRemoteLockedFungibleRecord, PalletXcmVersionMigrationStage, PolkadotCorePrimitivesInboundDownwardMessage, PolkadotCorePrimitivesInboundHrmpMessage, PolkadotParachainPrimitivesHrmpChannelId, PolkadotPrimitivesV4AssignmentAppPublic, PolkadotPrimitivesV4CandidateCommitments, PolkadotPrimitivesV4CoreOccupied, PolkadotPrimitivesV4DisputeState, PolkadotPrimitivesV4ExecutorParams, PolkadotPrimitivesV4ScrapedOnChainVotes, PolkadotPrimitivesV4SessionInfo, PolkadotPrimitivesV4UpgradeGoAhead, PolkadotPrimitivesV4UpgradeRestriction, PolkadotPrimitivesV4ValidatorAppPublic, PolkadotRuntimeCommonClaimsStatementKind, PolkadotRuntimeCommonCrowdloanFundInfo, PolkadotRuntimeCommonParasRegistrarParaInfo, PolkadotRuntimeParachainsConfigurationHostConfiguration, PolkadotRuntimeParachainsDisputesSlashingPendingSlashes, PolkadotRuntimeParachainsHrmpHrmpChannel, PolkadotRuntimeParachainsHrmpHrmpOpenChannelRequest, PolkadotRuntimeParachainsInclusionAvailabilityBitfieldRecord, PolkadotRuntimeParachainsInclusionCandidatePendingAvailability, PolkadotRuntimeParachainsInitializerBufferedSessionChange, PolkadotRuntimeParachainsParasParaGenesisArgs, PolkadotRuntimeParachainsParasParaLifecycle, PolkadotRuntimeParachainsParasParaPastCodeMeta, PolkadotRuntimeParachainsParasPvfCheckActiveVoteState, PolkadotRuntimeParachainsSchedulerCoreAssignment, PolkadotRuntimeParachainsSchedulerParathreadClaimQueue, SpConsensusBabeAppPublic, SpConsensusBabeBabeEpochConfiguration, SpConsensusBabeDigestsNextConfigDescriptor, SpConsensusBabeDigestsPreDigest, SpCoreCryptoKeyTypeId, SpNposElectionsElectionScore, SpRuntimeDigest, SpStakingOffenceOffenceDetails, SpWeightsWeightV2Weight, XcmVersionedAssetId, XcmVersionedMultiLocation } from '@polkadot/types/lookup';
|
||||
import type { FrameSupportDispatchPerDispatchClassWeight, FrameSystemAccountInfo, FrameSystemEventRecord, FrameSystemLastRuntimeUpgradeInfo, FrameSystemPhase, KusamaRuntimeRuntimeHoldReason, KusamaRuntimeSessionKeys, PalletBagsListListBag, PalletBagsListListNode, PalletBalancesAccountData, PalletBalancesBalanceLock, PalletBalancesIdAmount, PalletBalancesReserveData, PalletBountiesBounty, PalletChildBountiesChildBounty, PalletConvictionVotingVoteVoting, PalletElectionProviderMultiPhasePhase, PalletElectionProviderMultiPhaseReadySolution, PalletElectionProviderMultiPhaseRoundSnapshot, PalletElectionProviderMultiPhaseSignedSignedSubmission, PalletElectionProviderMultiPhaseSolutionOrSnapshotSize, PalletFastUnstakeUnstakeRequest, PalletGrandpaStoredPendingChange, PalletGrandpaStoredState, PalletIdentityRegistrarInfo, PalletIdentityRegistration, PalletImOnlineBoundedOpaqueNetworkState, PalletImOnlineSr25519AppSr25519Public, PalletMessageQueueBookState, PalletMessageQueuePage, PalletMultisigMultisig, PalletNisBid, PalletNisReceiptRecord, PalletNisSummaryRecord, PalletNominationPoolsBondedPoolInner, PalletNominationPoolsClaimPermission, PalletNominationPoolsPoolMember, PalletNominationPoolsRewardPool, PalletNominationPoolsSubPools, PalletPreimageRequestStatus, PalletProxyAnnouncement, PalletProxyProxyDefinition, PalletRankedCollectiveMemberRecord, PalletRankedCollectiveVoteRecord, PalletRecoveryActiveRecovery, PalletRecoveryRecoveryConfig, PalletReferendaReferendumInfoConvictionVotingTally, PalletReferendaReferendumInfoRankedCollectiveTally, PalletSchedulerScheduled, PalletSocietyBid, PalletSocietyBidKind, PalletSocietyVote, PalletSocietyVouchingStatus, PalletStakingActiveEraInfo, PalletStakingEraRewardPoints, PalletStakingExposure, PalletStakingForcing, PalletStakingNominations, PalletStakingRewardDestination, PalletStakingSlashingSlashingSpans, PalletStakingSlashingSpanRecord, PalletStakingStakingLedger, PalletStakingUnappliedSlash, PalletStakingValidatorPrefs, PalletTransactionPaymentReleases, PalletTreasuryProposal, PalletVestingReleases, PalletVestingVestingInfo, PalletXcmQueryStatus, PalletXcmRemoteLockedFungibleRecord, PalletXcmVersionMigrationStage, PolkadotCorePrimitivesInboundDownwardMessage, PolkadotCorePrimitivesInboundHrmpMessage, PolkadotParachainPrimitivesHrmpChannelId, PolkadotPrimitivesV4AssignmentAppPublic, PolkadotPrimitivesV4CandidateCommitments, PolkadotPrimitivesV4CoreOccupied, PolkadotPrimitivesV4DisputeState, PolkadotPrimitivesV4ExecutorParams, PolkadotPrimitivesV4ScrapedOnChainVotes, PolkadotPrimitivesV4SessionInfo, PolkadotPrimitivesV4UpgradeGoAhead, PolkadotPrimitivesV4UpgradeRestriction, PolkadotPrimitivesV4ValidatorAppPublic, PolkadotPrimitivesVstagingSlashingPendingSlashes, PolkadotRuntimeCommonClaimsStatementKind, PolkadotRuntimeCommonCrowdloanFundInfo, PolkadotRuntimeCommonParasRegistrarParaInfo, PolkadotRuntimeParachainsConfigurationHostConfiguration, PolkadotRuntimeParachainsHrmpHrmpChannel, PolkadotRuntimeParachainsHrmpHrmpOpenChannelRequest, PolkadotRuntimeParachainsInclusionAggregateMessageOrigin, PolkadotRuntimeParachainsInclusionAvailabilityBitfieldRecord, PolkadotRuntimeParachainsInclusionCandidatePendingAvailability, PolkadotRuntimeParachainsInitializerBufferedSessionChange, PolkadotRuntimeParachainsParasParaGenesisArgs, PolkadotRuntimeParachainsParasParaLifecycle, PolkadotRuntimeParachainsParasParaPastCodeMeta, PolkadotRuntimeParachainsParasPvfCheckActiveVoteState, PolkadotRuntimeParachainsSchedulerCoreAssignment, PolkadotRuntimeParachainsSchedulerParathreadClaimQueue, SpConsensusBabeAppPublic, SpConsensusBabeBabeEpochConfiguration, SpConsensusBabeDigestsNextConfigDescriptor, SpConsensusBabeDigestsPreDigest, SpCoreCryptoKeyTypeId, SpNposElectionsElectionScore, SpRuntimeDigest, SpStakingOffenceOffenceDetails, SpWeightsWeightV2Weight, XcmVersionedAssetId, XcmVersionedMultiLocation } from '@polkadot/types/lookup';
|
||||
import type { Observable } from '@polkadot/types/types';
|
||||
|
||||
export type __AugmentedQuery<ApiType extends ApiTypes> = AugmentedQuery<ApiType, () => unknown>;
|
||||
@@ -482,22 +482,24 @@ declare module '@polkadot/api-base/types/storage' {
|
||||
/**
|
||||
* Number of eras to check per block.
|
||||
*
|
||||
* If set to 0, this pallet does absolutely nothing.
|
||||
* If set to 0, this pallet does absolutely nothing. Cannot be set to more than
|
||||
* [`Config::MaxErasToCheckPerBlock`].
|
||||
*
|
||||
* Based on the amount of weight available at `on_idle`, up to this many eras of a single
|
||||
* nominator might be checked.
|
||||
* Based on the amount of weight available at [`Pallet::on_idle`], up to this many eras are
|
||||
* checked. The checking is represented by updating [`UnstakeRequest::checked`], which is
|
||||
* stored in [`Head`].
|
||||
**/
|
||||
erasToCheckPerBlock: AugmentedQuery<ApiType, () => Observable<u32>, []> & QueryableStorageEntry<ApiType, []>;
|
||||
/**
|
||||
* The current "head of the queue" being unstaked.
|
||||
*
|
||||
* The head in itself can be a batch of up to [`Config::BatchSize`] stakers.
|
||||
**/
|
||||
head: AugmentedQuery<ApiType, () => Observable<Option<PalletFastUnstakeUnstakeRequest>>, []> & QueryableStorageEntry<ApiType, []>;
|
||||
/**
|
||||
* The map of all accounts wishing to be unstaked.
|
||||
*
|
||||
* Keeps track of `AccountId` wishing to unstake and it's corresponding deposit.
|
||||
*
|
||||
* TWOX-NOTE: SAFE since `AccountId` is a secure hash.
|
||||
**/
|
||||
queue: AugmentedQuery<ApiType, (arg: AccountId32 | string | Uint8Array) => Observable<Option<u128>>, [AccountId32]> & QueryableStorageEntry<ApiType, [AccountId32]>;
|
||||
/**
|
||||
@@ -793,6 +795,24 @@ declare module '@polkadot/api-base/types/storage' {
|
||||
**/
|
||||
[key: string]: QueryableStorageEntry<ApiType>;
|
||||
};
|
||||
messageQueue: {
|
||||
/**
|
||||
* The index of the first and last (non-empty) pages.
|
||||
**/
|
||||
bookStateFor: AugmentedQuery<ApiType, (arg: PolkadotRuntimeParachainsInclusionAggregateMessageOrigin | { Ump: any } | string | Uint8Array) => Observable<PalletMessageQueueBookState>, [PolkadotRuntimeParachainsInclusionAggregateMessageOrigin]> & QueryableStorageEntry<ApiType, [PolkadotRuntimeParachainsInclusionAggregateMessageOrigin]>;
|
||||
/**
|
||||
* The map of page indices to pages.
|
||||
**/
|
||||
pages: AugmentedQuery<ApiType, (arg1: PolkadotRuntimeParachainsInclusionAggregateMessageOrigin | { Ump: any } | string | Uint8Array, arg2: u32 | AnyNumber | Uint8Array) => Observable<Option<PalletMessageQueuePage>>, [PolkadotRuntimeParachainsInclusionAggregateMessageOrigin, u32]> & QueryableStorageEntry<ApiType, [PolkadotRuntimeParachainsInclusionAggregateMessageOrigin, u32]>;
|
||||
/**
|
||||
* The origin at which we should begin servicing.
|
||||
**/
|
||||
serviceHead: AugmentedQuery<ApiType, () => Observable<Option<PolkadotRuntimeParachainsInclusionAggregateMessageOrigin>>, []> & QueryableStorageEntry<ApiType, []>;
|
||||
/**
|
||||
* Generic query
|
||||
**/
|
||||
[key: string]: QueryableStorageEntry<ApiType>;
|
||||
};
|
||||
multisig: {
|
||||
/**
|
||||
* The set of open multisig operations.
|
||||
@@ -864,7 +884,10 @@ declare module '@polkadot/api-base/types/storage' {
|
||||
/**
|
||||
* Holds on account balances.
|
||||
**/
|
||||
holds: AugmentedQuery<ApiType, (arg: AccountId32 | string | Uint8Array) => Observable<Vec<PalletBalancesIdAmount>>, [AccountId32]> & QueryableStorageEntry<ApiType, [AccountId32]>;
|
||||
holds: AugmentedQuery<ApiType, (arg: AccountId32 | string | Uint8Array) => Observable<Vec<{
|
||||
readonly id: KusamaRuntimeRuntimeHoldReason;
|
||||
readonly amount: u128;
|
||||
} & Struct>>, [AccountId32]> & QueryableStorageEntry<ApiType, [AccountId32]>;
|
||||
/**
|
||||
* The total units of outstanding deactivated balance in the system.
|
||||
**/
|
||||
@@ -1316,7 +1339,7 @@ declare module '@polkadot/api-base/types/storage' {
|
||||
/**
|
||||
* Validators pending dispute slashes.
|
||||
**/
|
||||
unappliedSlashes: AugmentedQuery<ApiType, (arg1: u32 | AnyNumber | Uint8Array, arg2: H256 | string | Uint8Array) => Observable<Option<PolkadotRuntimeParachainsDisputesSlashingPendingSlashes>>, [u32, H256]> & QueryableStorageEntry<ApiType, [u32, H256]>;
|
||||
unappliedSlashes: AugmentedQuery<ApiType, (arg1: u32 | AnyNumber | Uint8Array, arg2: H256 | string | Uint8Array) => Observable<Option<PolkadotPrimitivesVstagingSlashingPendingSlashes>>, [u32, H256]> & QueryableStorageEntry<ApiType, [u32, H256]>;
|
||||
/**
|
||||
* `ValidatorSetCount` per session.
|
||||
**/
|
||||
@@ -1951,66 +1974,6 @@ declare module '@polkadot/api-base/types/storage' {
|
||||
**/
|
||||
[key: string]: QueryableStorageEntry<ApiType>;
|
||||
};
|
||||
ump: {
|
||||
/**
|
||||
* Counter for the related counted storage map
|
||||
**/
|
||||
counterForOverweight: AugmentedQuery<ApiType, () => Observable<u32>, []> & QueryableStorageEntry<ApiType, []>;
|
||||
/**
|
||||
* The ordered list of `ParaId`s that have a `RelayDispatchQueue` entry.
|
||||
*
|
||||
* Invariant:
|
||||
* - The set of items from this vector should be exactly the set of the keys in
|
||||
* `RelayDispatchQueues` and `RelayDispatchQueueSize`.
|
||||
**/
|
||||
needsDispatch: AugmentedQuery<ApiType, () => Observable<Vec<u32>>, []> & QueryableStorageEntry<ApiType, []>;
|
||||
/**
|
||||
* This is the para that gets will get dispatched first during the next upward dispatchable queue
|
||||
* execution round.
|
||||
*
|
||||
* Invariant:
|
||||
* - If `Some(para)`, then `para` must be present in `NeedsDispatch`.
|
||||
**/
|
||||
nextDispatchRoundStartWith: AugmentedQuery<ApiType, () => Observable<Option<u32>>, []> & QueryableStorageEntry<ApiType, []>;
|
||||
/**
|
||||
* The messages that exceeded max individual message weight budget.
|
||||
*
|
||||
* These messages stay there until manually dispatched.
|
||||
**/
|
||||
overweight: AugmentedQuery<ApiType, (arg: u64 | AnyNumber | Uint8Array) => Observable<Option<ITuple<[u32, Bytes]>>>, [u64]> & QueryableStorageEntry<ApiType, [u64]>;
|
||||
/**
|
||||
* The number of overweight messages ever recorded in `Overweight` (and thus the lowest free
|
||||
* index).
|
||||
**/
|
||||
overweightCount: AugmentedQuery<ApiType, () => Observable<u64>, []> & QueryableStorageEntry<ApiType, []>;
|
||||
/**
|
||||
* The messages waiting to be handled by the relay-chain originating from a certain parachain.
|
||||
*
|
||||
* Note that some upward messages might have been already processed by the inclusion logic. E.g.
|
||||
* channel management messages.
|
||||
*
|
||||
* The messages are processed in FIFO order.
|
||||
**/
|
||||
relayDispatchQueues: AugmentedQuery<ApiType, (arg: u32 | AnyNumber | Uint8Array) => Observable<Vec<Bytes>>, [u32]> & QueryableStorageEntry<ApiType, [u32]>;
|
||||
/**
|
||||
* Size of the dispatch queues. Caches sizes of the queues in `RelayDispatchQueue`.
|
||||
*
|
||||
* First item in the tuple is the count of messages and second
|
||||
* is the total length (in bytes) of the message payloads.
|
||||
*
|
||||
* Note that this is an auxiliary mapping: it's possible to tell the byte size and the number of
|
||||
* messages only looking at `RelayDispatchQueues`. This mapping is separate to avoid the cost of
|
||||
* loading the whole message queue if only the total size and count are required.
|
||||
*
|
||||
* Invariant:
|
||||
* - The set of keys should exactly match the set of keys of `RelayDispatchQueues`.
|
||||
**/
|
||||
relayDispatchQueueSize: AugmentedQuery<ApiType, (arg: u32 | AnyNumber | Uint8Array) => Observable<ITuple<[u32, u32]>>, [u32]> & QueryableStorageEntry<ApiType, [u32]>;
|
||||
/**
|
||||
* Generic query
|
||||
**/
|
||||
[key: string]: QueryableStorageEntry<ApiType>;
|
||||
};
|
||||
vesting: {
|
||||
/**
|
||||
* Storage version of the pallet.
|
||||
|
||||
+369
-2706
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: '10.7.3' };
|
||||
export const packageInfo = { name: '@polkadot/api-augment', path: 'auto', type: 'auto', version: '10.9.1' };
|
||||
|
||||
@@ -455,6 +455,34 @@ declare module '@polkadot/api-base/types/consts' {
|
||||
**/
|
||||
[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 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.
|
||||
*
|
||||
* This may be legitimately `None` in the case that you will call
|
||||
* `ServiceQueues::service_queues` manually.
|
||||
**/
|
||||
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
|
||||
|
||||
@@ -855,6 +855,44 @@ declare module '@polkadot/api-base/types/errors' {
|
||||
**/
|
||||
[key: string]: AugmentedError<ApiType>;
|
||||
};
|
||||
messageQueue: {
|
||||
/**
|
||||
* The message was already processed and cannot be processed again.
|
||||
**/
|
||||
AlreadyProcessed: AugmentedError<ApiType>;
|
||||
/**
|
||||
* There is temporarily not enough weight to continue servicing messages.
|
||||
**/
|
||||
InsufficientWeight: AugmentedError<ApiType>;
|
||||
/**
|
||||
* The referenced message could not be found.
|
||||
**/
|
||||
NoMessage: AugmentedError<ApiType>;
|
||||
/**
|
||||
* Page to be reaped does not exist.
|
||||
**/
|
||||
NoPage: AugmentedError<ApiType>;
|
||||
/**
|
||||
* Page is not reapable because it has items remaining to be processed and is not old
|
||||
* enough.
|
||||
**/
|
||||
NotReapable: AugmentedError<ApiType>;
|
||||
/**
|
||||
* The message is queued for future execution.
|
||||
**/
|
||||
Queued: AugmentedError<ApiType>;
|
||||
/**
|
||||
* This message is temporarily unprocessable.
|
||||
*
|
||||
* Such errors are expected, but not guaranteed, to resolve themselves eventually through
|
||||
* retrying.
|
||||
**/
|
||||
TemporarilyUnprocessable: AugmentedError<ApiType>;
|
||||
/**
|
||||
* Generic error
|
||||
**/
|
||||
[key: string]: AugmentedError<ApiType>;
|
||||
};
|
||||
multisig: {
|
||||
/**
|
||||
* Call is already approved by this signatory.
|
||||
@@ -1928,20 +1966,6 @@ declare module '@polkadot/api-base/types/errors' {
|
||||
**/
|
||||
[key: string]: AugmentedError<ApiType>;
|
||||
};
|
||||
ump: {
|
||||
/**
|
||||
* The message index given is unknown.
|
||||
**/
|
||||
UnknownMessageIndex: AugmentedError<ApiType>;
|
||||
/**
|
||||
* The amount of weight given is possibly not enough for executing the message.
|
||||
**/
|
||||
WeightOverLimit: AugmentedError<ApiType>;
|
||||
/**
|
||||
* Generic error
|
||||
**/
|
||||
[key: string]: AugmentedError<ApiType>;
|
||||
};
|
||||
utility: {
|
||||
/**
|
||||
* Too many calls batched.
|
||||
|
||||
@@ -10,7 +10,7 @@ import type { Bytes, Null, Option, Result, U8aFixed, Vec, bool, u128, u16, u32,
|
||||
import type { ITuple } from '@polkadot/types-codec/types';
|
||||
import type { EthereumAddress } from '@polkadot/types/interfaces/eth';
|
||||
import type { AccountId32, H256, Perbill } from '@polkadot/types/interfaces/runtime';
|
||||
import type { FrameSupportDispatchDispatchInfo, FrameSupportDispatchPostDispatchInfo, FrameSupportPreimagesBounded, FrameSupportTokensMiscBalanceStatus, PalletConvictionVotingTally, PalletDemocracyMetadataOwner, PalletDemocracyVoteAccountVote, PalletDemocracyVoteThreshold, PalletElectionProviderMultiPhaseElectionCompute, PalletElectionProviderMultiPhasePhase, PalletImOnlineSr25519AppSr25519Public, PalletMultisigTimepoint, PalletNominationPoolsCommissionChangeRate, PalletNominationPoolsPoolState, PalletStakingExposure, PalletStakingForcing, PalletStakingValidatorPrefs, PolkadotParachainPrimitivesHrmpChannelId, PolkadotPrimitivesV4CandidateReceipt, PolkadotRuntimeParachainsDisputesDisputeLocation, PolkadotRuntimeParachainsDisputesDisputeResult, PolkadotRuntimeProxyType, SpConsensusGrandpaAppPublic, SpNposElectionsElectionScore, SpRuntimeDispatchError, SpRuntimeDispatchErrorWithPostInfo, SpWeightsWeightV2Weight, XcmV3MultiLocation, XcmV3MultiassetMultiAssets, XcmV3Response, XcmV3TraitsError, XcmV3TraitsOutcome, XcmV3Xcm, XcmVersionedMultiAssets, XcmVersionedMultiLocation } from '@polkadot/types/lookup';
|
||||
import type { FrameSupportDispatchDispatchInfo, FrameSupportDispatchPostDispatchInfo, FrameSupportMessagesProcessMessageError, FrameSupportPreimagesBounded, FrameSupportTokensMiscBalanceStatus, PalletConvictionVotingTally, PalletDemocracyMetadataOwner, PalletDemocracyVoteAccountVote, PalletDemocracyVoteThreshold, PalletElectionProviderMultiPhaseElectionCompute, PalletElectionProviderMultiPhasePhase, PalletImOnlineSr25519AppSr25519Public, PalletMultisigTimepoint, PalletNominationPoolsCommissionChangeRate, PalletNominationPoolsPoolState, PalletStakingExposure, PalletStakingForcing, PalletStakingValidatorPrefs, PolkadotParachainPrimitivesHrmpChannelId, PolkadotPrimitivesV4CandidateReceipt, PolkadotRuntimeParachainsDisputesDisputeLocation, PolkadotRuntimeParachainsDisputesDisputeResult, PolkadotRuntimeParachainsInclusionAggregateMessageOrigin, PolkadotRuntimeProxyType, SpConsensusGrandpaAppPublic, SpNposElectionsElectionScore, SpRuntimeDispatchError, SpRuntimeDispatchErrorWithPostInfo, SpWeightsWeightV2Weight, XcmV3MultiLocation, XcmV3MultiassetMultiAssets, XcmV3Response, XcmV3TraitsError, XcmV3TraitsOutcome, XcmV3Xcm, XcmVersionedMultiAssets, XcmVersionedMultiLocation } from '@polkadot/types/lookup';
|
||||
|
||||
export type __AugmentedEvent<ApiType extends ApiTypes> = AugmentedEvent<ApiType>;
|
||||
|
||||
@@ -579,6 +579,28 @@ declare module '@polkadot/api-base/types/events' {
|
||||
**/
|
||||
[key: string]: AugmentedEvent<ApiType>;
|
||||
};
|
||||
messageQueue: {
|
||||
/**
|
||||
* Message placed in overweight queue.
|
||||
**/
|
||||
OverweightEnqueued: AugmentedEvent<ApiType, [id: U8aFixed, origin: PolkadotRuntimeParachainsInclusionAggregateMessageOrigin, pageIndex: u32, messageIndex: u32], { id: U8aFixed, origin: PolkadotRuntimeParachainsInclusionAggregateMessageOrigin, pageIndex: u32, messageIndex: u32 }>;
|
||||
/**
|
||||
* This page was reaped.
|
||||
**/
|
||||
PageReaped: AugmentedEvent<ApiType, [origin: PolkadotRuntimeParachainsInclusionAggregateMessageOrigin, index: u32], { origin: PolkadotRuntimeParachainsInclusionAggregateMessageOrigin, index: u32 }>;
|
||||
/**
|
||||
* Message is processed.
|
||||
**/
|
||||
Processed: AugmentedEvent<ApiType, [id: U8aFixed, origin: PolkadotRuntimeParachainsInclusionAggregateMessageOrigin, weightUsed: SpWeightsWeightV2Weight, success: bool], { id: U8aFixed, origin: PolkadotRuntimeParachainsInclusionAggregateMessageOrigin, weightUsed: SpWeightsWeightV2Weight, success: bool }>;
|
||||
/**
|
||||
* Message discarded due to an error in the `MessageProcessor` (usually a format error).
|
||||
**/
|
||||
ProcessingFailed: AugmentedEvent<ApiType, [id: U8aFixed, origin: PolkadotRuntimeParachainsInclusionAggregateMessageOrigin, error: FrameSupportMessagesProcessMessageError], { id: U8aFixed, origin: PolkadotRuntimeParachainsInclusionAggregateMessageOrigin, error: FrameSupportMessagesProcessMessageError }>;
|
||||
/**
|
||||
* Generic event
|
||||
**/
|
||||
[key: string]: AugmentedEvent<ApiType>;
|
||||
};
|
||||
multisig: {
|
||||
/**
|
||||
* A multisig operation has been approved by someone.
|
||||
@@ -710,6 +732,10 @@ declare module '@polkadot/api-base/types/events' {
|
||||
* A candidate timed out. `[candidate, head_data]`
|
||||
**/
|
||||
CandidateTimedOut: AugmentedEvent<ApiType, [PolkadotPrimitivesV4CandidateReceipt, Bytes, u32]>;
|
||||
/**
|
||||
* Some upward messages have been received and will be processed.
|
||||
**/
|
||||
UpwardMessagesReceived: AugmentedEvent<ApiType, [from: u32, count: u32], { from: u32, count: u32 }>;
|
||||
/**
|
||||
* Generic event
|
||||
**/
|
||||
@@ -1245,53 +1271,6 @@ declare module '@polkadot/api-base/types/events' {
|
||||
**/
|
||||
[key: string]: AugmentedEvent<ApiType>;
|
||||
};
|
||||
ump: {
|
||||
/**
|
||||
* Upward message executed with the given outcome.
|
||||
* \[ id, outcome \]
|
||||
**/
|
||||
ExecutedUpward: AugmentedEvent<ApiType, [U8aFixed, XcmV3TraitsOutcome]>;
|
||||
/**
|
||||
* Upward message is invalid XCM.
|
||||
* \[ id \]
|
||||
**/
|
||||
InvalidFormat: AugmentedEvent<ApiType, [U8aFixed]>;
|
||||
/**
|
||||
* The weight budget was exceeded for an individual upward message.
|
||||
*
|
||||
* This message can be later dispatched manually using `service_overweight` dispatchable
|
||||
* using the assigned `overweight_index`.
|
||||
*
|
||||
* \[ para, id, overweight_index, required \]
|
||||
**/
|
||||
OverweightEnqueued: AugmentedEvent<ApiType, [u32, U8aFixed, u64, SpWeightsWeightV2Weight]>;
|
||||
/**
|
||||
* Upward message from the overweight queue was executed with the given actual weight
|
||||
* used.
|
||||
*
|
||||
* \[ overweight_index, used \]
|
||||
**/
|
||||
OverweightServiced: AugmentedEvent<ApiType, [u64, SpWeightsWeightV2Weight]>;
|
||||
/**
|
||||
* Upward message is unsupported version of XCM.
|
||||
* \[ id \]
|
||||
**/
|
||||
UnsupportedVersion: AugmentedEvent<ApiType, [U8aFixed]>;
|
||||
/**
|
||||
* Some upward messages have been received and will be processed.
|
||||
* \[ para, count, size \]
|
||||
**/
|
||||
UpwardMessagesReceived: AugmentedEvent<ApiType, [u32, u32, u32]>;
|
||||
/**
|
||||
* The weight limit for handling upward messages was reached.
|
||||
* \[ id, remaining, required \]
|
||||
**/
|
||||
WeightExhausted: AugmentedEvent<ApiType, [U8aFixed, SpWeightsWeightV2Weight, SpWeightsWeightV2Weight]>;
|
||||
/**
|
||||
* Generic event
|
||||
**/
|
||||
[key: string]: AugmentedEvent<ApiType>;
|
||||
};
|
||||
utility: {
|
||||
/**
|
||||
* Batch of dispatches completed fully with no error.
|
||||
@@ -1364,36 +1343,26 @@ declare module '@polkadot/api-base/types/events' {
|
||||
xcmPallet: {
|
||||
/**
|
||||
* Some assets have been claimed from an asset trap
|
||||
*
|
||||
* \[ hash, origin, assets \]
|
||||
**/
|
||||
AssetsClaimed: AugmentedEvent<ApiType, [H256, XcmV3MultiLocation, XcmVersionedMultiAssets]>;
|
||||
AssetsClaimed: AugmentedEvent<ApiType, [hash_: H256, origin: XcmV3MultiLocation, assets: XcmVersionedMultiAssets], { hash_: H256, origin: XcmV3MultiLocation, assets: XcmVersionedMultiAssets }>;
|
||||
/**
|
||||
* Some assets have been placed in an asset trap.
|
||||
*
|
||||
* \[ hash, origin, assets \]
|
||||
**/
|
||||
AssetsTrapped: AugmentedEvent<ApiType, [H256, XcmV3MultiLocation, XcmVersionedMultiAssets]>;
|
||||
AssetsTrapped: AugmentedEvent<ApiType, [hash_: H256, origin: XcmV3MultiLocation, assets: XcmVersionedMultiAssets], { hash_: H256, origin: XcmV3MultiLocation, assets: XcmVersionedMultiAssets }>;
|
||||
/**
|
||||
* Execution of an XCM message was attempted.
|
||||
*
|
||||
* \[ outcome \]
|
||||
**/
|
||||
Attempted: AugmentedEvent<ApiType, [XcmV3TraitsOutcome]>;
|
||||
Attempted: AugmentedEvent<ApiType, [outcome: XcmV3TraitsOutcome], { outcome: XcmV3TraitsOutcome }>;
|
||||
/**
|
||||
* Fees were paid from a location for an operation (often for using `SendXcm`).
|
||||
*
|
||||
* \[ paying location, fees \]
|
||||
**/
|
||||
FeesPaid: AugmentedEvent<ApiType, [XcmV3MultiLocation, XcmV3MultiassetMultiAssets]>;
|
||||
FeesPaid: AugmentedEvent<ApiType, [paying: XcmV3MultiLocation, fees: XcmV3MultiassetMultiAssets], { paying: XcmV3MultiLocation, fees: XcmV3MultiassetMultiAssets }>;
|
||||
/**
|
||||
* Expected query response has been received but the querier location of the response does
|
||||
* not match the expected. The query remains registered for a later, valid, response to
|
||||
* be received and acted upon.
|
||||
*
|
||||
* \[ origin location, id, expected querier, maybe actual querier \]
|
||||
**/
|
||||
InvalidQuerier: AugmentedEvent<ApiType, [XcmV3MultiLocation, u64, XcmV3MultiLocation, Option<XcmV3MultiLocation>]>;
|
||||
InvalidQuerier: AugmentedEvent<ApiType, [origin: XcmV3MultiLocation, queryId: u64, expectedQuerier: XcmV3MultiLocation, maybeActualQuerier: Option<XcmV3MultiLocation>], { origin: XcmV3MultiLocation, queryId: u64, expectedQuerier: XcmV3MultiLocation, maybeActualQuerier: Option<XcmV3MultiLocation> }>;
|
||||
/**
|
||||
* Expected query response has been received but the expected querier location placed in
|
||||
* storage by this runtime previously cannot be decoded. The query remains registered.
|
||||
@@ -1402,18 +1371,14 @@ declare module '@polkadot/api-base/types/events' {
|
||||
* runtime should be readable prior to query timeout) and dangerous since the possibly
|
||||
* valid response will be dropped. Manual governance intervention is probably going to be
|
||||
* needed.
|
||||
*
|
||||
* \[ origin location, id \]
|
||||
**/
|
||||
InvalidQuerierVersion: AugmentedEvent<ApiType, [XcmV3MultiLocation, u64]>;
|
||||
InvalidQuerierVersion: AugmentedEvent<ApiType, [origin: XcmV3MultiLocation, queryId: u64], { origin: XcmV3MultiLocation, queryId: u64 }>;
|
||||
/**
|
||||
* Expected query response has been received but the origin location of the response does
|
||||
* not match that expected. The query remains registered for a later, valid, response to
|
||||
* be received and acted upon.
|
||||
*
|
||||
* \[ origin location, id, expected location \]
|
||||
**/
|
||||
InvalidResponder: AugmentedEvent<ApiType, [XcmV3MultiLocation, u64, Option<XcmV3MultiLocation>]>;
|
||||
InvalidResponder: AugmentedEvent<ApiType, [origin: XcmV3MultiLocation, queryId: u64, expectedLocation: Option<XcmV3MultiLocation>], { origin: XcmV3MultiLocation, queryId: u64, expectedLocation: Option<XcmV3MultiLocation> }>;
|
||||
/**
|
||||
* Expected query response has been received but the expected origin location placed in
|
||||
* storage by this runtime previously cannot be decoded. The query remains registered.
|
||||
@@ -1422,115 +1387,83 @@ declare module '@polkadot/api-base/types/events' {
|
||||
* runtime should be readable prior to query timeout) and dangerous since the possibly
|
||||
* valid response will be dropped. Manual governance intervention is probably going to be
|
||||
* needed.
|
||||
*
|
||||
* \[ origin location, id \]
|
||||
**/
|
||||
InvalidResponderVersion: AugmentedEvent<ApiType, [XcmV3MultiLocation, u64]>;
|
||||
InvalidResponderVersion: AugmentedEvent<ApiType, [origin: XcmV3MultiLocation, queryId: u64], { origin: XcmV3MultiLocation, queryId: u64 }>;
|
||||
/**
|
||||
* Query response has been received and query is removed. The registered notification has
|
||||
* been dispatched and executed successfully.
|
||||
*
|
||||
* \[ id, pallet index, call index \]
|
||||
**/
|
||||
Notified: AugmentedEvent<ApiType, [u64, u8, u8]>;
|
||||
Notified: AugmentedEvent<ApiType, [queryId: u64, palletIndex: u8, callIndex: u8], { queryId: u64, palletIndex: u8, callIndex: u8 }>;
|
||||
/**
|
||||
* Query response has been received and query is removed. The dispatch was unable to be
|
||||
* decoded into a `Call`; this might be due to dispatch function having a signature which
|
||||
* is not `(origin, QueryId, Response)`.
|
||||
*
|
||||
* \[ id, pallet index, call index \]
|
||||
**/
|
||||
NotifyDecodeFailed: AugmentedEvent<ApiType, [u64, u8, u8]>;
|
||||
NotifyDecodeFailed: AugmentedEvent<ApiType, [queryId: u64, palletIndex: u8, callIndex: u8], { queryId: u64, palletIndex: u8, callIndex: u8 }>;
|
||||
/**
|
||||
* Query response has been received and query is removed. There was a general error with
|
||||
* dispatching the notification call.
|
||||
*
|
||||
* \[ id, pallet index, call index \]
|
||||
**/
|
||||
NotifyDispatchError: AugmentedEvent<ApiType, [u64, u8, u8]>;
|
||||
NotifyDispatchError: AugmentedEvent<ApiType, [queryId: u64, palletIndex: u8, callIndex: u8], { queryId: u64, palletIndex: u8, callIndex: u8 }>;
|
||||
/**
|
||||
* Query response has been received and query is removed. The registered notification could
|
||||
* not be dispatched because the dispatch weight is greater than the maximum weight
|
||||
* originally budgeted by this runtime for the query result.
|
||||
*
|
||||
* \[ id, pallet index, call index, actual weight, max budgeted weight \]
|
||||
**/
|
||||
NotifyOverweight: AugmentedEvent<ApiType, [u64, u8, u8, SpWeightsWeightV2Weight, SpWeightsWeightV2Weight]>;
|
||||
NotifyOverweight: AugmentedEvent<ApiType, [queryId: u64, palletIndex: u8, callIndex: u8, actualWeight: SpWeightsWeightV2Weight, maxBudgetedWeight: SpWeightsWeightV2Weight], { queryId: u64, palletIndex: u8, callIndex: u8, actualWeight: SpWeightsWeightV2Weight, maxBudgetedWeight: SpWeightsWeightV2Weight }>;
|
||||
/**
|
||||
* A given location which had a version change subscription was dropped owing to an error
|
||||
* migrating the location to our new XCM format.
|
||||
*
|
||||
* \[ location, query ID \]
|
||||
**/
|
||||
NotifyTargetMigrationFail: AugmentedEvent<ApiType, [XcmVersionedMultiLocation, u64]>;
|
||||
NotifyTargetMigrationFail: AugmentedEvent<ApiType, [location: XcmVersionedMultiLocation, queryId: u64], { location: XcmVersionedMultiLocation, queryId: u64 }>;
|
||||
/**
|
||||
* A given location which had a version change subscription was dropped owing to an error
|
||||
* sending the notification to it.
|
||||
*
|
||||
* \[ location, query ID, error \]
|
||||
**/
|
||||
NotifyTargetSendFail: AugmentedEvent<ApiType, [XcmV3MultiLocation, u64, XcmV3TraitsError]>;
|
||||
NotifyTargetSendFail: AugmentedEvent<ApiType, [location: XcmV3MultiLocation, queryId: u64, error: XcmV3TraitsError], { location: XcmV3MultiLocation, queryId: u64, error: XcmV3TraitsError }>;
|
||||
/**
|
||||
* Query response has been received and is ready for taking with `take_response`. There is
|
||||
* no registered notification call.
|
||||
*
|
||||
* \[ id, response \]
|
||||
**/
|
||||
ResponseReady: AugmentedEvent<ApiType, [u64, XcmV3Response]>;
|
||||
ResponseReady: AugmentedEvent<ApiType, [queryId: u64, response: XcmV3Response], { queryId: u64, response: XcmV3Response }>;
|
||||
/**
|
||||
* Received query response has been read and removed.
|
||||
*
|
||||
* \[ id \]
|
||||
**/
|
||||
ResponseTaken: AugmentedEvent<ApiType, [u64]>;
|
||||
ResponseTaken: AugmentedEvent<ApiType, [queryId: u64], { queryId: u64 }>;
|
||||
/**
|
||||
* A XCM message was sent.
|
||||
*
|
||||
* \[ origin, destination, message \]
|
||||
**/
|
||||
Sent: AugmentedEvent<ApiType, [XcmV3MultiLocation, XcmV3MultiLocation, XcmV3Xcm]>;
|
||||
Sent: AugmentedEvent<ApiType, [origin: XcmV3MultiLocation, destination: XcmV3MultiLocation, message: XcmV3Xcm, messageId: U8aFixed], { origin: XcmV3MultiLocation, destination: XcmV3MultiLocation, message: XcmV3Xcm, messageId: U8aFixed }>;
|
||||
/**
|
||||
* The supported version of a location has been changed. This might be through an
|
||||
* automatic notification or a manual intervention.
|
||||
*
|
||||
* \[ location, XCM version \]
|
||||
**/
|
||||
SupportedVersionChanged: AugmentedEvent<ApiType, [XcmV3MultiLocation, u32]>;
|
||||
SupportedVersionChanged: AugmentedEvent<ApiType, [location: XcmV3MultiLocation, version: u32], { location: XcmV3MultiLocation, version: u32 }>;
|
||||
/**
|
||||
* Query response received which does not match a registered query. This may be because a
|
||||
* matching query was never registered, it may be because it is a duplicate response, or
|
||||
* because the query timed out.
|
||||
*
|
||||
* \[ origin location, id \]
|
||||
**/
|
||||
UnexpectedResponse: AugmentedEvent<ApiType, [XcmV3MultiLocation, u64]>;
|
||||
UnexpectedResponse: AugmentedEvent<ApiType, [origin: XcmV3MultiLocation, queryId: u64], { origin: XcmV3MultiLocation, queryId: u64 }>;
|
||||
/**
|
||||
* An XCM version change notification message has been attempted to be sent.
|
||||
*
|
||||
* The cost of sending it (borne by the chain) is included.
|
||||
*
|
||||
* \[ destination, result, cost \]
|
||||
**/
|
||||
VersionChangeNotified: AugmentedEvent<ApiType, [XcmV3MultiLocation, u32, XcmV3MultiassetMultiAssets]>;
|
||||
VersionChangeNotified: AugmentedEvent<ApiType, [destination: XcmV3MultiLocation, result: u32, cost: XcmV3MultiassetMultiAssets, messageId: U8aFixed], { destination: XcmV3MultiLocation, result: u32, cost: XcmV3MultiassetMultiAssets, messageId: U8aFixed }>;
|
||||
/**
|
||||
* We have requested that a remote chain sends us XCM version change notifications.
|
||||
*
|
||||
* \[ destination location, cost \]
|
||||
* We have requested that a remote chain send us XCM version change notifications.
|
||||
**/
|
||||
VersionNotifyRequested: AugmentedEvent<ApiType, [XcmV3MultiLocation, XcmV3MultiassetMultiAssets]>;
|
||||
VersionNotifyRequested: AugmentedEvent<ApiType, [destination: XcmV3MultiLocation, cost: XcmV3MultiassetMultiAssets, messageId: U8aFixed], { destination: XcmV3MultiLocation, cost: XcmV3MultiassetMultiAssets, messageId: U8aFixed }>;
|
||||
/**
|
||||
* A remote has requested XCM version change notification from us and we have honored it.
|
||||
* A version information message is sent to them and its cost is included.
|
||||
*
|
||||
* \[ destination location, cost \]
|
||||
**/
|
||||
VersionNotifyStarted: AugmentedEvent<ApiType, [XcmV3MultiLocation, XcmV3MultiassetMultiAssets]>;
|
||||
VersionNotifyStarted: AugmentedEvent<ApiType, [destination: XcmV3MultiLocation, cost: XcmV3MultiassetMultiAssets, messageId: U8aFixed], { destination: XcmV3MultiLocation, cost: XcmV3MultiassetMultiAssets, messageId: U8aFixed }>;
|
||||
/**
|
||||
* We have requested that a remote chain stops sending us XCM version change notifications.
|
||||
*
|
||||
* \[ destination location, cost \]
|
||||
**/
|
||||
VersionNotifyUnrequested: AugmentedEvent<ApiType, [XcmV3MultiLocation, XcmV3MultiassetMultiAssets]>;
|
||||
VersionNotifyUnrequested: AugmentedEvent<ApiType, [destination: XcmV3MultiLocation, cost: XcmV3MultiassetMultiAssets, messageId: U8aFixed], { destination: XcmV3MultiLocation, cost: XcmV3MultiassetMultiAssets, messageId: U8aFixed }>;
|
||||
/**
|
||||
* Generic event
|
||||
**/
|
||||
|
||||
@@ -7,11 +7,11 @@ import '@polkadot/api-base/types/storage';
|
||||
|
||||
import type { ApiTypes, AugmentedQuery, QueryableStorageEntry } from '@polkadot/api-base/types';
|
||||
import type { Data } from '@polkadot/types';
|
||||
import type { BTreeSet, Bytes, Null, Option, U8aFixed, Vec, WrapperOpaque, bool, u128, u16, u32, u64 } from '@polkadot/types-codec';
|
||||
import type { BTreeSet, Bytes, Null, Option, Struct, U8aFixed, Vec, WrapperOpaque, bool, u128, u16, u32, u64 } from '@polkadot/types-codec';
|
||||
import type { AnyNumber, ITuple } from '@polkadot/types-codec/types';
|
||||
import type { EthereumAddress } from '@polkadot/types/interfaces/eth';
|
||||
import type { AccountId32, Call, H256, Perbill, Percent } from '@polkadot/types/interfaces/runtime';
|
||||
import type { FrameSupportDispatchPerDispatchClassWeight, FrameSupportPreimagesBounded, FrameSystemAccountInfo, FrameSystemEventRecord, FrameSystemLastRuntimeUpgradeInfo, FrameSystemPhase, PalletBagsListListBag, PalletBagsListListNode, PalletBalancesAccountData, PalletBalancesBalanceLock, PalletBalancesIdAmount, PalletBalancesReserveData, PalletBountiesBounty, PalletChildBountiesChildBounty, PalletCollectiveVotes, PalletConvictionVotingVoteVoting, PalletDemocracyMetadataOwner, PalletDemocracyReferendumInfo, PalletDemocracyVoteThreshold, PalletDemocracyVoteVoting, PalletElectionProviderMultiPhasePhase, PalletElectionProviderMultiPhaseReadySolution, PalletElectionProviderMultiPhaseRoundSnapshot, PalletElectionProviderMultiPhaseSignedSignedSubmission, PalletElectionProviderMultiPhaseSolutionOrSnapshotSize, PalletElectionsPhragmenSeatHolder, PalletElectionsPhragmenVoter, PalletFastUnstakeUnstakeRequest, PalletGrandpaStoredPendingChange, PalletGrandpaStoredState, PalletIdentityRegistrarInfo, PalletIdentityRegistration, PalletImOnlineBoundedOpaqueNetworkState, PalletImOnlineSr25519AppSr25519Public, PalletMultisigMultisig, PalletNominationPoolsBondedPoolInner, PalletNominationPoolsClaimPermission, PalletNominationPoolsPoolMember, PalletNominationPoolsRewardPool, PalletNominationPoolsSubPools, PalletPreimageRequestStatus, PalletProxyAnnouncement, PalletProxyProxyDefinition, PalletReferendaReferendumInfo, PalletSchedulerScheduled, PalletStakingActiveEraInfo, PalletStakingEraRewardPoints, PalletStakingExposure, PalletStakingForcing, PalletStakingNominations, PalletStakingRewardDestination, PalletStakingSlashingSlashingSpans, PalletStakingSlashingSpanRecord, PalletStakingStakingLedger, PalletStakingUnappliedSlash, PalletStakingValidatorPrefs, PalletTipsOpenTip, PalletTransactionPaymentReleases, PalletTreasuryProposal, PalletVestingReleases, PalletVestingVestingInfo, PalletXcmQueryStatus, PalletXcmRemoteLockedFungibleRecord, PalletXcmVersionMigrationStage, PolkadotCorePrimitivesInboundDownwardMessage, PolkadotCorePrimitivesInboundHrmpMessage, PolkadotParachainPrimitivesHrmpChannelId, PolkadotPrimitivesV4AssignmentAppPublic, PolkadotPrimitivesV4CandidateCommitments, PolkadotPrimitivesV4CoreOccupied, PolkadotPrimitivesV4DisputeState, PolkadotPrimitivesV4ExecutorParams, PolkadotPrimitivesV4ScrapedOnChainVotes, PolkadotPrimitivesV4SessionInfo, PolkadotPrimitivesV4UpgradeGoAhead, PolkadotPrimitivesV4UpgradeRestriction, PolkadotPrimitivesV4ValidatorAppPublic, PolkadotRuntimeCommonClaimsStatementKind, PolkadotRuntimeCommonCrowdloanFundInfo, PolkadotRuntimeCommonParasRegistrarParaInfo, PolkadotRuntimeParachainsConfigurationHostConfiguration, PolkadotRuntimeParachainsDisputesSlashingPendingSlashes, PolkadotRuntimeParachainsHrmpHrmpChannel, PolkadotRuntimeParachainsHrmpHrmpOpenChannelRequest, PolkadotRuntimeParachainsInclusionAvailabilityBitfieldRecord, PolkadotRuntimeParachainsInclusionCandidatePendingAvailability, PolkadotRuntimeParachainsInitializerBufferedSessionChange, PolkadotRuntimeParachainsParasParaGenesisArgs, PolkadotRuntimeParachainsParasParaLifecycle, PolkadotRuntimeParachainsParasParaPastCodeMeta, PolkadotRuntimeParachainsParasPvfCheckActiveVoteState, PolkadotRuntimeParachainsSchedulerCoreAssignment, PolkadotRuntimeParachainsSchedulerParathreadClaimQueue, PolkadotRuntimeSessionKeys, SpConsensusBabeAppPublic, SpConsensusBabeBabeEpochConfiguration, SpConsensusBabeDigestsNextConfigDescriptor, SpConsensusBabeDigestsPreDigest, SpCoreCryptoKeyTypeId, SpNposElectionsElectionScore, SpRuntimeDigest, SpStakingOffenceOffenceDetails, SpWeightsWeightV2Weight, XcmVersionedAssetId, XcmVersionedMultiLocation } from '@polkadot/types/lookup';
|
||||
import type { FrameSupportDispatchPerDispatchClassWeight, FrameSupportPreimagesBounded, FrameSystemAccountInfo, FrameSystemEventRecord, FrameSystemLastRuntimeUpgradeInfo, FrameSystemPhase, PalletBagsListListBag, PalletBagsListListNode, PalletBalancesAccountData, PalletBalancesBalanceLock, PalletBalancesIdAmount, PalletBalancesReserveData, PalletBountiesBounty, PalletChildBountiesChildBounty, PalletCollectiveVotes, PalletConvictionVotingVoteVoting, PalletDemocracyMetadataOwner, PalletDemocracyReferendumInfo, PalletDemocracyVoteThreshold, PalletDemocracyVoteVoting, PalletElectionProviderMultiPhasePhase, PalletElectionProviderMultiPhaseReadySolution, PalletElectionProviderMultiPhaseRoundSnapshot, PalletElectionProviderMultiPhaseSignedSignedSubmission, PalletElectionProviderMultiPhaseSolutionOrSnapshotSize, PalletElectionsPhragmenSeatHolder, PalletElectionsPhragmenVoter, PalletFastUnstakeUnstakeRequest, PalletGrandpaStoredPendingChange, PalletGrandpaStoredState, PalletIdentityRegistrarInfo, PalletIdentityRegistration, PalletImOnlineBoundedOpaqueNetworkState, PalletImOnlineSr25519AppSr25519Public, PalletMessageQueueBookState, PalletMessageQueuePage, PalletMultisigMultisig, PalletNominationPoolsBondedPoolInner, PalletNominationPoolsClaimPermission, PalletNominationPoolsPoolMember, PalletNominationPoolsRewardPool, PalletNominationPoolsSubPools, PalletPreimageRequestStatus, PalletProxyAnnouncement, PalletProxyProxyDefinition, PalletReferendaReferendumInfo, PalletSchedulerScheduled, PalletStakingActiveEraInfo, PalletStakingEraRewardPoints, PalletStakingExposure, PalletStakingForcing, PalletStakingNominations, PalletStakingRewardDestination, PalletStakingSlashingSlashingSpans, PalletStakingSlashingSpanRecord, PalletStakingStakingLedger, PalletStakingUnappliedSlash, PalletStakingValidatorPrefs, PalletTipsOpenTip, PalletTransactionPaymentReleases, PalletTreasuryProposal, PalletVestingReleases, PalletVestingVestingInfo, PalletXcmQueryStatus, PalletXcmRemoteLockedFungibleRecord, PalletXcmVersionMigrationStage, PolkadotCorePrimitivesInboundDownwardMessage, PolkadotCorePrimitivesInboundHrmpMessage, PolkadotParachainPrimitivesHrmpChannelId, PolkadotPrimitivesV4AssignmentAppPublic, PolkadotPrimitivesV4CandidateCommitments, PolkadotPrimitivesV4CoreOccupied, PolkadotPrimitivesV4DisputeState, PolkadotPrimitivesV4ExecutorParams, PolkadotPrimitivesV4ScrapedOnChainVotes, PolkadotPrimitivesV4SessionInfo, PolkadotPrimitivesV4UpgradeGoAhead, PolkadotPrimitivesV4UpgradeRestriction, PolkadotPrimitivesV4ValidatorAppPublic, PolkadotPrimitivesVstagingSlashingPendingSlashes, PolkadotRuntimeCommonClaimsStatementKind, PolkadotRuntimeCommonCrowdloanFundInfo, PolkadotRuntimeCommonParasRegistrarParaInfo, PolkadotRuntimeParachainsConfigurationHostConfiguration, PolkadotRuntimeParachainsHrmpHrmpChannel, PolkadotRuntimeParachainsHrmpHrmpOpenChannelRequest, PolkadotRuntimeParachainsInclusionAggregateMessageOrigin, PolkadotRuntimeParachainsInclusionAvailabilityBitfieldRecord, PolkadotRuntimeParachainsInclusionCandidatePendingAvailability, PolkadotRuntimeParachainsInitializerBufferedSessionChange, PolkadotRuntimeParachainsParasParaGenesisArgs, PolkadotRuntimeParachainsParasParaLifecycle, PolkadotRuntimeParachainsParasParaPastCodeMeta, PolkadotRuntimeParachainsParasPvfCheckActiveVoteState, PolkadotRuntimeParachainsSchedulerCoreAssignment, PolkadotRuntimeParachainsSchedulerParathreadClaimQueue, PolkadotRuntimeRuntimeHoldReason, PolkadotRuntimeSessionKeys, SpConsensusBabeAppPublic, SpConsensusBabeBabeEpochConfiguration, SpConsensusBabeDigestsNextConfigDescriptor, SpConsensusBabeDigestsPreDigest, SpCoreCryptoKeyTypeId, SpNposElectionsElectionScore, SpRuntimeDigest, SpStakingOffenceOffenceDetails, SpWeightsWeightV2Weight, XcmVersionedAssetId, XcmVersionedMultiLocation } from '@polkadot/types/lookup';
|
||||
import type { Observable } from '@polkadot/types/types';
|
||||
|
||||
export type __AugmentedQuery<ApiType extends ApiTypes> = AugmentedQuery<ApiType, () => unknown>;
|
||||
@@ -206,7 +206,10 @@ declare module '@polkadot/api-base/types/storage' {
|
||||
/**
|
||||
* Holds on account balances.
|
||||
**/
|
||||
holds: AugmentedQuery<ApiType, (arg: AccountId32 | string | Uint8Array) => Observable<Vec<PalletBalancesIdAmount>>, [AccountId32]> & QueryableStorageEntry<ApiType, [AccountId32]>;
|
||||
holds: AugmentedQuery<ApiType, (arg: AccountId32 | string | Uint8Array) => Observable<Vec<{
|
||||
readonly id: PolkadotRuntimeRuntimeHoldReason;
|
||||
readonly amount: u128;
|
||||
} & Struct>>, [AccountId32]> & QueryableStorageEntry<ApiType, [AccountId32]>;
|
||||
/**
|
||||
* The total units of outstanding deactivated balance in the system.
|
||||
**/
|
||||
@@ -581,22 +584,24 @@ declare module '@polkadot/api-base/types/storage' {
|
||||
/**
|
||||
* Number of eras to check per block.
|
||||
*
|
||||
* If set to 0, this pallet does absolutely nothing.
|
||||
* If set to 0, this pallet does absolutely nothing. Cannot be set to more than
|
||||
* [`Config::MaxErasToCheckPerBlock`].
|
||||
*
|
||||
* Based on the amount of weight available at `on_idle`, up to this many eras of a single
|
||||
* nominator might be checked.
|
||||
* Based on the amount of weight available at [`Pallet::on_idle`], up to this many eras are
|
||||
* checked. The checking is represented by updating [`UnstakeRequest::checked`], which is
|
||||
* stored in [`Head`].
|
||||
**/
|
||||
erasToCheckPerBlock: AugmentedQuery<ApiType, () => Observable<u32>, []> & QueryableStorageEntry<ApiType, []>;
|
||||
/**
|
||||
* The current "head of the queue" being unstaked.
|
||||
*
|
||||
* The head in itself can be a batch of up to [`Config::BatchSize`] stakers.
|
||||
**/
|
||||
head: AugmentedQuery<ApiType, () => Observable<Option<PalletFastUnstakeUnstakeRequest>>, []> & QueryableStorageEntry<ApiType, []>;
|
||||
/**
|
||||
* The map of all accounts wishing to be unstaked.
|
||||
*
|
||||
* Keeps track of `AccountId` wishing to unstake and it's corresponding deposit.
|
||||
*
|
||||
* TWOX-NOTE: SAFE since `AccountId` is a secure hash.
|
||||
**/
|
||||
queue: AugmentedQuery<ApiType, (arg: AccountId32 | string | Uint8Array) => Observable<Option<u128>>, [AccountId32]> & QueryableStorageEntry<ApiType, [AccountId32]>;
|
||||
/**
|
||||
@@ -829,6 +834,24 @@ declare module '@polkadot/api-base/types/storage' {
|
||||
**/
|
||||
[key: string]: QueryableStorageEntry<ApiType>;
|
||||
};
|
||||
messageQueue: {
|
||||
/**
|
||||
* The index of the first and last (non-empty) pages.
|
||||
**/
|
||||
bookStateFor: AugmentedQuery<ApiType, (arg: PolkadotRuntimeParachainsInclusionAggregateMessageOrigin | { Ump: any } | string | Uint8Array) => Observable<PalletMessageQueueBookState>, [PolkadotRuntimeParachainsInclusionAggregateMessageOrigin]> & QueryableStorageEntry<ApiType, [PolkadotRuntimeParachainsInclusionAggregateMessageOrigin]>;
|
||||
/**
|
||||
* The map of page indices to pages.
|
||||
**/
|
||||
pages: AugmentedQuery<ApiType, (arg1: PolkadotRuntimeParachainsInclusionAggregateMessageOrigin | { Ump: any } | string | Uint8Array, arg2: u32 | AnyNumber | Uint8Array) => Observable<Option<PalletMessageQueuePage>>, [PolkadotRuntimeParachainsInclusionAggregateMessageOrigin, u32]> & QueryableStorageEntry<ApiType, [PolkadotRuntimeParachainsInclusionAggregateMessageOrigin, u32]>;
|
||||
/**
|
||||
* The origin at which we should begin servicing.
|
||||
**/
|
||||
serviceHead: AugmentedQuery<ApiType, () => Observable<Option<PolkadotRuntimeParachainsInclusionAggregateMessageOrigin>>, []> & QueryableStorageEntry<ApiType, []>;
|
||||
/**
|
||||
* Generic query
|
||||
**/
|
||||
[key: string]: QueryableStorageEntry<ApiType>;
|
||||
};
|
||||
multisig: {
|
||||
/**
|
||||
* The set of open multisig operations.
|
||||
@@ -1268,7 +1291,7 @@ declare module '@polkadot/api-base/types/storage' {
|
||||
/**
|
||||
* Validators pending dispute slashes.
|
||||
**/
|
||||
unappliedSlashes: AugmentedQuery<ApiType, (arg1: u32 | AnyNumber | Uint8Array, arg2: H256 | string | Uint8Array) => Observable<Option<PolkadotRuntimeParachainsDisputesSlashingPendingSlashes>>, [u32, H256]> & QueryableStorageEntry<ApiType, [u32, H256]>;
|
||||
unappliedSlashes: AugmentedQuery<ApiType, (arg1: u32 | AnyNumber | Uint8Array, arg2: H256 | string | Uint8Array) => Observable<Option<PolkadotPrimitivesVstagingSlashingPendingSlashes>>, [u32, H256]> & QueryableStorageEntry<ApiType, [u32, H256]>;
|
||||
/**
|
||||
* `ValidatorSetCount` per session.
|
||||
**/
|
||||
@@ -1908,66 +1931,6 @@ declare module '@polkadot/api-base/types/storage' {
|
||||
**/
|
||||
[key: string]: QueryableStorageEntry<ApiType>;
|
||||
};
|
||||
ump: {
|
||||
/**
|
||||
* Counter for the related counted storage map
|
||||
**/
|
||||
counterForOverweight: AugmentedQuery<ApiType, () => Observable<u32>, []> & QueryableStorageEntry<ApiType, []>;
|
||||
/**
|
||||
* The ordered list of `ParaId`s that have a `RelayDispatchQueue` entry.
|
||||
*
|
||||
* Invariant:
|
||||
* - The set of items from this vector should be exactly the set of the keys in
|
||||
* `RelayDispatchQueues` and `RelayDispatchQueueSize`.
|
||||
**/
|
||||
needsDispatch: AugmentedQuery<ApiType, () => Observable<Vec<u32>>, []> & QueryableStorageEntry<ApiType, []>;
|
||||
/**
|
||||
* This is the para that gets will get dispatched first during the next upward dispatchable queue
|
||||
* execution round.
|
||||
*
|
||||
* Invariant:
|
||||
* - If `Some(para)`, then `para` must be present in `NeedsDispatch`.
|
||||
**/
|
||||
nextDispatchRoundStartWith: AugmentedQuery<ApiType, () => Observable<Option<u32>>, []> & QueryableStorageEntry<ApiType, []>;
|
||||
/**
|
||||
* The messages that exceeded max individual message weight budget.
|
||||
*
|
||||
* These messages stay there until manually dispatched.
|
||||
**/
|
||||
overweight: AugmentedQuery<ApiType, (arg: u64 | AnyNumber | Uint8Array) => Observable<Option<ITuple<[u32, Bytes]>>>, [u64]> & QueryableStorageEntry<ApiType, [u64]>;
|
||||
/**
|
||||
* The number of overweight messages ever recorded in `Overweight` (and thus the lowest free
|
||||
* index).
|
||||
**/
|
||||
overweightCount: AugmentedQuery<ApiType, () => Observable<u64>, []> & QueryableStorageEntry<ApiType, []>;
|
||||
/**
|
||||
* The messages waiting to be handled by the relay-chain originating from a certain parachain.
|
||||
*
|
||||
* Note that some upward messages might have been already processed by the inclusion logic. E.g.
|
||||
* channel management messages.
|
||||
*
|
||||
* The messages are processed in FIFO order.
|
||||
**/
|
||||
relayDispatchQueues: AugmentedQuery<ApiType, (arg: u32 | AnyNumber | Uint8Array) => Observable<Vec<Bytes>>, [u32]> & QueryableStorageEntry<ApiType, [u32]>;
|
||||
/**
|
||||
* Size of the dispatch queues. Caches sizes of the queues in `RelayDispatchQueue`.
|
||||
*
|
||||
* First item in the tuple is the count of messages and second
|
||||
* is the total length (in bytes) of the message payloads.
|
||||
*
|
||||
* Note that this is an auxiliary mapping: it's possible to tell the byte size and the number of
|
||||
* messages only looking at `RelayDispatchQueues`. This mapping is separate to avoid the cost of
|
||||
* loading the whole message queue if only the total size and count are required.
|
||||
*
|
||||
* Invariant:
|
||||
* - The set of keys should exactly match the set of keys of `RelayDispatchQueues`.
|
||||
**/
|
||||
relayDispatchQueueSize: AugmentedQuery<ApiType, (arg: u32 | AnyNumber | Uint8Array) => Observable<ITuple<[u32, u32]>>, [u32]> & QueryableStorageEntry<ApiType, [u32]>;
|
||||
/**
|
||||
* Generic query
|
||||
**/
|
||||
[key: string]: QueryableStorageEntry<ApiType>;
|
||||
};
|
||||
vesting: {
|
||||
/**
|
||||
* Storage version of the pallet.
|
||||
|
||||
+367
-2831
File diff suppressed because it is too large
Load Diff
@@ -6,10 +6,10 @@
|
||||
import '@polkadot/api-base/types/consts';
|
||||
|
||||
import type { ApiTypes, AugmentedConst } from '@polkadot/api-base/types';
|
||||
import type { Option, U8aFixed, Vec, bool, u128, u16, u32, u64, u8 } from '@polkadot/types-codec';
|
||||
import type { Bytes, Option, U8aFixed, Vec, bool, u128, u16, u32, u64, u8 } from '@polkadot/types-codec';
|
||||
import type { Codec, ITuple } from '@polkadot/types-codec/types';
|
||||
import type { Perbill, Percent, Permill, Perquintill } from '@polkadot/types/interfaces/runtime';
|
||||
import type { FrameSupportPalletId, FrameSystemLimitsBlockLength, FrameSystemLimitsBlockWeights, KitchensinkRuntimeHoldReason, PalletContractsSchedule, PalletReferendaTrackInfo, SpVersionRuntimeVersion, SpWeightsRuntimeDbWeight, SpWeightsWeightV2Weight } from '@polkadot/types/lookup';
|
||||
import type { FrameSupportPalletId, FrameSystemLimitsBlockLength, FrameSystemLimitsBlockWeights, PalletContractsSchedule, PalletReferendaTrackInfo, SpVersionRuntimeVersion, SpWeightsRuntimeDbWeight, SpWeightsWeightV2Weight } from '@polkadot/types/lookup';
|
||||
|
||||
export type __AugmentedConst<ApiType extends ApiTypes> = AugmentedConst<ApiType>;
|
||||
|
||||
@@ -51,6 +51,40 @@ declare module '@polkadot/api-base/types/consts' {
|
||||
**/
|
||||
[key: string]: Codec;
|
||||
};
|
||||
assetConversion: {
|
||||
/**
|
||||
* A setting to allow creating pools with both non-native assets.
|
||||
**/
|
||||
allowMultiAssetPools: bool & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* 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>;
|
||||
/**
|
||||
* Generic const
|
||||
**/
|
||||
[key: string]: Codec;
|
||||
};
|
||||
assets: {
|
||||
/**
|
||||
* The amount of funds that must be reserved when creating a new approval.
|
||||
@@ -692,6 +726,33 @@ declare module '@polkadot/api-base/types/consts' {
|
||||
**/
|
||||
[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.
|
||||
@@ -767,10 +828,6 @@ declare module '@polkadot/api-base/types/consts' {
|
||||
* Must be no greater than `MaxQueueLen`.
|
||||
**/
|
||||
fifoQueueLen: u32 & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* The identifier of the hold reason.
|
||||
**/
|
||||
holdReason: KitchensinkRuntimeHoldReason & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* The number of blocks between consecutive attempts to dequeue bids and create receipts.
|
||||
*
|
||||
@@ -847,6 +904,44 @@ declare module '@polkadot/api-base/types/consts' {
|
||||
**/
|
||||
[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.
|
||||
|
||||
@@ -160,6 +160,106 @@ declare module '@polkadot/api-base/types/errors' {
|
||||
**/
|
||||
[key: string]: AugmentedError<ApiType>;
|
||||
};
|
||||
assetConversion: {
|
||||
/**
|
||||
* Provided amount should be greater than or equal to the existential deposit/asset's
|
||||
* minimal amount.
|
||||
**/
|
||||
AmountLessThanMinimal: AugmentedError<ApiType>;
|
||||
/**
|
||||
* Desired amount can't be equal to the pool reserve.
|
||||
**/
|
||||
AmountOutTooHigh: AugmentedError<ApiType>;
|
||||
/**
|
||||
* The minimal amount requirement for the first token in the pair wasn't met.
|
||||
**/
|
||||
AssetOneDepositDidNotMeetMinimum: AugmentedError<ApiType>;
|
||||
/**
|
||||
* The minimal amount requirement for the first token in the pair wasn't met.
|
||||
**/
|
||||
AssetOneWithdrawalDidNotMeetMinimum: AugmentedError<ApiType>;
|
||||
/**
|
||||
* The minimal amount requirement for the second token in the pair wasn't met.
|
||||
**/
|
||||
AssetTwoDepositDidNotMeetMinimum: AugmentedError<ApiType>;
|
||||
/**
|
||||
* The minimal amount requirement for the second token in the pair wasn't met.
|
||||
**/
|
||||
AssetTwoWithdrawalDidNotMeetMinimum: AugmentedError<ApiType>;
|
||||
/**
|
||||
* Provided assets are equal.
|
||||
**/
|
||||
EqualAssets: AugmentedError<ApiType>;
|
||||
/**
|
||||
* Insufficient liquidity in the pool.
|
||||
**/
|
||||
InsufficientLiquidity: AugmentedError<ApiType>;
|
||||
/**
|
||||
* Insufficient liquidity minted.
|
||||
**/
|
||||
InsufficientLiquidityMinted: AugmentedError<ApiType>;
|
||||
/**
|
||||
* The provided path must consists of 2 assets at least.
|
||||
**/
|
||||
InvalidPath: AugmentedError<ApiType>;
|
||||
/**
|
||||
* The provided path must consists of unique assets.
|
||||
**/
|
||||
NonUniquePath: AugmentedError<ApiType>;
|
||||
/**
|
||||
* Optimal calculated amount is less than desired.
|
||||
**/
|
||||
OptimalAmountLessThanDesired: AugmentedError<ApiType>;
|
||||
/**
|
||||
* An overflow happened.
|
||||
**/
|
||||
Overflow: AugmentedError<ApiType>;
|
||||
/**
|
||||
* It was not possible to calculate path data.
|
||||
**/
|
||||
PathError: AugmentedError<ApiType>;
|
||||
/**
|
||||
* Pool already exists.
|
||||
**/
|
||||
PoolExists: AugmentedError<ApiType>;
|
||||
/**
|
||||
* Only pools with native on one side are valid.
|
||||
**/
|
||||
PoolMustContainNativeCurrency: AugmentedError<ApiType>;
|
||||
/**
|
||||
* The pool doesn't exist.
|
||||
**/
|
||||
PoolNotFound: AugmentedError<ApiType>;
|
||||
/**
|
||||
* Provided maximum amount is not sufficient for swap.
|
||||
**/
|
||||
ProvidedMaximumNotSufficientForSwap: AugmentedError<ApiType>;
|
||||
/**
|
||||
* Calculated amount out is less than provided minimum amount.
|
||||
**/
|
||||
ProvidedMinimumNotSufficientForSwap: AugmentedError<ApiType>;
|
||||
/**
|
||||
* Reserve needs to always be greater than or equal to the existential deposit/asset's
|
||||
* minimal amount.
|
||||
**/
|
||||
ReserveLeftLessThanMinimal: AugmentedError<ApiType>;
|
||||
/**
|
||||
* Desired amount can't be zero.
|
||||
**/
|
||||
WrongDesiredAmount: AugmentedError<ApiType>;
|
||||
/**
|
||||
* Amount can't be zero.
|
||||
**/
|
||||
ZeroAmount: AugmentedError<ApiType>;
|
||||
/**
|
||||
* Requested liquidity can't be zero.
|
||||
**/
|
||||
ZeroLiquidity: AugmentedError<ApiType>;
|
||||
/**
|
||||
* Generic error
|
||||
**/
|
||||
[key: string]: AugmentedError<ApiType>;
|
||||
};
|
||||
assetRate: {
|
||||
/**
|
||||
* The given asset ID already has an assigned conversion rate and cannot be re-created.
|
||||
@@ -469,12 +569,20 @@ declare module '@polkadot/api-base/types/errors' {
|
||||
* of what is specified in the schedule.
|
||||
**/
|
||||
MaxCallDepthReached: AugmentedError<ApiType>;
|
||||
/**
|
||||
* A pending migration needs to complete before the extrinsic can be called.
|
||||
**/
|
||||
MigrationInProgress: AugmentedError<ApiType>;
|
||||
/**
|
||||
* The chain does not provide a chain extension. Calling the chain extension results
|
||||
* in this error. Note that this usually shouldn't happen as deploying such contracts
|
||||
* is rejected.
|
||||
**/
|
||||
NoChainExtension: AugmentedError<ApiType>;
|
||||
/**
|
||||
* Migrate dispatch call was attempted but no migration was performed.
|
||||
**/
|
||||
NoMigrationPerformed: AugmentedError<ApiType>;
|
||||
/**
|
||||
* A buffer outside of sandbox memory was passed to a contract API function.
|
||||
**/
|
||||
@@ -1251,6 +1359,28 @@ declare module '@polkadot/api-base/types/errors' {
|
||||
**/
|
||||
[key: string]: AugmentedError<ApiType>;
|
||||
};
|
||||
nftFractionalization: {
|
||||
/**
|
||||
* Asset ID does not correspond to locked NFT.
|
||||
**/
|
||||
IncorrectAssetId: AugmentedError<ApiType>;
|
||||
/**
|
||||
* NFT doesn't exist.
|
||||
**/
|
||||
NftNotFound: AugmentedError<ApiType>;
|
||||
/**
|
||||
* NFT has not yet been fractionalised.
|
||||
**/
|
||||
NftNotFractionalized: AugmentedError<ApiType>;
|
||||
/**
|
||||
* The signing account has no permission to do the operation.
|
||||
**/
|
||||
NoPermission: AugmentedError<ApiType>;
|
||||
/**
|
||||
* Generic error
|
||||
**/
|
||||
[key: string]: AugmentedError<ApiType>;
|
||||
};
|
||||
nfts: {
|
||||
/**
|
||||
* The provided Item was already used for claiming.
|
||||
@@ -1400,6 +1530,10 @@ declare module '@polkadot/api-base/types/errors' {
|
||||
* Swap doesn't exist.
|
||||
**/
|
||||
UnknownSwap: AugmentedError<ApiType>;
|
||||
/**
|
||||
* The witness data should be provided.
|
||||
**/
|
||||
WitnessRequired: AugmentedError<ApiType>;
|
||||
/**
|
||||
* The delegate turned out to be different to what was expected.
|
||||
**/
|
||||
@@ -1634,6 +1768,95 @@ declare module '@polkadot/api-base/types/errors' {
|
||||
**/
|
||||
[key: string]: AugmentedError<ApiType>;
|
||||
};
|
||||
poolAssets: {
|
||||
/**
|
||||
* The asset-account already exists.
|
||||
**/
|
||||
AlreadyExists: AugmentedError<ApiType>;
|
||||
/**
|
||||
* The asset is not live, and likely being destroyed.
|
||||
**/
|
||||
AssetNotLive: AugmentedError<ApiType>;
|
||||
/**
|
||||
* Invalid metadata given.
|
||||
**/
|
||||
BadMetadata: AugmentedError<ApiType>;
|
||||
/**
|
||||
* Invalid witness data given.
|
||||
**/
|
||||
BadWitness: AugmentedError<ApiType>;
|
||||
/**
|
||||
* Account balance must be greater than or equal to the transfer amount.
|
||||
**/
|
||||
BalanceLow: AugmentedError<ApiType>;
|
||||
/**
|
||||
* Callback action resulted in error
|
||||
**/
|
||||
CallbackFailed: AugmentedError<ApiType>;
|
||||
/**
|
||||
* The origin account is frozen.
|
||||
**/
|
||||
Frozen: AugmentedError<ApiType>;
|
||||
/**
|
||||
* The asset status is not the expected status.
|
||||
**/
|
||||
IncorrectStatus: AugmentedError<ApiType>;
|
||||
/**
|
||||
* The asset ID is already taken.
|
||||
**/
|
||||
InUse: AugmentedError<ApiType>;
|
||||
/**
|
||||
* The asset is a live asset and is actively being used. Usually emit for operations such
|
||||
* as `start_destroy` which require the asset to be in a destroying state.
|
||||
**/
|
||||
LiveAsset: AugmentedError<ApiType>;
|
||||
/**
|
||||
* Minimum balance should be non-zero.
|
||||
**/
|
||||
MinBalanceZero: AugmentedError<ApiType>;
|
||||
/**
|
||||
* The account to alter does not exist.
|
||||
**/
|
||||
NoAccount: AugmentedError<ApiType>;
|
||||
/**
|
||||
* The asset-account doesn't have an associated deposit.
|
||||
**/
|
||||
NoDeposit: AugmentedError<ApiType>;
|
||||
/**
|
||||
* The signing account has no permission to do the operation.
|
||||
**/
|
||||
NoPermission: AugmentedError<ApiType>;
|
||||
/**
|
||||
* The asset should be frozen before the given operation.
|
||||
**/
|
||||
NotFrozen: AugmentedError<ApiType>;
|
||||
/**
|
||||
* No approval exists that would allow the transfer.
|
||||
**/
|
||||
Unapproved: AugmentedError<ApiType>;
|
||||
/**
|
||||
* Unable to increment the consumer reference counters on the account. Either no provider
|
||||
* reference exists to allow a non-zero balance of a non-self-sufficient asset, or one
|
||||
* fewer then the maximum number of consumers has been reached.
|
||||
**/
|
||||
UnavailableConsumer: AugmentedError<ApiType>;
|
||||
/**
|
||||
* The given asset ID is unknown.
|
||||
**/
|
||||
Unknown: AugmentedError<ApiType>;
|
||||
/**
|
||||
* The operation would result in funds being burned.
|
||||
**/
|
||||
WouldBurn: AugmentedError<ApiType>;
|
||||
/**
|
||||
* The source account would not survive the transfer and it needs to stay alive.
|
||||
**/
|
||||
WouldDie: AugmentedError<ApiType>;
|
||||
/**
|
||||
* Generic error
|
||||
**/
|
||||
[key: string]: AugmentedError<ApiType>;
|
||||
};
|
||||
preimage: {
|
||||
/**
|
||||
* Preimage has already been noted on-chain.
|
||||
|
||||
@@ -8,8 +8,8 @@ import '@polkadot/api-base/types/events';
|
||||
import type { ApiTypes, AugmentedEvent } from '@polkadot/api-base/types';
|
||||
import type { Bytes, Null, Option, Result, U8aFixed, Vec, bool, u128, u16, u32, u64, u8 } from '@polkadot/types-codec';
|
||||
import type { ITuple } from '@polkadot/types-codec/types';
|
||||
import type { AccountId32, H256, Perbill, Perquintill } from '@polkadot/types/interfaces/runtime';
|
||||
import type { FrameSupportDispatchDispatchInfo, FrameSupportDispatchPostDispatchInfo, FrameSupportMessagesProcessMessageError, FrameSupportPreimagesBounded, FrameSupportTokensMiscBalanceStatus, KitchensinkRuntimeProxyType, PalletAllianceCid, PalletAllianceUnscrupulousItem, PalletContractsOrigin, PalletConvictionVotingTally, PalletCoreFellowshipParamsType, PalletCoreFellowshipWish, PalletDemocracyMetadataOwner, PalletDemocracyVoteAccountVote, PalletDemocracyVoteThreshold, PalletElectionProviderMultiPhaseElectionCompute, PalletElectionProviderMultiPhasePhase, PalletImOnlineSr25519AppSr25519Public, PalletMultisigTimepoint, PalletNftsAttributeNamespace, PalletNftsPalletAttributes, PalletNftsPriceWithDirection, PalletNominationPoolsCommissionChangeRate, PalletNominationPoolsPoolState, PalletRankedCollectiveTally, PalletRankedCollectiveVoteRecord, PalletStakingExposure, PalletStakingForcing, PalletStakingValidatorPrefs, PalletStateTrieMigrationError, PalletStateTrieMigrationMigrationCompute, SpConsensusGrandpaAppPublic, SpNposElectionsElectionScore, SpRuntimeDispatchError, SpRuntimeDispatchErrorWithPostInfo, SpStatementStoreStatement, SpWeightsWeightV2Weight } from '@polkadot/types/lookup';
|
||||
import type { AccountId32, H256, Perbill, Permill, Perquintill } from '@polkadot/types/interfaces/runtime';
|
||||
import type { FrameSupportDispatchDispatchInfo, FrameSupportDispatchPostDispatchInfo, FrameSupportMessagesProcessMessageError, FrameSupportPreimagesBounded, FrameSupportTokensMiscBalanceStatus, KitchensinkRuntimeProxyType, PalletAllianceCid, PalletAllianceUnscrupulousItem, PalletAssetConversionNativeOrAssetId, PalletContractsOrigin, PalletConvictionVotingTally, PalletCoreFellowshipParamsType, PalletCoreFellowshipWish, PalletDemocracyMetadataOwner, PalletDemocracyVoteAccountVote, PalletDemocracyVoteThreshold, PalletElectionProviderMultiPhaseElectionCompute, PalletElectionProviderMultiPhasePhase, PalletImOnlineSr25519AppSr25519Public, PalletMultisigTimepoint, PalletNftsAttributeNamespace, PalletNftsPalletAttributes, PalletNftsPriceWithDirection, PalletNominationPoolsCommissionChangeRate, PalletNominationPoolsPoolState, PalletRankedCollectiveTally, PalletRankedCollectiveVoteRecord, PalletStakingExposure, PalletStakingForcing, PalletStakingValidatorPrefs, PalletStateTrieMigrationError, PalletStateTrieMigrationMigrationCompute, SpConsensusGrandpaAppPublic, SpNposElectionsElectionScore, SpRuntimeDispatchError, SpRuntimeDispatchErrorWithPostInfo, SpStatementStoreStatement, SpWeightsWeightV2Weight } from '@polkadot/types/lookup';
|
||||
|
||||
export type __AugmentedEvent<ApiType extends ApiTypes> = AugmentedEvent<ApiType>;
|
||||
|
||||
@@ -109,6 +109,33 @@ declare module '@polkadot/api-base/types/events' {
|
||||
**/
|
||||
[key: string]: AugmentedEvent<ApiType>;
|
||||
};
|
||||
assetConversion: {
|
||||
/**
|
||||
* A successful call of the `AddLiquidity` extrinsic will create this event.
|
||||
**/
|
||||
LiquidityAdded: AugmentedEvent<ApiType, [who: AccountId32, mintTo: AccountId32, poolId: ITuple<[PalletAssetConversionNativeOrAssetId, PalletAssetConversionNativeOrAssetId]>, amount1Provided: u128, amount2Provided: u128, lpToken: u32, lpTokenMinted: u128], { who: AccountId32, mintTo: AccountId32, poolId: ITuple<[PalletAssetConversionNativeOrAssetId, PalletAssetConversionNativeOrAssetId]>, amount1Provided: u128, amount2Provided: u128, lpToken: u32, lpTokenMinted: u128 }>;
|
||||
/**
|
||||
* A successful call of the `RemoveLiquidity` extrinsic will create this event.
|
||||
**/
|
||||
LiquidityRemoved: AugmentedEvent<ApiType, [who: AccountId32, withdrawTo: AccountId32, poolId: ITuple<[PalletAssetConversionNativeOrAssetId, PalletAssetConversionNativeOrAssetId]>, amount1: u128, amount2: u128, lpToken: u32, lpTokenBurned: u128, withdrawalFee: Permill], { who: AccountId32, withdrawTo: AccountId32, poolId: ITuple<[PalletAssetConversionNativeOrAssetId, PalletAssetConversionNativeOrAssetId]>, amount1: u128, amount2: u128, lpToken: u32, lpTokenBurned: u128, withdrawalFee: Permill }>;
|
||||
/**
|
||||
* A successful call of the `CretaPool` extrinsic will create this event.
|
||||
**/
|
||||
PoolCreated: AugmentedEvent<ApiType, [creator: AccountId32, poolId: ITuple<[PalletAssetConversionNativeOrAssetId, PalletAssetConversionNativeOrAssetId]>, lpToken: u32], { creator: AccountId32, poolId: ITuple<[PalletAssetConversionNativeOrAssetId, PalletAssetConversionNativeOrAssetId]>, lpToken: u32 }>;
|
||||
/**
|
||||
* Assets have been converted from one to another. Both `SwapExactTokenForToken`
|
||||
* and `SwapTokenForExactToken` will generate this event.
|
||||
**/
|
||||
SwapExecuted: AugmentedEvent<ApiType, [who: AccountId32, sendTo: AccountId32, path: Vec<PalletAssetConversionNativeOrAssetId>, amountIn: u128, amountOut: u128], { who: AccountId32, sendTo: AccountId32, path: Vec<PalletAssetConversionNativeOrAssetId>, amountIn: u128, amountOut: u128 }>;
|
||||
/**
|
||||
* An amount has been transferred from one account to another.
|
||||
**/
|
||||
Transfer: AugmentedEvent<ApiType, [from: AccountId32, to: AccountId32, asset: PalletAssetConversionNativeOrAssetId, amount: u128], { from: AccountId32, to: AccountId32, asset: PalletAssetConversionNativeOrAssetId, amount: u128 }>;
|
||||
/**
|
||||
* Generic event
|
||||
**/
|
||||
[key: string]: AugmentedEvent<ApiType>;
|
||||
};
|
||||
assetRate: {
|
||||
AssetRateCreated: AugmentedEvent<ApiType, [assetId: u32, rate: u128], { assetId: u32, rate: u128 }>;
|
||||
AssetRateRemoved: AugmentedEvent<ApiType, [assetId: u32], { assetId: u32 }>;
|
||||
@@ -719,15 +746,15 @@ declare module '@polkadot/api-base/types/events' {
|
||||
};
|
||||
glutton: {
|
||||
/**
|
||||
* The computation limit has been updated by root.
|
||||
* The computation limit has been updated.
|
||||
**/
|
||||
ComputationLimitSet: AugmentedEvent<ApiType, [compute: Perbill], { compute: Perbill }>;
|
||||
/**
|
||||
* The pallet has been (re)initialized by root.
|
||||
* The pallet has been (re)initialized.
|
||||
**/
|
||||
PalletInitialized: AugmentedEvent<ApiType, [reinit: bool], { reinit: bool }>;
|
||||
/**
|
||||
* The storage limit has been updated by root.
|
||||
* The storage limit has been updated.
|
||||
**/
|
||||
StorageLimitSet: AugmentedEvent<ApiType, [storage: Perbill], { storage: Perbill }>;
|
||||
/**
|
||||
@@ -859,15 +886,10 @@ declare module '@polkadot/api-base/types/events' {
|
||||
[key: string]: AugmentedEvent<ApiType>;
|
||||
};
|
||||
messageQueue: {
|
||||
/**
|
||||
* Message discarded due to an inability to decode the item. Usually caused by state
|
||||
* corruption.
|
||||
**/
|
||||
Discarded: AugmentedEvent<ApiType, [hash_: H256], { hash_: H256 }>;
|
||||
/**
|
||||
* Message placed in overweight queue.
|
||||
**/
|
||||
OverweightEnqueued: AugmentedEvent<ApiType, [hash_: H256, origin: u32, pageIndex: u32, messageIndex: u32], { hash_: H256, origin: u32, pageIndex: u32, messageIndex: u32 }>;
|
||||
OverweightEnqueued: AugmentedEvent<ApiType, [id: U8aFixed, origin: u32, pageIndex: u32, messageIndex: u32], { id: U8aFixed, origin: u32, pageIndex: u32, messageIndex: u32 }>;
|
||||
/**
|
||||
* This page was reaped.
|
||||
**/
|
||||
@@ -875,11 +897,11 @@ declare module '@polkadot/api-base/types/events' {
|
||||
/**
|
||||
* Message is processed.
|
||||
**/
|
||||
Processed: AugmentedEvent<ApiType, [hash_: H256, origin: u32, weightUsed: SpWeightsWeightV2Weight, success: bool], { hash_: H256, origin: u32, weightUsed: SpWeightsWeightV2Weight, success: bool }>;
|
||||
Processed: AugmentedEvent<ApiType, [id: U8aFixed, origin: u32, weightUsed: SpWeightsWeightV2Weight, success: bool], { id: U8aFixed, origin: u32, weightUsed: SpWeightsWeightV2Weight, success: bool }>;
|
||||
/**
|
||||
* Message discarded due to an error in the `MessageProcessor` (usually a format error).
|
||||
**/
|
||||
ProcessingFailed: AugmentedEvent<ApiType, [hash_: H256, origin: u32, error: FrameSupportMessagesProcessMessageError], { hash_: H256, origin: u32, error: FrameSupportMessagesProcessMessageError }>;
|
||||
ProcessingFailed: AugmentedEvent<ApiType, [id: U8aFixed, origin: u32, error: FrameSupportMessagesProcessMessageError], { id: U8aFixed, origin: u32, error: FrameSupportMessagesProcessMessageError }>;
|
||||
/**
|
||||
* Generic event
|
||||
**/
|
||||
@@ -907,6 +929,20 @@ declare module '@polkadot/api-base/types/events' {
|
||||
**/
|
||||
[key: string]: AugmentedEvent<ApiType>;
|
||||
};
|
||||
nftFractionalization: {
|
||||
/**
|
||||
* An NFT was successfully fractionalized.
|
||||
**/
|
||||
NftFractionalized: AugmentedEvent<ApiType, [nftCollection: u32, nft: u32, fractions: u128, asset: u32, beneficiary: AccountId32], { nftCollection: u32, nft: u32, fractions: u128, asset: u32, beneficiary: AccountId32 }>;
|
||||
/**
|
||||
* An NFT was successfully returned back.
|
||||
**/
|
||||
NftUnified: AugmentedEvent<ApiType, [nftCollection: u32, nft: u32, asset: u32, beneficiary: AccountId32], { nftCollection: u32, nft: u32, asset: u32, beneficiary: AccountId32 }>;
|
||||
/**
|
||||
* Generic event
|
||||
**/
|
||||
[key: string]: AugmentedEvent<ApiType>;
|
||||
};
|
||||
nfts: {
|
||||
/**
|
||||
* All approvals of an item got cancelled.
|
||||
@@ -1198,6 +1234,109 @@ declare module '@polkadot/api-base/types/events' {
|
||||
**/
|
||||
[key: string]: AugmentedEvent<ApiType>;
|
||||
};
|
||||
poolAssets: {
|
||||
/**
|
||||
* Accounts were destroyed for given asset.
|
||||
**/
|
||||
AccountsDestroyed: AugmentedEvent<ApiType, [assetId: u32, accountsDestroyed: u32, accountsRemaining: u32], { assetId: u32, accountsDestroyed: u32, accountsRemaining: u32 }>;
|
||||
/**
|
||||
* An approval for account `delegate` was cancelled by `owner`.
|
||||
**/
|
||||
ApprovalCancelled: AugmentedEvent<ApiType, [assetId: u32, owner: AccountId32, delegate: AccountId32], { assetId: u32, owner: AccountId32, delegate: AccountId32 }>;
|
||||
/**
|
||||
* Approvals were destroyed for given asset.
|
||||
**/
|
||||
ApprovalsDestroyed: AugmentedEvent<ApiType, [assetId: u32, approvalsDestroyed: u32, approvalsRemaining: u32], { assetId: u32, approvalsDestroyed: u32, approvalsRemaining: u32 }>;
|
||||
/**
|
||||
* (Additional) funds have been approved for transfer to a destination account.
|
||||
**/
|
||||
ApprovedTransfer: AugmentedEvent<ApiType, [assetId: u32, source: AccountId32, delegate: AccountId32, amount: u128], { assetId: u32, source: AccountId32, delegate: AccountId32, amount: u128 }>;
|
||||
/**
|
||||
* Some asset `asset_id` was frozen.
|
||||
**/
|
||||
AssetFrozen: AugmentedEvent<ApiType, [assetId: u32], { assetId: u32 }>;
|
||||
/**
|
||||
* The min_balance of an asset has been updated by the asset owner.
|
||||
**/
|
||||
AssetMinBalanceChanged: AugmentedEvent<ApiType, [assetId: u32, newMinBalance: u128], { assetId: u32, newMinBalance: u128 }>;
|
||||
/**
|
||||
* An asset has had its attributes changed by the `Force` origin.
|
||||
**/
|
||||
AssetStatusChanged: AugmentedEvent<ApiType, [assetId: u32], { assetId: u32 }>;
|
||||
/**
|
||||
* Some asset `asset_id` was thawed.
|
||||
**/
|
||||
AssetThawed: AugmentedEvent<ApiType, [assetId: u32], { assetId: u32 }>;
|
||||
/**
|
||||
* Some account `who` was blocked.
|
||||
**/
|
||||
Blocked: AugmentedEvent<ApiType, [assetId: u32, who: AccountId32], { assetId: u32, who: AccountId32 }>;
|
||||
/**
|
||||
* Some assets were destroyed.
|
||||
**/
|
||||
Burned: AugmentedEvent<ApiType, [assetId: u32, owner: AccountId32, balance: u128], { assetId: u32, owner: AccountId32, balance: u128 }>;
|
||||
/**
|
||||
* Some asset class was created.
|
||||
**/
|
||||
Created: AugmentedEvent<ApiType, [assetId: u32, creator: AccountId32, owner: AccountId32], { assetId: u32, creator: AccountId32, owner: AccountId32 }>;
|
||||
/**
|
||||
* An asset class was destroyed.
|
||||
**/
|
||||
Destroyed: AugmentedEvent<ApiType, [assetId: u32], { assetId: u32 }>;
|
||||
/**
|
||||
* An asset class is in the process of being destroyed.
|
||||
**/
|
||||
DestructionStarted: AugmentedEvent<ApiType, [assetId: u32], { assetId: u32 }>;
|
||||
/**
|
||||
* Some asset class was force-created.
|
||||
**/
|
||||
ForceCreated: AugmentedEvent<ApiType, [assetId: u32, owner: AccountId32], { assetId: u32, owner: AccountId32 }>;
|
||||
/**
|
||||
* Some account `who` was frozen.
|
||||
**/
|
||||
Frozen: AugmentedEvent<ApiType, [assetId: u32, who: AccountId32], { assetId: u32, who: AccountId32 }>;
|
||||
/**
|
||||
* Some assets were issued.
|
||||
**/
|
||||
Issued: AugmentedEvent<ApiType, [assetId: u32, owner: AccountId32, amount: u128], { assetId: u32, owner: AccountId32, amount: u128 }>;
|
||||
/**
|
||||
* Metadata has been cleared for an asset.
|
||||
**/
|
||||
MetadataCleared: AugmentedEvent<ApiType, [assetId: u32], { assetId: u32 }>;
|
||||
/**
|
||||
* New metadata has been set for an asset.
|
||||
**/
|
||||
MetadataSet: AugmentedEvent<ApiType, [assetId: u32, name: Bytes, symbol_: Bytes, decimals: u8, isFrozen: bool], { assetId: u32, name: Bytes, symbol: Bytes, decimals: u8, isFrozen: bool }>;
|
||||
/**
|
||||
* The owner changed.
|
||||
**/
|
||||
OwnerChanged: AugmentedEvent<ApiType, [assetId: u32, owner: AccountId32], { assetId: u32, owner: AccountId32 }>;
|
||||
/**
|
||||
* The management team changed.
|
||||
**/
|
||||
TeamChanged: AugmentedEvent<ApiType, [assetId: u32, issuer: AccountId32, admin: AccountId32, freezer: AccountId32], { assetId: u32, issuer: AccountId32, admin: AccountId32, freezer: AccountId32 }>;
|
||||
/**
|
||||
* Some account `who` was thawed.
|
||||
**/
|
||||
Thawed: AugmentedEvent<ApiType, [assetId: u32, who: AccountId32], { assetId: u32, who: AccountId32 }>;
|
||||
/**
|
||||
* Some account `who` was created with a deposit from `depositor`.
|
||||
**/
|
||||
Touched: AugmentedEvent<ApiType, [assetId: u32, who: AccountId32, depositor: AccountId32], { assetId: u32, who: AccountId32, depositor: AccountId32 }>;
|
||||
/**
|
||||
* Some assets were transferred.
|
||||
**/
|
||||
Transferred: AugmentedEvent<ApiType, [assetId: u32, from: AccountId32, to: AccountId32, amount: u128], { assetId: u32, from: AccountId32, to: AccountId32, amount: u128 }>;
|
||||
/**
|
||||
* An `amount` was transferred in its entirety from `owner` to `destination` by
|
||||
* the approved `delegate`.
|
||||
**/
|
||||
TransferredApproved: AugmentedEvent<ApiType, [assetId: u32, owner: AccountId32, delegate: AccountId32, destination: AccountId32, amount: u128], { assetId: u32, owner: AccountId32, delegate: AccountId32, destination: AccountId32, amount: u128 }>;
|
||||
/**
|
||||
* Generic event
|
||||
**/
|
||||
[key: string]: AugmentedEvent<ApiType>;
|
||||
};
|
||||
pov: {
|
||||
TestEvent: AugmentedEvent<ApiType, []>;
|
||||
/**
|
||||
|
||||
@@ -10,7 +10,7 @@ import type { Data } from '@polkadot/types';
|
||||
import type { BTreeSet, Bytes, Null, Option, Struct, U8aFixed, Vec, WrapperOpaque, bool, u128, u16, u32, u64, u8 } from '@polkadot/types-codec';
|
||||
import type { AnyNumber, ITuple } from '@polkadot/types-codec/types';
|
||||
import type { AccountId32, Call, H256, Perbill, Percent } from '@polkadot/types/interfaces/runtime';
|
||||
import type { FrameSupportDispatchPerDispatchClassWeight, FrameSupportPreimagesBounded, FrameSystemAccountInfo, FrameSystemEventRecord, FrameSystemLastRuntimeUpgradeInfo, FrameSystemPhase, KitchensinkRuntimeHoldReason, KitchensinkRuntimeSessionKeys, PalletAllianceCid, PalletAllianceMemberRole, PalletAssetsApproval, PalletAssetsAssetAccount, PalletAssetsAssetDetails, PalletAssetsAssetMetadata, PalletBagsListListBag, PalletBagsListListNode, PalletBalancesAccountData, PalletBalancesBalanceLock, PalletBalancesIdAmount, PalletBalancesReserveData, PalletBountiesBounty, PalletChildBountiesChildBounty, PalletCollectiveVotes, PalletContractsStorageContractInfo, PalletContractsStorageDeletionQueueManager, PalletContractsWasmOwnerInfo, PalletContractsWasmPrefabWasmModule, PalletConvictionVotingVoteVoting, PalletCoreFellowshipMemberStatus, PalletCoreFellowshipParamsType, PalletCoreFellowshipWish, PalletDemocracyMetadataOwner, PalletDemocracyReferendumInfo, PalletDemocracyVoteThreshold, PalletDemocracyVoteVoting, PalletElectionProviderMultiPhasePhase, PalletElectionProviderMultiPhaseReadySolution, PalletElectionProviderMultiPhaseRoundSnapshot, PalletElectionProviderMultiPhaseSignedSignedSubmission, PalletElectionProviderMultiPhaseSolutionOrSnapshotSize, PalletElectionsPhragmenSeatHolder, PalletElectionsPhragmenVoter, PalletFastUnstakeUnstakeRequest, PalletGrandpaStoredPendingChange, PalletGrandpaStoredState, PalletIdentityRegistrarInfo, PalletIdentityRegistration, PalletImOnlineBoundedOpaqueNetworkState, PalletImOnlineSr25519AppSr25519Public, PalletLotteryLotteryConfig, PalletMessageQueueBookState, PalletMessageQueuePage, PalletMultisigMultisig, PalletNftsAttributeDeposit, PalletNftsAttributeNamespace, PalletNftsCollectionConfig, PalletNftsCollectionDetails, PalletNftsCollectionMetadata, PalletNftsItemConfig, PalletNftsItemDetails, PalletNftsItemMetadata, PalletNftsPendingSwap, PalletNisBid, PalletNisReceiptRecord, PalletNisSummaryRecord, PalletNominationPoolsBondedPoolInner, PalletNominationPoolsClaimPermission, PalletNominationPoolsPoolMember, PalletNominationPoolsRewardPool, PalletNominationPoolsSubPools, PalletPreimageRequestStatus, PalletProxyAnnouncement, PalletProxyProxyDefinition, PalletRankedCollectiveMemberRecord, PalletRankedCollectiveVoteRecord, PalletRecoveryActiveRecovery, PalletRecoveryRecoveryConfig, PalletReferendaReferendumInfoConvictionVotingTally, PalletReferendaReferendumInfoRankedCollectiveTally, PalletSalaryClaimantStatus, PalletSalaryStatusType, PalletSchedulerScheduled, PalletSocietyBid, PalletSocietyBidKind, PalletSocietyVote, PalletSocietyVouchingStatus, PalletStakingActiveEraInfo, PalletStakingEraRewardPoints, PalletStakingExposure, PalletStakingForcing, PalletStakingNominations, PalletStakingRewardDestination, PalletStakingSlashingSlashingSpans, PalletStakingSlashingSpanRecord, PalletStakingStakingLedger, PalletStakingUnappliedSlash, PalletStakingValidatorPrefs, PalletStateTrieMigrationMigrationLimits, PalletStateTrieMigrationMigrationTask, PalletTipsOpenTip, PalletTransactionPaymentReleases, PalletTransactionStorageTransactionInfo, PalletTreasuryProposal, PalletUniquesCollectionDetails, PalletUniquesCollectionMetadata, PalletUniquesItemDetails, PalletUniquesItemMetadata, PalletVestingReleases, PalletVestingVestingInfo, SpAuthorityDiscoveryAppPublic, SpConsensusBabeAppPublic, SpConsensusBabeBabeEpochConfiguration, SpConsensusBabeDigestsNextConfigDescriptor, SpConsensusBabeDigestsPreDigest, SpCoreCryptoKeyTypeId, SpNposElectionsElectionScore, SpRuntimeDigest, SpStakingOffenceOffenceDetails } from '@polkadot/types/lookup';
|
||||
import type { FrameSupportDispatchPerDispatchClassWeight, FrameSupportPreimagesBounded, FrameSystemAccountInfo, FrameSystemEventRecord, FrameSystemLastRuntimeUpgradeInfo, FrameSystemPhase, KitchensinkRuntimeRuntimeHoldReason, KitchensinkRuntimeSessionKeys, PalletAllianceCid, PalletAllianceMemberRole, PalletAssetConversionNativeOrAssetId, PalletAssetConversionPoolInfo, PalletAssetsApproval, PalletAssetsAssetAccount, PalletAssetsAssetDetails, PalletAssetsAssetMetadata, PalletBagsListListBag, PalletBagsListListNode, PalletBalancesAccountData, PalletBalancesBalanceLock, PalletBalancesIdAmount, PalletBalancesReserveData, PalletBountiesBounty, PalletChildBountiesChildBounty, PalletCollectiveVotes, PalletContractsStorageContractInfo, PalletContractsStorageDeletionQueueManager, PalletContractsWasmOwnerInfo, PalletContractsWasmPrefabWasmModule, PalletConvictionVotingVoteVoting, PalletCoreFellowshipMemberStatus, PalletCoreFellowshipParamsType, PalletCoreFellowshipWish, PalletDemocracyMetadataOwner, PalletDemocracyReferendumInfo, PalletDemocracyVoteThreshold, PalletDemocracyVoteVoting, PalletElectionProviderMultiPhasePhase, PalletElectionProviderMultiPhaseReadySolution, PalletElectionProviderMultiPhaseRoundSnapshot, PalletElectionProviderMultiPhaseSignedSignedSubmission, PalletElectionProviderMultiPhaseSolutionOrSnapshotSize, PalletElectionsPhragmenSeatHolder, PalletElectionsPhragmenVoter, PalletFastUnstakeUnstakeRequest, PalletGrandpaStoredPendingChange, PalletGrandpaStoredState, PalletIdentityRegistrarInfo, PalletIdentityRegistration, PalletImOnlineBoundedOpaqueNetworkState, PalletImOnlineSr25519AppSr25519Public, PalletLotteryLotteryConfig, PalletMessageQueueBookState, PalletMessageQueuePage, PalletMultisigMultisig, PalletNftFractionalizationDetails, PalletNftsAttributeDeposit, PalletNftsAttributeNamespace, PalletNftsCollectionConfig, PalletNftsCollectionDetails, PalletNftsCollectionMetadata, PalletNftsItemConfig, PalletNftsItemDetails, PalletNftsItemMetadata, PalletNftsPendingSwap, PalletNisBid, PalletNisReceiptRecord, PalletNisSummaryRecord, PalletNominationPoolsBondedPoolInner, PalletNominationPoolsClaimPermission, PalletNominationPoolsPoolMember, PalletNominationPoolsRewardPool, PalletNominationPoolsSubPools, PalletPreimageRequestStatus, PalletProxyAnnouncement, PalletProxyProxyDefinition, PalletRankedCollectiveMemberRecord, PalletRankedCollectiveVoteRecord, PalletRecoveryActiveRecovery, PalletRecoveryRecoveryConfig, PalletReferendaReferendumInfoConvictionVotingTally, PalletReferendaReferendumInfoRankedCollectiveTally, PalletSalaryClaimantStatus, PalletSalaryStatusType, PalletSchedulerScheduled, PalletSocietyBid, PalletSocietyBidKind, PalletSocietyVote, PalletSocietyVouchingStatus, PalletStakingActiveEraInfo, PalletStakingEraRewardPoints, PalletStakingExposure, PalletStakingForcing, PalletStakingNominations, PalletStakingRewardDestination, PalletStakingSlashingSlashingSpans, PalletStakingSlashingSpanRecord, PalletStakingStakingLedger, PalletStakingUnappliedSlash, PalletStakingValidatorPrefs, PalletStateTrieMigrationMigrationLimits, PalletStateTrieMigrationMigrationTask, PalletTipsOpenTip, PalletTransactionPaymentReleases, PalletTransactionStorageTransactionInfo, PalletTreasuryProposal, PalletUniquesCollectionDetails, PalletUniquesCollectionMetadata, PalletUniquesItemDetails, PalletUniquesItemMetadata, PalletVestingReleases, PalletVestingVestingInfo, SpAuthorityDiscoveryAppPublic, SpConsensusBabeAppPublic, SpConsensusBabeBabeEpochConfiguration, SpConsensusBabeDigestsNextConfigDescriptor, SpConsensusBabeDigestsPreDigest, SpCoreCryptoKeyTypeId, SpNposElectionsElectionScore, SpRuntimeDigest, SpStakingOffenceOffenceDetails } from '@polkadot/types/lookup';
|
||||
import type { Observable } from '@polkadot/types/types';
|
||||
|
||||
export type __AugmentedQuery<ApiType extends ApiTypes> = AugmentedQuery<ApiType, () => unknown>;
|
||||
@@ -85,6 +85,22 @@ declare module '@polkadot/api-base/types/storage' {
|
||||
**/
|
||||
[key: string]: QueryableStorageEntry<ApiType>;
|
||||
};
|
||||
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<[PalletAssetConversionNativeOrAssetId, PalletAssetConversionNativeOrAssetId]> | [PalletAssetConversionNativeOrAssetId | { Native: any } | { Asset: any } | string | Uint8Array, PalletAssetConversionNativeOrAssetId | { Native: any } | { Asset: any } | string | Uint8Array]) => Observable<Option<PalletAssetConversionPoolInfo>>, [ITuple<[PalletAssetConversionNativeOrAssetId, PalletAssetConversionNativeOrAssetId]>]> & QueryableStorageEntry<ApiType, [ITuple<[PalletAssetConversionNativeOrAssetId, PalletAssetConversionNativeOrAssetId]>]>;
|
||||
/**
|
||||
* Generic query
|
||||
**/
|
||||
[key: string]: QueryableStorageEntry<ApiType>;
|
||||
};
|
||||
assetRate: {
|
||||
/**
|
||||
* Maps an asset to its fixed point representation in the native balance.
|
||||
@@ -294,7 +310,7 @@ declare module '@polkadot/api-base/types/storage' {
|
||||
* Holds on account balances.
|
||||
**/
|
||||
holds: AugmentedQuery<ApiType, (arg: AccountId32 | string | Uint8Array) => Observable<Vec<{
|
||||
readonly id: KitchensinkRuntimeHoldReason;
|
||||
readonly id: KitchensinkRuntimeRuntimeHoldReason;
|
||||
readonly amount: u128;
|
||||
} & Struct>>, [AccountId32]> & QueryableStorageEntry<ApiType, [AccountId32]>;
|
||||
/**
|
||||
@@ -391,6 +407,7 @@ declare module '@polkadot/api-base/types/storage' {
|
||||
* and the latest deleted contract in queue.
|
||||
**/
|
||||
deletionQueueCounter: AugmentedQuery<ApiType, () => Observable<PalletContractsStorageDeletionQueueManager>, []> & QueryableStorageEntry<ApiType, []>;
|
||||
migrationInProgress: AugmentedQuery<ApiType, () => Observable<Option<Bytes>>, []> & QueryableStorageEntry<ApiType, []>;
|
||||
/**
|
||||
* This is a **monotonic** counter incremented on contract instantiation.
|
||||
*
|
||||
@@ -693,22 +710,24 @@ declare module '@polkadot/api-base/types/storage' {
|
||||
/**
|
||||
* Number of eras to check per block.
|
||||
*
|
||||
* If set to 0, this pallet does absolutely nothing.
|
||||
* If set to 0, this pallet does absolutely nothing. Cannot be set to more than
|
||||
* [`Config::MaxErasToCheckPerBlock`].
|
||||
*
|
||||
* Based on the amount of weight available at `on_idle`, up to this many eras of a single
|
||||
* nominator might be checked.
|
||||
* Based on the amount of weight available at [`Pallet::on_idle`], up to this many eras are
|
||||
* checked. The checking is represented by updating [`UnstakeRequest::checked`], which is
|
||||
* stored in [`Head`].
|
||||
**/
|
||||
erasToCheckPerBlock: AugmentedQuery<ApiType, () => Observable<u32>, []> & QueryableStorageEntry<ApiType, []>;
|
||||
/**
|
||||
* The current "head of the queue" being unstaked.
|
||||
*
|
||||
* The head in itself can be a batch of up to [`Config::BatchSize`] stakers.
|
||||
**/
|
||||
head: AugmentedQuery<ApiType, () => Observable<Option<PalletFastUnstakeUnstakeRequest>>, []> & QueryableStorageEntry<ApiType, []>;
|
||||
/**
|
||||
* The map of all accounts wishing to be unstaked.
|
||||
*
|
||||
* Keeps track of `AccountId` wishing to unstake and it's corresponding deposit.
|
||||
*
|
||||
* TWOX-NOTE: SAFE since `AccountId` is a secure hash.
|
||||
**/
|
||||
queue: AugmentedQuery<ApiType, (arg: AccountId32 | string | Uint8Array) => Observable<Option<u128>>, [AccountId32]> & QueryableStorageEntry<ApiType, [AccountId32]>;
|
||||
/**
|
||||
@@ -943,6 +962,16 @@ declare module '@polkadot/api-base/types/storage' {
|
||||
**/
|
||||
[key: string]: QueryableStorageEntry<ApiType>;
|
||||
};
|
||||
nftFractionalization: {
|
||||
/**
|
||||
* Keeps track of the corresponding NFT ID, asset ID and amount minted.
|
||||
**/
|
||||
nftToAsset: AugmentedQuery<ApiType, (arg: ITuple<[u32, u32]> | [u32 | AnyNumber | Uint8Array, u32 | AnyNumber | Uint8Array]) => Observable<Option<PalletNftFractionalizationDetails>>, [ITuple<[u32, u32]>]> & QueryableStorageEntry<ApiType, [ITuple<[u32, u32]>]>;
|
||||
/**
|
||||
* 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
|
||||
@@ -1157,6 +1186,30 @@ declare module '@polkadot/api-base/types/storage' {
|
||||
**/
|
||||
[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]>;
|
||||
/**
|
||||
* Generic query
|
||||
**/
|
||||
[key: string]: QueryableStorageEntry<ApiType>;
|
||||
};
|
||||
pov: {
|
||||
/**
|
||||
* A value with a MEL bound of 32 byte.
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -18,13 +18,13 @@
|
||||
"./detectPackage.cjs"
|
||||
],
|
||||
"type": "module",
|
||||
"version": "10.7.3",
|
||||
"version": "10.9.1",
|
||||
"main": "index.js",
|
||||
"dependencies": {
|
||||
"@polkadot/rpc-core": "10.7.3",
|
||||
"@polkadot/types": "10.7.3",
|
||||
"@polkadot/util": "^12.2.1",
|
||||
"@polkadot/rpc-core": "10.9.1",
|
||||
"@polkadot/types": "10.9.1",
|
||||
"@polkadot/util": "^12.3.1",
|
||||
"rxjs": "^7.8.1",
|
||||
"tslib": "^2.5.2"
|
||||
"tslib": "^2.5.3"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3,4 +3,4 @@
|
||||
|
||||
// Do not edit, auto-generated by @polkadot/dev
|
||||
|
||||
export const packageInfo = { name: '@polkadot/api-base', path: 'auto', type: 'auto', version: '10.7.3' };
|
||||
export const packageInfo = { name: '@polkadot/api-base', path: 'auto', type: 'auto', version: '10.9.1' };
|
||||
|
||||
@@ -18,20 +18,21 @@
|
||||
"./detectPackage.cjs"
|
||||
],
|
||||
"type": "module",
|
||||
"version": "10.7.3",
|
||||
"version": "10.9.1",
|
||||
"main": "index.js",
|
||||
"dependencies": {
|
||||
"@polkadot/api": "10.7.3",
|
||||
"@polkadot/types": "10.7.3",
|
||||
"@polkadot/types-codec": "10.7.3",
|
||||
"@polkadot/types-create": "10.7.3",
|
||||
"@polkadot/util": "^12.2.1",
|
||||
"@polkadot/util-crypto": "^12.2.1",
|
||||
"@polkadot/api": "10.9.1",
|
||||
"@polkadot/api-augment": "10.9.1",
|
||||
"@polkadot/types": "10.9.1",
|
||||
"@polkadot/types-codec": "10.9.1",
|
||||
"@polkadot/types-create": "10.9.1",
|
||||
"@polkadot/util": "^12.3.1",
|
||||
"@polkadot/util-crypto": "^12.3.1",
|
||||
"rxjs": "^7.8.1",
|
||||
"tslib": "^2.5.2"
|
||||
"tslib": "^2.5.3"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@polkadot/api-augment": "10.7.3",
|
||||
"@polkadot/keyring": "^12.2.1"
|
||||
"@polkadot/api-augment": "10.9.1",
|
||||
"@polkadot/keyring": "^12.3.1"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -101,7 +101,7 @@ describe('Abi', (): void => {
|
||||
JSON.parse(fs.readFileSync(cmpFile, 'utf-8'))
|
||||
);
|
||||
} catch (error) {
|
||||
if (process.env.GITHUB_REPOSITORY) {
|
||||
if (process.env['GITHUB_REPOSITORY']) {
|
||||
console.error(registryJson);
|
||||
|
||||
throw error;
|
||||
@@ -114,8 +114,8 @@ describe('Abi', (): void => {
|
||||
});
|
||||
|
||||
it('has the correct hash for the source', (): void => {
|
||||
const abi = new Abi(abis.ink_v0_flipperBundle);
|
||||
const bundle = abis.ink_v0_flipperBundle as unknown as JSONAbi;
|
||||
const abi = new Abi(abis['ink_v0_flipperBundle']);
|
||||
const bundle = abis['ink_v0_flipperBundle'] as unknown as JSONAbi;
|
||||
|
||||
// manual
|
||||
expect(bundle.source.hash).toEqual(blake2AsHex(bundle.source.wasm));
|
||||
|
||||
@@ -2,16 +2,22 @@
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
import type { Bytes } from '@polkadot/types';
|
||||
import type { ChainProperties, ContractConstructorSpecLatest, ContractEventSpecLatest, ContractMessageParamSpecLatest, ContractMessageSpecLatest, ContractMetadata, ContractMetadataLatest, ContractProjectInfo } from '@polkadot/types/interfaces';
|
||||
import type { Codec, Registry } from '@polkadot/types/types';
|
||||
import type { ChainProperties, ContractConstructorSpecLatest, ContractEventSpecLatest, ContractMessageParamSpecLatest, ContractMessageSpecLatest, ContractMetadata, ContractMetadataLatest, ContractProjectInfo, ContractTypeSpec } from '@polkadot/types/interfaces';
|
||||
import type { Codec, Registry, TypeDef } from '@polkadot/types/types';
|
||||
import type { AbiConstructor, AbiEvent, AbiMessage, AbiParam, DecodedEvent, DecodedMessage } from '../types.js';
|
||||
|
||||
import { TypeRegistry } from '@polkadot/types';
|
||||
import { Option, TypeRegistry } from '@polkadot/types';
|
||||
import { TypeDefInfo } from '@polkadot/types-create';
|
||||
import { assertReturn, compactAddLength, compactStripLength, isNumber, isObject, isString, logger, stringCamelCase, stringify, u8aConcat, u8aToHex } from '@polkadot/util';
|
||||
import { assertReturn, compactAddLength, compactStripLength, isBn, isNumber, isObject, isString, isUndefined, logger, stringCamelCase, stringify, u8aConcat, u8aToHex } from '@polkadot/util';
|
||||
|
||||
import { convertVersions, enumVersions } from './toLatest.js';
|
||||
|
||||
interface AbiJson {
|
||||
version?: string;
|
||||
|
||||
[key: string]: unknown;
|
||||
}
|
||||
|
||||
const l = logger('Abi');
|
||||
|
||||
const PRIMITIVE_ALWAYS = ['AccountId', 'AccountIndex', 'Address', 'Balance'];
|
||||
@@ -26,12 +32,12 @@ function findMessage <T extends AbiMessage> (list: T[], messageOrId: T | string
|
||||
return assertReturn(message, () => `Attempted to call an invalid contract interface, ${stringify(messageOrId)}`);
|
||||
}
|
||||
|
||||
function getLatestMeta (registry: Registry, json: Record<string, unknown>): ContractMetadataLatest {
|
||||
function getLatestMeta (registry: Registry, json: AbiJson): ContractMetadataLatest {
|
||||
// this is for V1, V2, V3
|
||||
const vx = enumVersions.find((v) => isObject(json[v]));
|
||||
|
||||
// this was added in V4
|
||||
const jsonVersion = json.version as string;
|
||||
const jsonVersion = json.version;
|
||||
|
||||
if (!vx && jsonVersion && !enumVersions.find((v) => v === `V${jsonVersion}`)) {
|
||||
throw new Error(`Unable to handle version ${jsonVersion}`);
|
||||
@@ -56,7 +62,7 @@ function getLatestMeta (registry: Registry, json: Record<string, unknown>): Cont
|
||||
function parseJson (json: Record<string, unknown>, chainProperties?: ChainProperties): [Record<string, unknown>, Registry, ContractMetadataLatest, ContractProjectInfo] {
|
||||
const registry = new TypeRegistry();
|
||||
const info = registry.createType('ContractProjectInfo', json) as unknown as ContractProjectInfo;
|
||||
const latest = getLatestMeta(registry, json);
|
||||
const latest = getLatestMeta(registry, json as unknown as AbiJson);
|
||||
const lookup = registry.createType('PortableRegistry', { types: latest.types }, true);
|
||||
|
||||
// attach the lookup to the registry - now the types are known
|
||||
@@ -74,6 +80,22 @@ function parseJson (json: Record<string, unknown>, chainProperties?: ChainProper
|
||||
return [json, registry, latest, info];
|
||||
}
|
||||
|
||||
/**
|
||||
* @internal
|
||||
* Determines if the given input value is a ContractTypeSpec
|
||||
*/
|
||||
function isTypeSpec (value: Codec): value is ContractTypeSpec {
|
||||
return !!value && value instanceof Map && !isUndefined((value as ContractTypeSpec).type) && !isUndefined((value as ContractTypeSpec).displayName);
|
||||
}
|
||||
|
||||
/**
|
||||
* @internal
|
||||
* Determines if the given input value is an Option
|
||||
*/
|
||||
function isOption (value: Codec): value is Option<Codec> {
|
||||
return !!value && value instanceof Option;
|
||||
}
|
||||
|
||||
export class Abi {
|
||||
readonly events: AbiEvent[];
|
||||
readonly constructors: AbiConstructor[];
|
||||
@@ -82,6 +104,7 @@ export class Abi {
|
||||
readonly messages: AbiMessage[];
|
||||
readonly metadata: ContractMetadataLatest;
|
||||
readonly registry: Registry;
|
||||
readonly environment: Map<string, TypeDef | Codec> = new Map();
|
||||
|
||||
constructor (abiJson: Record<string, unknown> | string, chainProperties?: ChainProperties) {
|
||||
[this.json, this.registry, this.metadata, this.info] = parseJson(
|
||||
@@ -93,23 +116,47 @@ export class Abi {
|
||||
this.constructors = this.metadata.spec.constructors.map((spec: ContractConstructorSpecLatest, index) =>
|
||||
this.#createMessage(spec, index, {
|
||||
isConstructor: true,
|
||||
isPayable: spec.payable.isTrue
|
||||
isDefault: spec.default.isTrue,
|
||||
isPayable: spec.payable.isTrue,
|
||||
returnType: spec.returnType.isSome
|
||||
? this.registry.lookup.getTypeDef(spec.returnType.unwrap().type)
|
||||
: null
|
||||
})
|
||||
);
|
||||
this.events = this.metadata.spec.events.map((spec: ContractEventSpecLatest, index) =>
|
||||
this.#createEvent(spec, index)
|
||||
);
|
||||
this.messages = this.metadata.spec.messages.map((spec: ContractMessageSpecLatest, index): AbiMessage => {
|
||||
const typeSpec = spec.returnType.unwrapOr(null);
|
||||
|
||||
return this.#createMessage(spec, index, {
|
||||
this.messages = this.metadata.spec.messages.map((spec: ContractMessageSpecLatest, index): AbiMessage =>
|
||||
this.#createMessage(spec, index, {
|
||||
isDefault: spec.default.isTrue,
|
||||
isMutating: spec.mutates.isTrue,
|
||||
isPayable: spec.payable.isTrue,
|
||||
returnType: typeSpec
|
||||
? this.registry.lookup.getTypeDef(typeSpec.type)
|
||||
returnType: spec.returnType.isSome
|
||||
? this.registry.lookup.getTypeDef(spec.returnType.unwrap().type)
|
||||
: null
|
||||
});
|
||||
});
|
||||
})
|
||||
);
|
||||
|
||||
// NOTE See the rationale for having Option<...> values in the actual
|
||||
// ContractEnvironmentV4 structure definition in interfaces/contractsAbi
|
||||
// (Due to conversions, the fields may not exist)
|
||||
for (const [key, opt] of this.metadata.spec.environment.entries()) {
|
||||
if (isOption(opt)) {
|
||||
if (opt.isSome) {
|
||||
const value = opt.unwrap();
|
||||
|
||||
if (isBn(value)) {
|
||||
this.environment.set(key, value);
|
||||
} else if (isTypeSpec(value)) {
|
||||
this.environment.set(key, this.registry.lookup.getTypeDef(value.type));
|
||||
} else {
|
||||
throw new Error(`Invalid environment definition for ${key}:: Expected either Number or ContractTypeSpec`);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
throw new Error(`Expected Option<*> definition for ${key} in ContractEnvironment`);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -215,6 +262,7 @@ export class Abi {
|
||||
}),
|
||||
identifier,
|
||||
index,
|
||||
isDefault: spec.default.isTrue,
|
||||
method: stringCamelCase(identifier),
|
||||
path: identifier.split('::').map((s) => stringCamelCase(s)),
|
||||
selector: spec.selector,
|
||||
|
||||
@@ -10,7 +10,7 @@ import { v0ToLatest, v1ToLatest, v2ToLatest, v3ToLatest, v4ToLatest } from './to
|
||||
|
||||
describe('v0ToLatest', (): void => {
|
||||
const registry = new TypeRegistry();
|
||||
const contract = registry.createType('ContractMetadata', { V0: abis.ink_v0_erc20 });
|
||||
const contract = registry.createType('ContractMetadata', { V0: abis['ink_v0_erc20'] });
|
||||
const latest = v0ToLatest(registry, contract.asV0);
|
||||
|
||||
it('has the correct constructors', (): void => {
|
||||
@@ -52,7 +52,7 @@ describe('v0ToLatest', (): void => {
|
||||
|
||||
describe('v1ToLatest', (): void => {
|
||||
const registry = new TypeRegistry();
|
||||
const contract = registry.createType('ContractMetadata', { V1: abis.ink_v1_flipper.V1 });
|
||||
const contract = registry.createType('ContractMetadata', { V1: abis['ink_v1_flipper']['V1'] });
|
||||
const latest = v1ToLatest(registry, contract.asV1);
|
||||
|
||||
it('has the correct constructors', (): void => {
|
||||
@@ -68,7 +68,7 @@ describe('v1ToLatest', (): void => {
|
||||
});
|
||||
|
||||
it('has the correct messages with namespaced method name', (): void => {
|
||||
const contract = registry.createType('ContractMetadata', { V1: abis.ink_v1_psp22.V1 });
|
||||
const contract = registry.createType('ContractMetadata', { V1: abis['ink_v1_psp22']['V1'] });
|
||||
const latest = v1ToLatest(registry, contract.asV1);
|
||||
|
||||
expect(
|
||||
@@ -87,7 +87,7 @@ describe('v1ToLatest', (): void => {
|
||||
|
||||
describe('v2ToLatest', (): void => {
|
||||
const registry = new TypeRegistry();
|
||||
const contract = registry.createType('ContractMetadata', { V2: abis.ink_v2_flipper.V2 });
|
||||
const contract = registry.createType('ContractMetadata', { V2: abis['ink_v2_flipper']['V2'] });
|
||||
const latest = v2ToLatest(registry, contract.asV2);
|
||||
|
||||
it('has the correct constructor flag', (): void => {
|
||||
@@ -99,7 +99,7 @@ describe('v2ToLatest', (): void => {
|
||||
|
||||
describe('v3ToLatest', (): void => {
|
||||
const registry = new TypeRegistry();
|
||||
const contract = registry.createType('ContractMetadata', { V3: abis.ink_v3_flipper.V3 });
|
||||
const contract = registry.createType('ContractMetadata', { V3: abis['ink_v3_flipper']['V3'] });
|
||||
const latest = v3ToLatest(registry, contract.asV3);
|
||||
|
||||
it('has the correct constructor flags', (): void => {
|
||||
@@ -112,7 +112,7 @@ describe('v3ToLatest', (): void => {
|
||||
});
|
||||
|
||||
it('has the correct messages', (): void => {
|
||||
const contract = registry.createType('ContractMetadata', { V3: abis.ink_v3_traitErc20.V3 });
|
||||
const contract = registry.createType('ContractMetadata', { V3: abis['ink_v3_traitErc20']['V3'] });
|
||||
const latest = v3ToLatest(registry, contract.asV3);
|
||||
|
||||
expect(
|
||||
@@ -125,7 +125,7 @@ describe('v3ToLatest', (): void => {
|
||||
|
||||
describe('v4ToLatest', (): void => {
|
||||
const registry = new TypeRegistry();
|
||||
const contract = registry.createType('ContractMetadata', { V4: abis.ink_v4_flipperContract });
|
||||
const contract = registry.createType('ContractMetadata', { V4: abis['ink_v4_flipperContract'] });
|
||||
const latest = v4ToLatest(registry, contract.asV4);
|
||||
|
||||
it('has the correct constructor flags', (): void => {
|
||||
|
||||
@@ -4,6 +4,17 @@
|
||||
import type { ContractMetadataV3, ContractMetadataV4 } from '@polkadot/types/interfaces';
|
||||
import type { Registry } from '@polkadot/types/types';
|
||||
|
||||
export function v3ToV4 (_registry: Registry, v3: ContractMetadataV3): ContractMetadataV4 {
|
||||
return v3;
|
||||
import { objectSpread } from '@polkadot/util';
|
||||
|
||||
export function v3ToV4 (registry: Registry, v3: ContractMetadataV3): ContractMetadataV4 {
|
||||
return registry.createType('ContractMetadataV4', objectSpread({}, v3, {
|
||||
spec: objectSpread({}, v3.spec, {
|
||||
constructors: v3.spec.constructors.map((c) =>
|
||||
registry.createType('ContractConstructorSpecV4', objectSpread({}, c))
|
||||
),
|
||||
messages: v3.spec.messages.map((m) =>
|
||||
registry.createType('ContractMessageSpecV3', objectSpread({}, m))
|
||||
)
|
||||
})
|
||||
}));
|
||||
}
|
||||
|
||||
@@ -0,0 +1,4 @@
|
||||
// Copyright 2017-2023 @polkadot/api-contract authors & contributors
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
import '@polkadot/api-augment';
|
||||
@@ -97,7 +97,7 @@ export class Contract<ApiType extends ApiTypes> extends Base<ApiType> {
|
||||
: convertWeight(
|
||||
this.api.consts.system.blockWeights
|
||||
? (this.api.consts.system.blockWeights as unknown as { maxBlock: WeightV2 }).maxBlock
|
||||
: this.api.consts.system.maximumBlockWeight as Weight
|
||||
: this.api.consts.system['maximumBlockWeight'] as Weight
|
||||
).v1Weight.muln(64).div(BN_HUNDRED)
|
||||
);
|
||||
};
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
|
||||
import '@polkadot/api-augment';
|
||||
|
||||
import type { TestKeyringMap } from '@polkadot/keyring/testingPairs';
|
||||
import type { TestKeyringMapSubstrate } from '@polkadot/keyring/testingPairs';
|
||||
|
||||
import { ApiPromise } from '@polkadot/api';
|
||||
import { BlueprintPromise, ContractPromise } from '@polkadot/api-contract';
|
||||
@@ -13,21 +13,21 @@ import { createTestPairs } from '@polkadot/keyring/testingPairs';
|
||||
|
||||
import abiIncrementer from './test/contracts/ink/v0/incrementer.json' assert { type: 'json' };
|
||||
|
||||
async function checkBlueprint (api: ApiPromise, pairs: TestKeyringMap): Promise<void> {
|
||||
async function checkBlueprint (api: ApiPromise, pairs: TestKeyringMapSubstrate): Promise<void> {
|
||||
const blueprint = new BlueprintPromise(api, abiIncrementer as Record<string, unknown>, '0x1234');
|
||||
|
||||
await blueprint.tx.new({ gasLimit: 456, salt: '0x1234', value: 123 }, 42).signAndSend(pairs.bob);
|
||||
await blueprint.tx.new({ gasLimit: 456, value: 123 }, 42).signAndSend(pairs.bob);
|
||||
await blueprint.tx['new']({ gasLimit: 456, salt: '0x1234', value: 123 }, 42).signAndSend(pairs.bob);
|
||||
await blueprint.tx['new']({ gasLimit: 456, value: 123 }, 42).signAndSend(pairs.bob);
|
||||
}
|
||||
|
||||
async function checkContract (api: ApiPromise, pairs: TestKeyringMap): Promise<void> {
|
||||
async function checkContract (api: ApiPromise, pairs: TestKeyringMapSubstrate): Promise<void> {
|
||||
const contract = new ContractPromise(api, abiIncrementer as Record<string, unknown>, '0x1234');
|
||||
|
||||
// queries
|
||||
await contract.query.get(pairs.alice.address, {});
|
||||
await contract.query['get'](pairs.alice.address, {});
|
||||
|
||||
// execute
|
||||
await contract.tx.inc({ gasLimit: 1234 }, 123).signAndSend(pairs.eve);
|
||||
await contract.tx['inc']({ gasLimit: 1234 }, 123).signAndSend(pairs.eve);
|
||||
}
|
||||
|
||||
async function main (): Promise<void> {
|
||||
|
||||
@@ -3,4 +3,4 @@
|
||||
|
||||
// Do not edit, auto-generated by @polkadot/dev
|
||||
|
||||
export const packageInfo = { name: '@polkadot/api-contract', path: 'auto', type: 'auto', version: '10.7.3' };
|
||||
export const packageInfo = { name: '@polkadot/api-contract', path: 'auto', type: 'auto', version: '10.9.1' };
|
||||
|
||||
@@ -5,5 +5,151 @@
|
||||
"type": "bool",
|
||||
"docs": [],
|
||||
"namespace": ""
|
||||
},
|
||||
{
|
||||
"info": "Result",
|
||||
"lookupIndex": 1,
|
||||
"type": "Result<Null, InkPrimitivesLangError>",
|
||||
"docs": [],
|
||||
"namespace": "Result",
|
||||
"sub": [
|
||||
{
|
||||
"name": "Ok",
|
||||
"info": "Null",
|
||||
"lookupIndex": 2,
|
||||
"type": "Null",
|
||||
"docs": [],
|
||||
"namespace": ""
|
||||
},
|
||||
{
|
||||
"name": "Error",
|
||||
"docs": [],
|
||||
"info": "Si",
|
||||
"lookupIndex": 3,
|
||||
"lookupName": "InkPrimitivesLangError",
|
||||
"type": "Lookup3"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"info": "Null",
|
||||
"lookupIndex": 2,
|
||||
"type": "Null",
|
||||
"docs": [],
|
||||
"namespace": ""
|
||||
},
|
||||
{
|
||||
"info": "Enum",
|
||||
"lookupIndex": 3,
|
||||
"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": 4,
|
||||
"type": "Result<bool, InkPrimitivesLangError>",
|
||||
"docs": [],
|
||||
"namespace": "Result",
|
||||
"sub": [
|
||||
{
|
||||
"name": "Ok",
|
||||
"info": "Plain",
|
||||
"lookupIndex": 0,
|
||||
"type": "bool",
|
||||
"docs": [],
|
||||
"namespace": ""
|
||||
},
|
||||
{
|
||||
"name": "Error",
|
||||
"docs": [],
|
||||
"info": "Si",
|
||||
"lookupIndex": 3,
|
||||
"lookupName": "InkPrimitivesLangError",
|
||||
"type": "Lookup3"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"info": "Plain",
|
||||
"lookupIndex": 5,
|
||||
"type": "AccountId",
|
||||
"docs": [],
|
||||
"namespace": "ink_primitives::types::AccountId",
|
||||
"lookupNameRoot": "InkPrimitivesAccountId"
|
||||
},
|
||||
{
|
||||
"info": "VecFixed",
|
||||
"lookupIndex": 6,
|
||||
"type": "[u8;32]",
|
||||
"docs": [],
|
||||
"namespace": "",
|
||||
"length": 32,
|
||||
"sub": {
|
||||
"info": "Plain",
|
||||
"lookupIndex": 7,
|
||||
"type": "u8",
|
||||
"docs": [],
|
||||
"namespace": ""
|
||||
}
|
||||
},
|
||||
{
|
||||
"info": "Plain",
|
||||
"lookupIndex": 7,
|
||||
"type": "u8",
|
||||
"docs": [],
|
||||
"namespace": ""
|
||||
},
|
||||
{
|
||||
"info": "Plain",
|
||||
"lookupIndex": 8,
|
||||
"type": "u128",
|
||||
"docs": [],
|
||||
"namespace": ""
|
||||
},
|
||||
{
|
||||
"info": "Plain",
|
||||
"lookupIndex": 9,
|
||||
"type": "Hash",
|
||||
"docs": [],
|
||||
"namespace": "ink_primitives::types::Hash",
|
||||
"lookupNameRoot": "InkPrimitivesHash"
|
||||
},
|
||||
{
|
||||
"info": "Plain",
|
||||
"lookupIndex": 10,
|
||||
"type": "u64",
|
||||
"docs": [],
|
||||
"namespace": ""
|
||||
},
|
||||
{
|
||||
"info": "Plain",
|
||||
"lookupIndex": 11,
|
||||
"type": "u32",
|
||||
"docs": [],
|
||||
"namespace": ""
|
||||
},
|
||||
{
|
||||
"info": "Plain",
|
||||
"lookupIndex": 12,
|
||||
"type": "NoChainExtension",
|
||||
"docs": [],
|
||||
"namespace": "ink_env::types::NoChainExtension",
|
||||
"lookupNameRoot": "InkEnvNoChainExtension"
|
||||
}
|
||||
]
|
||||
@@ -5,5 +5,151 @@
|
||||
"type": "bool",
|
||||
"docs": [],
|
||||
"namespace": ""
|
||||
},
|
||||
{
|
||||
"info": "Result",
|
||||
"lookupIndex": 1,
|
||||
"type": "Result<Null, InkPrimitivesLangError>",
|
||||
"docs": [],
|
||||
"namespace": "Result",
|
||||
"sub": [
|
||||
{
|
||||
"name": "Ok",
|
||||
"info": "Null",
|
||||
"lookupIndex": 2,
|
||||
"type": "Null",
|
||||
"docs": [],
|
||||
"namespace": ""
|
||||
},
|
||||
{
|
||||
"name": "Error",
|
||||
"docs": [],
|
||||
"info": "Si",
|
||||
"lookupIndex": 3,
|
||||
"lookupName": "InkPrimitivesLangError",
|
||||
"type": "Lookup3"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"info": "Null",
|
||||
"lookupIndex": 2,
|
||||
"type": "Null",
|
||||
"docs": [],
|
||||
"namespace": ""
|
||||
},
|
||||
{
|
||||
"info": "Enum",
|
||||
"lookupIndex": 3,
|
||||
"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": 4,
|
||||
"type": "Result<bool, InkPrimitivesLangError>",
|
||||
"docs": [],
|
||||
"namespace": "Result",
|
||||
"sub": [
|
||||
{
|
||||
"name": "Ok",
|
||||
"info": "Plain",
|
||||
"lookupIndex": 0,
|
||||
"type": "bool",
|
||||
"docs": [],
|
||||
"namespace": ""
|
||||
},
|
||||
{
|
||||
"name": "Error",
|
||||
"docs": [],
|
||||
"info": "Si",
|
||||
"lookupIndex": 3,
|
||||
"lookupName": "InkPrimitivesLangError",
|
||||
"type": "Lookup3"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"info": "Plain",
|
||||
"lookupIndex": 5,
|
||||
"type": "AccountId",
|
||||
"docs": [],
|
||||
"namespace": "ink_primitives::types::AccountId",
|
||||
"lookupNameRoot": "InkPrimitivesAccountId"
|
||||
},
|
||||
{
|
||||
"info": "VecFixed",
|
||||
"lookupIndex": 6,
|
||||
"type": "[u8;32]",
|
||||
"docs": [],
|
||||
"namespace": "",
|
||||
"length": 32,
|
||||
"sub": {
|
||||
"info": "Plain",
|
||||
"lookupIndex": 7,
|
||||
"type": "u8",
|
||||
"docs": [],
|
||||
"namespace": ""
|
||||
}
|
||||
},
|
||||
{
|
||||
"info": "Plain",
|
||||
"lookupIndex": 7,
|
||||
"type": "u8",
|
||||
"docs": [],
|
||||
"namespace": ""
|
||||
},
|
||||
{
|
||||
"info": "Plain",
|
||||
"lookupIndex": 8,
|
||||
"type": "u128",
|
||||
"docs": [],
|
||||
"namespace": ""
|
||||
},
|
||||
{
|
||||
"info": "Plain",
|
||||
"lookupIndex": 9,
|
||||
"type": "Hash",
|
||||
"docs": [],
|
||||
"namespace": "ink_primitives::types::Hash",
|
||||
"lookupNameRoot": "InkPrimitivesHash"
|
||||
},
|
||||
{
|
||||
"info": "Plain",
|
||||
"lookupIndex": 10,
|
||||
"type": "u64",
|
||||
"docs": [],
|
||||
"namespace": ""
|
||||
},
|
||||
{
|
||||
"info": "Plain",
|
||||
"lookupIndex": 11,
|
||||
"type": "u32",
|
||||
"docs": [],
|
||||
"namespace": ""
|
||||
},
|
||||
{
|
||||
"info": "Plain",
|
||||
"lookupIndex": 12,
|
||||
"type": "NoChainExtension",
|
||||
"docs": [],
|
||||
"namespace": "ink_env::types::NoChainExtension",
|
||||
"lookupNameRoot": "InkEnvNoChainExtension"
|
||||
}
|
||||
]
|
||||
@@ -7,10 +7,14 @@ import user from './user/index.js';
|
||||
|
||||
const all: Record<string, Record<string, unknown>> = {};
|
||||
|
||||
Object.entries({ ink, solang, user }).forEach(([type, abis]) =>
|
||||
Object.entries(abis).forEach(([name, abi]): void => {
|
||||
all[`${type}_${name}`] = abi;
|
||||
})
|
||||
);
|
||||
Object
|
||||
.entries({ ink, solang, user })
|
||||
.forEach(([type, abis]) =>
|
||||
Object
|
||||
.entries(abis)
|
||||
.forEach(([name, abi]): void => {
|
||||
all[`${type}_${name}`] = abi;
|
||||
})
|
||||
);
|
||||
|
||||
export default all;
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -1,12 +1,21 @@
|
||||
{
|
||||
"source": {
|
||||
"hash": "0xf051c631190ac47f82e280ba763df932210f6e2447978e24cbe0dcc6d6903c7a",
|
||||
"language": "ink! 4.0.0-alpha.1",
|
||||
"compiler": "rustc 1.63.0"
|
||||
"hash": "0xa5b19cb655755feba8e34ab5b413ac6593ecc7e24e19af485a4d30036be9d577",
|
||||
"language": "ink! 4.2.0",
|
||||
"compiler": "rustc 1.69.0",
|
||||
"build_info": {
|
||||
"build_mode": "Debug",
|
||||
"cargo_contract_version": "2.2.1",
|
||||
"rust_toolchain": "stable-x86_64-apple-darwin",
|
||||
"wasm_opt_settings": {
|
||||
"keep_debug_symbols": false,
|
||||
"optimization_passes": "Z"
|
||||
}
|
||||
}
|
||||
},
|
||||
"contract": {
|
||||
"name": "flipper",
|
||||
"version": "4.0.0-alpha.1",
|
||||
"version": "4.2.0",
|
||||
"authors": [
|
||||
"Parity Technologies <admin@parity.io>"
|
||||
]
|
||||
@@ -25,39 +34,109 @@
|
||||
}
|
||||
}
|
||||
],
|
||||
"default": false,
|
||||
"docs": [
|
||||
"Creates a new flipper smart contract initialized with the given value."
|
||||
],
|
||||
"label": "new",
|
||||
"payable": false,
|
||||
"returnType": {
|
||||
"displayName": [
|
||||
"ink_primitives",
|
||||
"ConstructorResult"
|
||||
],
|
||||
"type": 1
|
||||
},
|
||||
"selector": "0x9bae9d5e"
|
||||
},
|
||||
{
|
||||
"args": [],
|
||||
"default": false,
|
||||
"docs": [
|
||||
"Creates a new flipper smart contract initialized to `false`."
|
||||
],
|
||||
"label": "default",
|
||||
"label": "new_default",
|
||||
"payable": false,
|
||||
"selector": "0xed4b9d1b"
|
||||
"returnType": {
|
||||
"displayName": [
|
||||
"ink_primitives",
|
||||
"ConstructorResult"
|
||||
],
|
||||
"type": 1
|
||||
},
|
||||
"selector": "0x61ef7e3e"
|
||||
}
|
||||
],
|
||||
"docs": [],
|
||||
"environment": {
|
||||
"accountId": {
|
||||
"displayName": [
|
||||
"AccountId"
|
||||
],
|
||||
"type": 5
|
||||
},
|
||||
"balance": {
|
||||
"displayName": [
|
||||
"Balance"
|
||||
],
|
||||
"type": 8
|
||||
},
|
||||
"blockNumber": {
|
||||
"displayName": [
|
||||
"BlockNumber"
|
||||
],
|
||||
"type": 11
|
||||
},
|
||||
"chainExtension": {
|
||||
"displayName": [
|
||||
"ChainExtension"
|
||||
],
|
||||
"type": 12
|
||||
},
|
||||
"hash": {
|
||||
"displayName": [
|
||||
"Hash"
|
||||
],
|
||||
"type": 9
|
||||
},
|
||||
"maxEventTopics": 4,
|
||||
"timestamp": {
|
||||
"displayName": [
|
||||
"Timestamp"
|
||||
],
|
||||
"type": 10
|
||||
}
|
||||
},
|
||||
"events": [],
|
||||
"lang_error": {
|
||||
"displayName": [
|
||||
"ink",
|
||||
"LangError"
|
||||
],
|
||||
"type": 3
|
||||
},
|
||||
"messages": [
|
||||
{
|
||||
"args": [],
|
||||
"default": false,
|
||||
"docs": [
|
||||
" Flips the current value of the Flipper's boolean."
|
||||
],
|
||||
"label": "flip",
|
||||
"mutates": true,
|
||||
"payable": false,
|
||||
"returnType": null,
|
||||
"returnType": {
|
||||
"displayName": [
|
||||
"ink",
|
||||
"MessageResult"
|
||||
],
|
||||
"type": 1
|
||||
},
|
||||
"selector": "0x633aa551"
|
||||
},
|
||||
{
|
||||
"args": [],
|
||||
"default": false,
|
||||
"docs": [
|
||||
" Returns the current value of the Flipper's boolean."
|
||||
],
|
||||
@@ -66,27 +145,34 @@
|
||||
"payable": false,
|
||||
"returnType": {
|
||||
"displayName": [
|
||||
"bool"
|
||||
"ink",
|
||||
"MessageResult"
|
||||
],
|
||||
"type": 0
|
||||
"type": 4
|
||||
},
|
||||
"selector": "0x2f865bd9"
|
||||
}
|
||||
]
|
||||
},
|
||||
"storage": {
|
||||
"struct": {
|
||||
"fields": [
|
||||
{
|
||||
"layout": {
|
||||
"cell": {
|
||||
"key": "0x0000000000000000000000000000000000000000000000000000000000000000",
|
||||
"ty": 0
|
||||
"root": {
|
||||
"layout": {
|
||||
"struct": {
|
||||
"fields": [
|
||||
{
|
||||
"layout": {
|
||||
"leaf": {
|
||||
"key": "0x00000000",
|
||||
"ty": 0
|
||||
}
|
||||
},
|
||||
"name": "value"
|
||||
}
|
||||
},
|
||||
"name": "value"
|
||||
],
|
||||
"name": "Flipper"
|
||||
}
|
||||
]
|
||||
},
|
||||
"root_key": "0x00000000"
|
||||
}
|
||||
},
|
||||
"types": [
|
||||
@@ -97,6 +183,213 @@
|
||||
"primitive": "bool"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": 1,
|
||||
"type": {
|
||||
"def": {
|
||||
"variant": {
|
||||
"variants": [
|
||||
{
|
||||
"fields": [
|
||||
{
|
||||
"type": 2
|
||||
}
|
||||
],
|
||||
"index": 0,
|
||||
"name": "Ok"
|
||||
},
|
||||
{
|
||||
"fields": [
|
||||
{
|
||||
"type": 3
|
||||
}
|
||||
],
|
||||
"index": 1,
|
||||
"name": "Err"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"params": [
|
||||
{
|
||||
"name": "T",
|
||||
"type": 2
|
||||
},
|
||||
{
|
||||
"name": "E",
|
||||
"type": 3
|
||||
}
|
||||
],
|
||||
"path": [
|
||||
"Result"
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": 2,
|
||||
"type": {
|
||||
"def": {
|
||||
"tuple": []
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": 3,
|
||||
"type": {
|
||||
"def": {
|
||||
"variant": {
|
||||
"variants": [
|
||||
{
|
||||
"index": 1,
|
||||
"name": "CouldNotReadInput"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"path": [
|
||||
"ink_primitives",
|
||||
"LangError"
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": 4,
|
||||
"type": {
|
||||
"def": {
|
||||
"variant": {
|
||||
"variants": [
|
||||
{
|
||||
"fields": [
|
||||
{
|
||||
"type": 0
|
||||
}
|
||||
],
|
||||
"index": 0,
|
||||
"name": "Ok"
|
||||
},
|
||||
{
|
||||
"fields": [
|
||||
{
|
||||
"type": 3
|
||||
}
|
||||
],
|
||||
"index": 1,
|
||||
"name": "Err"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"params": [
|
||||
{
|
||||
"name": "T",
|
||||
"type": 0
|
||||
},
|
||||
{
|
||||
"name": "E",
|
||||
"type": 3
|
||||
}
|
||||
],
|
||||
"path": [
|
||||
"Result"
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": 5,
|
||||
"type": {
|
||||
"def": {
|
||||
"composite": {
|
||||
"fields": [
|
||||
{
|
||||
"type": 6,
|
||||
"typeName": "[u8; 32]"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"path": [
|
||||
"ink_primitives",
|
||||
"types",
|
||||
"AccountId"
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": 6,
|
||||
"type": {
|
||||
"def": {
|
||||
"array": {
|
||||
"len": 32,
|
||||
"type": 7
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": 7,
|
||||
"type": {
|
||||
"def": {
|
||||
"primitive": "u8"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": 8,
|
||||
"type": {
|
||||
"def": {
|
||||
"primitive": "u128"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": 9,
|
||||
"type": {
|
||||
"def": {
|
||||
"composite": {
|
||||
"fields": [
|
||||
{
|
||||
"type": 6,
|
||||
"typeName": "[u8; 32]"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"path": [
|
||||
"ink_primitives",
|
||||
"types",
|
||||
"Hash"
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": 10,
|
||||
"type": {
|
||||
"def": {
|
||||
"primitive": "u64"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": 11,
|
||||
"type": {
|
||||
"def": {
|
||||
"primitive": "u32"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": 12,
|
||||
"type": {
|
||||
"def": {
|
||||
"variant": {}
|
||||
},
|
||||
"path": [
|
||||
"ink_env",
|
||||
"types",
|
||||
"NoChainExtension"
|
||||
]
|
||||
}
|
||||
}
|
||||
],
|
||||
"version": "4"
|
||||
|
||||
Binary file not shown.
@@ -37,6 +37,7 @@ export interface AbiMessage {
|
||||
identifier: string;
|
||||
index: number;
|
||||
isConstructor?: boolean;
|
||||
isDefault?: boolean;
|
||||
isMutating?: boolean;
|
||||
isPayable?: boolean;
|
||||
method: string;
|
||||
|
||||
@@ -14,6 +14,7 @@
|
||||
],
|
||||
"references": [
|
||||
{ "path": "../api/tsconfig.build.json" },
|
||||
{ "path": "../api-augment/tsconfig.build.json" },
|
||||
{ "path": "../types/tsconfig.build.json" },
|
||||
{ "path": "../types-codec/tsconfig.build.json" },
|
||||
{ "path": "../types-create/tsconfig.build.json" }
|
||||
|
||||
@@ -18,25 +18,25 @@
|
||||
"./detectPackage.cjs"
|
||||
],
|
||||
"type": "module",
|
||||
"version": "10.7.3",
|
||||
"version": "10.9.1",
|
||||
"main": "index.js",
|
||||
"dependencies": {
|
||||
"@polkadot/api": "10.7.3",
|
||||
"@polkadot/api-augment": "10.7.3",
|
||||
"@polkadot/api-base": "10.7.3",
|
||||
"@polkadot/rpc-core": "10.7.3",
|
||||
"@polkadot/types": "10.7.3",
|
||||
"@polkadot/types-codec": "10.7.3",
|
||||
"@polkadot/util": "^12.2.1",
|
||||
"@polkadot/util-crypto": "^12.2.1",
|
||||
"@polkadot/api": "10.9.1",
|
||||
"@polkadot/api-augment": "10.9.1",
|
||||
"@polkadot/api-base": "10.9.1",
|
||||
"@polkadot/rpc-core": "10.9.1",
|
||||
"@polkadot/types": "10.9.1",
|
||||
"@polkadot/types-codec": "10.9.1",
|
||||
"@polkadot/util": "^12.3.1",
|
||||
"@polkadot/util-crypto": "^12.3.1",
|
||||
"rxjs": "^7.8.1",
|
||||
"tslib": "^2.5.2"
|
||||
"tslib": "^2.5.3"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@polkadot/api": "10.7.3",
|
||||
"@polkadot/api-augment": "10.7.3",
|
||||
"@polkadot/rpc-augment": "10.7.3",
|
||||
"@polkadot/rpc-provider": "10.7.3",
|
||||
"@polkadot/types-support": "10.7.3"
|
||||
"@polkadot/api": "10.9.1",
|
||||
"@polkadot/api-augment": "10.9.1",
|
||||
"@polkadot/rpc-augment": "10.9.1",
|
||||
"@polkadot/rpc-provider": "10.9.1",
|
||||
"@polkadot/types-support": "10.9.1"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -39,7 +39,7 @@ export function _flags (instanceId: string, api: DeriveApi): () => Observable<Fl
|
||||
return memo(instanceId, (): Observable<FlagsIntermediate> => {
|
||||
const results: unknown[] = [undefined, [], [], [], undefined];
|
||||
const calls = [
|
||||
(api.query.phragmenElection || api.query.electionsPhragmen || api.query.elections)?.members,
|
||||
(api.query.elections || api.query['phragmenElection'] || api.query['electionsPhragmen'])?.members,
|
||||
api.query.council?.members,
|
||||
api.query.technicalCommittee?.members,
|
||||
api.query.society?.members,
|
||||
|
||||
@@ -15,13 +15,13 @@ import { memo } from '../util/index.js';
|
||||
|
||||
function retrieveNick (api: DeriveApi, accountId?: AccountId): Observable<string | undefined> {
|
||||
return ((
|
||||
accountId && api.query.nicks?.nameOf
|
||||
? api.query.nicks.nameOf(accountId)
|
||||
accountId && api.query['nicks']?.['nameOf']
|
||||
? api.query['nicks']['nameOf'](accountId)
|
||||
: of(undefined)
|
||||
) as Observable<Option<ITuple<[Bytes, Balance]>> | undefined>).pipe(
|
||||
map((nameOf): string | undefined =>
|
||||
nameOf?.isSome
|
||||
? u8aToString(nameOf.unwrap()[0]).substring(0, (api.consts.nicks.maxLength as u32).toNumber())
|
||||
? u8aToString(nameOf.unwrap()[0]).substring(0, (api.consts['nicks']['maxLength'] as u32).toNumber())
|
||||
: undefined
|
||||
)
|
||||
);
|
||||
|
||||
@@ -1,16 +1,14 @@
|
||||
// Copyright 2017-2023 @polkadot/api-derive authors & contributors
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
import type { QueryableStorage } from '@polkadot/api-base/types';
|
||||
import type { DeriveApi } from '../types.js';
|
||||
|
||||
export function getQueryInterface (api: DeriveApi): QueryableStorage<'rxjs'>['voterBagsList'] {
|
||||
export function getQueryInterface (api: DeriveApi): DeriveApi['query']['voterList'] {
|
||||
return (
|
||||
// latest substrate (latest always first)
|
||||
api.query.voterBagsList ||
|
||||
// latest substrate & polkadot
|
||||
api.query.voterList ||
|
||||
// previous substrate
|
||||
api.query.bagsList ||
|
||||
// latest polkadot
|
||||
api.query.voterList
|
||||
api.query['voterBagsList'] ||
|
||||
api.query['bagsList']
|
||||
);
|
||||
}
|
||||
|
||||
@@ -50,9 +50,9 @@ function calcBalances (api: DeriveApi, [accountId, [accountNonce, [primary, ...a
|
||||
// old
|
||||
function queryBalancesFree (api: DeriveApi, accountId: AccountId): Observable<Result> {
|
||||
return combineLatest([
|
||||
api.query.balances.freeBalance<Balance>(accountId),
|
||||
api.query.balances.reservedBalance<Balance>(accountId),
|
||||
api.query.system.accountNonce<Index>(accountId)
|
||||
api.query.balances['freeBalance']<Balance>(accountId),
|
||||
api.query.balances['reservedBalance']<Balance>(accountId),
|
||||
api.query.system['accountNonce']<Index>(accountId)
|
||||
]).pipe(
|
||||
map(([freeBalance, reservedBalance, accountNonce]): Result => [
|
||||
accountNonce,
|
||||
@@ -71,8 +71,8 @@ function queryNonceOnly (api: DeriveApi, accountId: AccountId): Observable<Resul
|
||||
? api.query.system.account(accountId).pipe(
|
||||
map(({ nonce }) => fill(nonce))
|
||||
)
|
||||
: isFunction(api.query.system.accountNonce)
|
||||
? api.query.system.accountNonce<Index>(accountId).pipe(
|
||||
: isFunction(api.query.system['accountNonce'])
|
||||
? api.query.system['accountNonce']<Index>(accountId).pipe(
|
||||
map((nonce) => fill(nonce))
|
||||
)
|
||||
: of(fill(api.registry.createType('Index')));
|
||||
@@ -80,7 +80,7 @@ function queryNonceOnly (api: DeriveApi, accountId: AccountId): Observable<Resul
|
||||
|
||||
function queryBalancesAccount (api: DeriveApi, accountId: AccountId, modules: string[] = ['balances']): Observable<Result> {
|
||||
const balances = modules
|
||||
.map((m): QueryableStorageEntry<'rxjs'> => (api.derive as DeriveCustomAccount)[m]?.customAccount || api.query[m]?.account)
|
||||
.map((m): QueryableStorageEntry<'rxjs'> => (api.derive as DeriveCustomAccount)[m]?.customAccount || api.query[m as 'balances']?.account)
|
||||
.filter((q) => isFunction(q));
|
||||
|
||||
const extract = (nonce: Index, data: AccountData[]): Result => [
|
||||
@@ -98,7 +98,7 @@ function queryBalancesAccount (api: DeriveApi, accountId: AccountId, modules: st
|
||||
map(([{ nonce }, ...balances]) => extract(nonce, balances as unknown as AccountData[]))
|
||||
)
|
||||
: combineLatest([
|
||||
api.query.system.accountNonce<Index>(accountId),
|
||||
api.query.system['accountNonce']<Index>(accountId),
|
||||
...balances.map((c) => c(accountId))
|
||||
]).pipe(
|
||||
map(([nonce, ...balances]) => extract(nonce, balances as unknown as AccountData[]))
|
||||
@@ -164,7 +164,7 @@ export function account (instanceId: string, api: DeriveApi): (address: AccountI
|
||||
? querySystemAccount(api, accountId)
|
||||
: isFunction(api.query.balances?.account)
|
||||
? queryBalancesAccount(api, accountId)
|
||||
: isFunction(api.query.balances?.freeBalance)
|
||||
: isFunction(api.query.balances?.['freeBalance'])
|
||||
? queryBalancesFree(api, accountId)
|
||||
: queryNonceOnly(api, accountId)
|
||||
])
|
||||
|
||||
@@ -116,7 +116,7 @@ function calcBalances (api: DeriveApi, result: Result): DeriveBalancesAll {
|
||||
function queryOld (api: DeriveApi, accountId: AccountId | string): Observable<ResultBalance> {
|
||||
return combineLatest([
|
||||
api.query.balances.locks(accountId),
|
||||
api.query.balances.vesting<Option<VestingSchedule>>(accountId)
|
||||
api.query.balances['vesting']<Option<VestingSchedule>>(accountId)
|
||||
]).pipe(
|
||||
map(([locks, optVesting]): ResultBalance => {
|
||||
let vestingNew = null;
|
||||
|
||||
@@ -42,11 +42,11 @@ function getAuthorDetailsWithAt (header: Header, queryAt: QueryableStorage<'rxjs
|
||||
|
||||
if (loggedAuthor) {
|
||||
// use the author mapping pallet, if available (ie: moonbeam, moonriver), to map session (nimbus) key to author (collator/validator) key
|
||||
if (queryAt.authorMapping?.mappingWithDeposit) {
|
||||
if (queryAt['authorMapping']?.['mappingWithDeposit']) {
|
||||
return combineLatest([
|
||||
of(header),
|
||||
validators,
|
||||
queryAt.authorMapping.mappingWithDeposit<OptionMapping>(loggedAuthor).pipe(
|
||||
queryAt['authorMapping']['mappingWithDeposit']<OptionMapping>(loggedAuthor).pipe(
|
||||
map((o) =>
|
||||
o.unwrapOr({ account: null }).account
|
||||
)
|
||||
@@ -55,13 +55,13 @@ function getAuthorDetailsWithAt (header: Header, queryAt: QueryableStorage<'rxjs
|
||||
}
|
||||
|
||||
// fall back to session and parachain staking pallets, if available (ie: manta, calamari), to map session (nimbus) key to author (collator) key
|
||||
if (queryAt.parachainStaking?.selectedCandidates && queryAt.session?.nextKeys) {
|
||||
if (queryAt['parachainStaking']?.['selectedCandidates'] && queryAt.session?.nextKeys) {
|
||||
const loggedHex = loggedAuthor.toHex();
|
||||
|
||||
return combineLatest([
|
||||
of(header),
|
||||
validators,
|
||||
queryAt.parachainStaking.selectedCandidates<Vec<AccountId>>().pipe(
|
||||
queryAt['parachainStaking']['selectedCandidates']<Vec<AccountId>>().pipe(
|
||||
mergeMap((selectedCandidates) =>
|
||||
combineLatest([
|
||||
of(selectedCandidates),
|
||||
|
||||
@@ -15,18 +15,18 @@ type ResultV2 = [BN, BN, BN, BN, BN, BN, BN, BN, BN, BN];
|
||||
function queryConstants (api: DeriveApi): Observable<ResultV2> {
|
||||
return of([
|
||||
// deprecated
|
||||
api.consts.contracts.callBaseFee || api.registry.createType('Balance'),
|
||||
api.consts.contracts.contractFee || api.registry.createType('Balance'),
|
||||
api.consts.contracts.creationFee || api.registry.createType('Balance'),
|
||||
api.consts.contracts.transactionBaseFee || api.registry.createType('Balance'),
|
||||
api.consts.contracts.transactionByteFee || api.registry.createType('Balance'),
|
||||
api.consts.contracts.transferFee || api.registry.createType('Balance'),
|
||||
api.consts.contracts['callBaseFee'] || api.registry.createType('Balance'),
|
||||
api.consts.contracts['contractFee'] || api.registry.createType('Balance'),
|
||||
api.consts.contracts['creationFee'] || api.registry.createType('Balance'),
|
||||
api.consts.contracts['transactionBaseFee'] || api.registry.createType('Balance'),
|
||||
api.consts.contracts['transactionByteFee'] || api.registry.createType('Balance'),
|
||||
api.consts.contracts['transferFee'] || api.registry.createType('Balance'),
|
||||
|
||||
// current
|
||||
api.consts.contracts.rentByteFee,
|
||||
api.consts.contracts.rentDepositOffset,
|
||||
api.consts.contracts.surchargeReward,
|
||||
api.consts.contracts.tombstoneDeposit
|
||||
api.consts.contracts['rentByteFee'] || api.registry.createType('Balance'),
|
||||
api.consts.contracts['rentDepositOffset'] || api.registry.createType('Balance'),
|
||||
api.consts.contracts['surchargeReward'] || api.registry.createType('Balance'),
|
||||
api.consts.contracts['tombstoneDeposit'] || api.registry.createType('Balance')
|
||||
]) as unknown as Observable<ResultV2>;
|
||||
}
|
||||
|
||||
|
||||
@@ -21,22 +21,22 @@ function isVoter (value: VoteEntry): value is PalletElectionsPhragmenVoter {
|
||||
}
|
||||
|
||||
function retrieveStakeOf (elections: QueryableModuleStorage<'rxjs'>): Observable<[AccountId, Balance][]> {
|
||||
return elections.stakeOf.entries<Balance, [AccountId]>().pipe(
|
||||
return elections['stakeOf'].entries<Balance, [AccountId]>().pipe(
|
||||
map((entries) =>
|
||||
entries.map(([{ args: [accountId] }, stake]) => [accountId, stake])
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
function retrieveVoteOf (elections: QueryableModuleStorage<'rxjs'>): Observable<[AccountId, AccountId[]][]> {
|
||||
return elections.votesOf.entries<Vec<AccountId>, [AccountId]>().pipe(
|
||||
function retrieveVoteOf (elections: DeriveApi['query']['elections']): Observable<[AccountId, AccountId[]][]> {
|
||||
return elections['votesOf'].entries<Vec<AccountId>, [AccountId]>().pipe(
|
||||
map((entries) =>
|
||||
entries.map(([{ args: [accountId] }, votes]) => [accountId, votes])
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
function retrievePrev (api: DeriveApi, elections: QueryableModuleStorage<'rxjs'>): Observable<DeriveCouncilVotes> {
|
||||
function retrievePrev (api: DeriveApi, elections: DeriveApi['query']['elections']): Observable<DeriveCouncilVotes> {
|
||||
return combineLatest([
|
||||
retrieveStakeOf(elections),
|
||||
retrieveVoteOf(elections)
|
||||
@@ -63,7 +63,7 @@ function retrievePrev (api: DeriveApi, elections: QueryableModuleStorage<'rxjs'>
|
||||
);
|
||||
}
|
||||
|
||||
function retrieveCurrent (elections: QueryableModuleStorage<'rxjs'>): Observable<DeriveCouncilVotes> {
|
||||
function retrieveCurrent (elections: DeriveApi['query']['elections']): Observable<DeriveCouncilVotes> {
|
||||
return elections.voting.entries<VoteEntry, [AccountId]>().pipe(
|
||||
map((entries): DeriveCouncilVotes =>
|
||||
entries.map(([{ args: [accountId] }, value]): [AccountId, DeriveCouncilVote] => [
|
||||
@@ -77,11 +77,11 @@ function retrieveCurrent (elections: QueryableModuleStorage<'rxjs'>): Observable
|
||||
}
|
||||
|
||||
export function votes (instanceId: string, api: DeriveApi): () => Observable<DeriveCouncilVotes> {
|
||||
const elections = api.query.phragmenElection || api.query.electionsPhragmen || api.query.elections;
|
||||
const elections = api.query.elections || api.query['phragmenElection'] || api.query['electionsPhragmen'];
|
||||
|
||||
return memo(instanceId, (): Observable<DeriveCouncilVotes> =>
|
||||
elections
|
||||
? elections.stakeOf
|
||||
? elections['stakeOf']
|
||||
? retrievePrev(api, elections)
|
||||
: retrieveCurrent(elections)
|
||||
: of([])
|
||||
|
||||
@@ -35,7 +35,7 @@ function createChildKey (info: AllInfo): string {
|
||||
|
||||
export function childKey (instanceId: string, api: DeriveApi): (paraId: string | number | BN) => Observable<string | null> {
|
||||
return memo(instanceId, (paraId: string | number | BN): Observable<string | null> =>
|
||||
api.query.crowdloan.funds<Option<PolkadotRuntimeCommonCrowdloanFundInfo>>(paraId).pipe(
|
||||
api.query['crowdloan']['funds']<Option<PolkadotRuntimeCommonCrowdloanFundInfo>>(paraId).pipe(
|
||||
map((optInfo) =>
|
||||
optInfo.isSome
|
||||
? createChildKey(optInfo.unwrap())
|
||||
|
||||
@@ -53,7 +53,7 @@ function isBounded (call: FrameSupportPreimagesBounded | FrameSupportScheduleMay
|
||||
}
|
||||
|
||||
function queryQueue (api: DeriveApi): Observable<DeriveDispatch[]> {
|
||||
return api.query.democracy.dispatchQueue<Vec<ITuple<[BlockNumber, Hash, ReferendumIndex]>>>().pipe(
|
||||
return api.query.democracy['dispatchQueue']<Vec<ITuple<[BlockNumber, Hash, ReferendumIndex]>>>().pipe(
|
||||
switchMap((dispatches) =>
|
||||
combineLatest([
|
||||
of(dispatches),
|
||||
@@ -142,7 +142,7 @@ export function dispatchQueue (instanceId: string, api: DeriveApi): () => Observ
|
||||
return memo(instanceId, (): Observable<DeriveDispatch[]> =>
|
||||
isFunction(api.query.scheduler?.agenda)
|
||||
? queryScheduler(api)
|
||||
: api.query.democracy.dispatchQueue
|
||||
: api.query.democracy['dispatchQueue']
|
||||
? queryQueue(api)
|
||||
: of([])
|
||||
);
|
||||
|
||||
@@ -20,7 +20,7 @@ type PreimageInfo = [Bytes, AccountId, Balance, BlockNumber];
|
||||
type OldPreimage = ITuple<PreimageInfo>;
|
||||
|
||||
function isDemocracyPreimage (api: DeriveApi, imageOpt: Option<OldPreimage> | Option<PreimageStatus>): imageOpt is Option<PreimageStatus> {
|
||||
return !!imageOpt && !api.query.democracy.dispatchQueue;
|
||||
return !!imageOpt && !api.query.democracy['dispatchQueue'];
|
||||
}
|
||||
|
||||
function constructProposal (api: DeriveApi, [bytes, proposer, balance, at]: PreimageInfo): DeriveProposalImage {
|
||||
@@ -79,7 +79,7 @@ function parseImage (api: DeriveApi, [proposalHash, status, bytes]: [HexString,
|
||||
function getDemocracyImages (api: DeriveApi, bounded: (Hash | Uint8Array | string | FrameSupportPreimagesBounded)[]): Observable<(DeriveProposalImage | undefined)[]> {
|
||||
const hashes = bounded.map((b) => getImageHashBounded(b));
|
||||
|
||||
return api.query.democracy.preimages.multi<Option<PreimageStatus>>(hashes).pipe(
|
||||
return api.query.democracy['preimages'].multi<Option<PreimageStatus>>(hashes).pipe(
|
||||
map((images): (DeriveProposalImage | undefined)[] =>
|
||||
images.map((imageOpt) => parseDemocracy(api, imageOpt))
|
||||
)
|
||||
@@ -127,7 +127,7 @@ function getImages (api: DeriveApi, bounded: (FrameSupportPreimagesBounded | Uin
|
||||
export function preimages (instanceId: string, api: DeriveApi): (hashes: (Hash | Uint8Array | string | FrameSupportPreimagesBounded)[]) => Observable<(DeriveProposalImage | undefined)[]> {
|
||||
return memo(instanceId, (hashes: (Hash | Uint8Array | string | FrameSupportPreimagesBounded)[]): Observable<(DeriveProposalImage | undefined)[]> =>
|
||||
hashes.length
|
||||
? isFunction(api.query.democracy.preimages)
|
||||
? isFunction(api.query.democracy['preimages'])
|
||||
? getDemocracyImages(api, hashes)
|
||||
: isFunction(api.query.preimage.preimageFor)
|
||||
? getImages(api, hashes)
|
||||
|
||||
@@ -23,7 +23,6 @@ type Result = [Proposals, (DeriveProposalImage | undefined)[], Depositors[]];
|
||||
|
||||
function isNewDepositors (depositors: ITuple<[Vec<AccountId>, Balance]> | ITuple<[Balance, Vec<AccountId>]>): depositors is ITuple<[Vec<AccountId>, Balance]> {
|
||||
// Detect balance...
|
||||
// eslint-disable-next-line @typescript-eslint/unbound-method
|
||||
return isFunction((depositors[1] as Balance).mul);
|
||||
}
|
||||
|
||||
|
||||
@@ -20,12 +20,12 @@ type VotingDirect = PalletDemocracyVoteVoting['asDirect'];
|
||||
type VotingDirectVote = VotingDirect['votes'][0];
|
||||
|
||||
function votesPrev (api: DeriveApi, referendumId: BN): Observable<DeriveReferendumVote[]> {
|
||||
return api.query.democracy.votersFor<Vec<AccountId>>(referendumId).pipe(
|
||||
return api.query.democracy['votersFor']<Vec<AccountId>>(referendumId).pipe(
|
||||
switchMap((votersFor): Observable<[Vec<AccountId>, Vote[], DeriveBalancesAccount[]]> =>
|
||||
combineLatest([
|
||||
of(votersFor),
|
||||
votersFor.length
|
||||
? api.query.democracy.voteOf.multi<Vote>(
|
||||
? api.query.democracy['voteOf'].multi<Vote>(
|
||||
votersFor.map((accountId): [BN | number, AccountId] =>
|
||||
[referendumId, accountId]
|
||||
)
|
||||
|
||||
@@ -47,20 +47,22 @@ function sortAccounts ([, balanceA]: [AccountId32, Balance], [, balanceB]: [Acco
|
||||
function getConstants (api: DeriveApi, elections: string | null): Partial<DeriveElectionsInfo> {
|
||||
return elections
|
||||
? {
|
||||
candidacyBond: api.consts[elections].candidacyBond as Balance,
|
||||
desiredRunnersUp: api.consts[elections].desiredRunnersUp as u32,
|
||||
desiredSeats: api.consts[elections].desiredMembers as u32,
|
||||
termDuration: api.consts[elections].termDuration as BlockNumber,
|
||||
votingBond: api.consts[elections].votingBond as Balance
|
||||
candidacyBond: api.consts[elections as 'elections'].candidacyBond as Balance,
|
||||
desiredRunnersUp: api.consts[elections as 'elections'].desiredRunnersUp as u32,
|
||||
desiredSeats: api.consts[elections as 'elections'].desiredMembers as u32,
|
||||
termDuration: api.consts[elections as 'elections'].termDuration as BlockNumber,
|
||||
votingBond: api.consts[elections as 'elections']['votingBond'] as Balance,
|
||||
votingBondBase: api.consts[elections as 'elections'].votingBondBase as Balance,
|
||||
votingBondFactor: api.consts[elections as 'elections'].votingBondFactor as Balance
|
||||
}
|
||||
: {};
|
||||
}
|
||||
|
||||
function getModules (api: DeriveApi): [string, string | null] {
|
||||
const [council] = api.registry.getModuleInstances(api.runtimeVersion.specName, 'council') || ['council'];
|
||||
const elections = api.query.phragmenElection
|
||||
const elections = api.query['phragmenElection']
|
||||
? 'phragmenElection'
|
||||
: api.query.electionsPhragmen
|
||||
: api.query['electionsPhragmen']
|
||||
? 'electionsPhragmen'
|
||||
: api.query.elections
|
||||
? 'elections'
|
||||
@@ -72,9 +74,9 @@ function getModules (api: DeriveApi): [string, string | null] {
|
||||
function queryAll (api: DeriveApi, council: string, elections: string): Observable<[AccountId32[], Candidate[], Member[], Member[]]> {
|
||||
return api.queryMulti<[Vec<AccountId32>, Vec<Candidate>, Vec<Member>, Vec<Member>]>([
|
||||
api.query[council as 'council'].members,
|
||||
api.query[elections as 'phragmenElection'].candidates,
|
||||
api.query[elections as 'phragmenElection'].members,
|
||||
api.query[elections as 'phragmenElection'].runnersUp
|
||||
api.query[elections as 'elections'].candidates,
|
||||
api.query[elections as 'elections'].members,
|
||||
api.query[elections as 'elections'].runnersUp
|
||||
]);
|
||||
}
|
||||
|
||||
|
||||
@@ -17,4 +17,6 @@ export interface DeriveElectionsInfo {
|
||||
voteCount?: VoteIndex;
|
||||
voterCount?: SetIndex;
|
||||
votingBond?: Balance;
|
||||
votingBondBase?: Balance;
|
||||
votingBondFactor?: Balance;
|
||||
}
|
||||
|
||||
@@ -3,4 +3,4 @@
|
||||
|
||||
// Do not edit, auto-generated by @polkadot/dev
|
||||
|
||||
export const packageInfo = { name: '@polkadot/api-derive', path: 'auto', type: 'auto', version: '10.7.3' };
|
||||
export const packageInfo = { name: '@polkadot/api-derive', path: 'auto', type: 'auto', version: '10.9.1' };
|
||||
|
||||
@@ -75,16 +75,16 @@ function parse (id: ParaId, [active, retryQueue, selectedThreads, didUpdate, inf
|
||||
|
||||
export function info (instanceId: string, api: DeriveApi): (id: ParaId | number) => Observable<DeriveParachainFull | null> {
|
||||
return memo(instanceId, (id: ParaId | number): Observable<DeriveParachainFull | null> =>
|
||||
api.query.registrar && api.query.parachains
|
||||
api.query['registrar'] && api.query['parachains']
|
||||
? api.queryMulti<Result>([
|
||||
api.query.registrar.active,
|
||||
api.query.registrar.retryQueue,
|
||||
api.query.registrar.selectedThreads,
|
||||
api.query.parachains.didUpdate,
|
||||
[api.query.registrar.paras, id],
|
||||
[api.query.registrar.pendingSwap, id],
|
||||
[api.query.parachains.heads, id],
|
||||
[api.query.parachains.relayDispatchQueue, id]
|
||||
api.query['registrar']['active'],
|
||||
api.query['registrar']['retryQueue'],
|
||||
api.query['registrar']['selectedThreads'],
|
||||
api.query['parachains']['didUpdate'],
|
||||
[api.query['registrar']['paras'], id],
|
||||
[api.query['registrar']['pendingSwap'], id],
|
||||
[api.query['parachains']['heads'], id],
|
||||
[api.query['parachains']['relayDispatchQueue'], id]
|
||||
])
|
||||
.pipe(
|
||||
map((result: Result): DeriveParachainFull | null =>
|
||||
|
||||
@@ -16,12 +16,12 @@ import { didUpdateToBool } from './util.js';
|
||||
type Result = [
|
||||
ParaId[],
|
||||
DidUpdate,
|
||||
RelayDispatchQueueSize[],
|
||||
ParaInfoResult[],
|
||||
PendingSwap[],
|
||||
RelayDispatchQueueSize[]
|
||||
PendingSwap[]
|
||||
];
|
||||
|
||||
function parse ([ids, didUpdate, infos, pendingSwaps, relayDispatchQueueSizes]: Result): DeriveParachain[] {
|
||||
function parse ([ids, didUpdate, relayDispatchQueueSizes, infos, pendingSwaps]: Result): DeriveParachain[] {
|
||||
return ids.map((id, index): DeriveParachain => ({
|
||||
didUpdate: didUpdateToBool(didUpdate, id),
|
||||
id,
|
||||
@@ -33,15 +33,15 @@ function parse ([ids, didUpdate, infos, pendingSwaps, relayDispatchQueueSizes]:
|
||||
|
||||
export function overview (instanceId: string, api: DeriveApi): () => Observable<DeriveParachain[]> {
|
||||
return memo(instanceId, (): Observable<DeriveParachain[]> =>
|
||||
api.query.registrar?.parachains && api.query.parachains
|
||||
? api.query.registrar.parachains<ParaId[]>().pipe(
|
||||
api.query['registrar']?.['parachains'] && api.query['parachains']
|
||||
? api.query['registrar']['parachains']<ParaId[]>().pipe(
|
||||
switchMap((paraIds) =>
|
||||
combineLatest([
|
||||
of(paraIds),
|
||||
api.query.parachains.didUpdate<DidUpdate>(),
|
||||
api.query.registrar.paras.multi<ParaInfoResult>(paraIds),
|
||||
api.query.registrar.pendingSwap.multi<PendingSwap>(paraIds),
|
||||
api.query.parachains.relayDispatchQueueSize.multi<RelayDispatchQueueSize>(paraIds)
|
||||
api.query['parachains']['didUpdate']<DidUpdate>(),
|
||||
api.query['parachains']['relayDispatchQueueSize'].multi<RelayDispatchQueueSize>(paraIds),
|
||||
api.query['registrar']['paras'].multi<ParaInfoResult>(paraIds),
|
||||
api.query['registrar']['pendingSwap'].multi<PendingSwap>(paraIds)
|
||||
])
|
||||
),
|
||||
map(parse)
|
||||
|
||||
@@ -19,7 +19,7 @@ export function erasHistoric (instanceId: string, api: DeriveApi): (withActive?:
|
||||
api.query.staking.activeEra(),
|
||||
api.consts.staking.historyDepth
|
||||
? of(api.consts.staking.historyDepth)
|
||||
: api.query.staking.historyDepth<u32>()
|
||||
: api.query.staking['historyDepth']<u32>()
|
||||
]).pipe(
|
||||
map(([activeEraOpt, historyDepth]): EraIndex[] => {
|
||||
const result: EraIndex[] = [];
|
||||
|
||||
@@ -38,8 +38,8 @@ export function keysMulti (instanceId: string, api: DeriveApi): (stashIds: (Uint
|
||||
switchMap((queuedKeys) =>
|
||||
combineLatest([
|
||||
of(queuedKeys),
|
||||
api.consts.session?.dedupKeyPrefix
|
||||
? api.query.session.nextKeys.multi(stashIds.map((s) => [api.consts.session.dedupKeyPrefix, s]))
|
||||
api.consts['session']?.['dedupKeyPrefix']
|
||||
? api.query.session.nextKeys.multi(stashIds.map((s) => [api.consts['session']['dedupKeyPrefix'], s]))
|
||||
: combineLatest(stashIds.map((s) => api.query.session.nextKeys(s)))
|
||||
])
|
||||
),
|
||||
|
||||
@@ -18,7 +18,7 @@ export function nextElected (instanceId: string, api: DeriveApi): () => Observab
|
||||
switchMap(({ currentEra }) => api.query.staking.erasStakers.keys(currentEra)),
|
||||
map((keys) => keys.map(({ args: [, accountId] }) => accountId))
|
||||
)
|
||||
: api.query.staking.currentElected<AccountId[]>()
|
||||
: api.query.staking['currentElected']<AccountId[]>()
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
|
||||
import type { ApiPromise } from '@polkadot/api';
|
||||
import type { Bounty, BountyIndex } from '@polkadot/types/interfaces';
|
||||
import type { Codec, Constructor, InterfaceTypes, Registry } from '@polkadot/types/types';
|
||||
import type { Codec, CodecClass, InterfaceTypes, Registry } from '@polkadot/types/types';
|
||||
|
||||
import { Option, StorageKey } from '@polkadot/types';
|
||||
|
||||
@@ -29,7 +29,7 @@ export class BountyFactory {
|
||||
this.#registry.createType('Bounty');
|
||||
|
||||
public optionOf = <T extends Codec>(value: T): Option<T> => {
|
||||
const typeName = this.#registry.getClassName(value.constructor as Constructor<T>);
|
||||
const typeName = this.#registry.getClassName(value.constructor as CodecClass<T>);
|
||||
|
||||
return new Option<T>(this.#registry, typeName as keyof InterfaceTypes, value);
|
||||
};
|
||||
|
||||
+18
-18
@@ -18,29 +18,29 @@
|
||||
"./detectPackage.cjs"
|
||||
],
|
||||
"type": "module",
|
||||
"version": "10.7.3",
|
||||
"version": "10.9.1",
|
||||
"main": "index.js",
|
||||
"dependencies": {
|
||||
"@polkadot/api-augment": "10.7.3",
|
||||
"@polkadot/api-base": "10.7.3",
|
||||
"@polkadot/api-derive": "10.7.3",
|
||||
"@polkadot/keyring": "^12.2.1",
|
||||
"@polkadot/rpc-augment": "10.7.3",
|
||||
"@polkadot/rpc-core": "10.7.3",
|
||||
"@polkadot/rpc-provider": "10.7.3",
|
||||
"@polkadot/types": "10.7.3",
|
||||
"@polkadot/types-augment": "10.7.3",
|
||||
"@polkadot/types-codec": "10.7.3",
|
||||
"@polkadot/types-create": "10.7.3",
|
||||
"@polkadot/types-known": "10.7.3",
|
||||
"@polkadot/util": "^12.2.1",
|
||||
"@polkadot/util-crypto": "^12.2.1",
|
||||
"@polkadot/api-augment": "10.9.1",
|
||||
"@polkadot/api-base": "10.9.1",
|
||||
"@polkadot/api-derive": "10.9.1",
|
||||
"@polkadot/keyring": "^12.3.1",
|
||||
"@polkadot/rpc-augment": "10.9.1",
|
||||
"@polkadot/rpc-core": "10.9.1",
|
||||
"@polkadot/rpc-provider": "10.9.1",
|
||||
"@polkadot/types": "10.9.1",
|
||||
"@polkadot/types-augment": "10.9.1",
|
||||
"@polkadot/types-codec": "10.9.1",
|
||||
"@polkadot/types-create": "10.9.1",
|
||||
"@polkadot/types-known": "10.9.1",
|
||||
"@polkadot/util": "^12.3.1",
|
||||
"@polkadot/util-crypto": "^12.3.1",
|
||||
"eventemitter3": "^5.0.1",
|
||||
"rxjs": "^7.8.1",
|
||||
"tslib": "^2.5.2"
|
||||
"tslib": "^2.5.3"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@polkadot/api-augment": "10.7.3",
|
||||
"@polkadot/types-support": "10.7.3"
|
||||
"@polkadot/api-augment": "10.9.1",
|
||||
"@polkadot/types-support": "10.9.1"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,4 @@
|
||||
// Copyright 2017-2023 @polkadot/api authors & contributors
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
import '@polkadot/api-augment';
|
||||
@@ -404,7 +404,10 @@ export abstract class Decorate<ApiType extends ApiTypes> extends Events {
|
||||
|
||||
const decorateFn = (section: string, method: string): unknown => {
|
||||
const source = rpc[section as 'chain'][method as 'getHeader'];
|
||||
const fn = decorateMethod(source, { methodName: method }) as Record<string, unknown>;
|
||||
const fn = decorateMethod(source, { methodName: method }) as {
|
||||
meta: unknown;
|
||||
raw: unknown;
|
||||
};
|
||||
|
||||
fn.meta = source.meta;
|
||||
fn.raw = decorateMethod(source.raw, { methodName: method }) as unknown;
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
import '@polkadot/api-augment';
|
||||
|
||||
import type { HeaderExtended } from '@polkadot/api-derive/types';
|
||||
import type { TestKeyringMap } from '@polkadot/keyring/testingPairs';
|
||||
import type { TestKeyringMapSubstrate } from '@polkadot/keyring/testingPairs';
|
||||
import type { StorageKey } from '@polkadot/types';
|
||||
import type { AccountId, Balance, DispatchErrorModule, Event, Header, Index } from '@polkadot/types/interfaces';
|
||||
import type { FrameSystemAccountInfo } from '@polkadot/types/lookup';
|
||||
@@ -35,7 +35,7 @@ async function calls (api: ApiPromise): Promise<void> {
|
||||
function consts (api: ApiPromise): void {
|
||||
// constants has actual value & metadata
|
||||
console.log(
|
||||
api.consts.foo.bar,
|
||||
api.consts['notIn']['augmentation'],
|
||||
api.consts.balances.existentialDeposit.toNumber(),
|
||||
api.consts.balances.existentialDeposit.meta.docs.map((s) => s.toString()).join(''),
|
||||
api.consts.system.blockWeights.maxBlock.refTime.toNumber()
|
||||
@@ -59,10 +59,10 @@ function errors (api: ApiPromise): void {
|
||||
console.log(api.errors.vesting.AmountLow.is(someError));
|
||||
|
||||
// non-existing error, existing module
|
||||
console.log(api.errors.vesting.Something.is(someError));
|
||||
console.log(api.errors.vesting['NonAugmented'].is(someError));
|
||||
|
||||
// something random
|
||||
console.log(api.errors.something.Random.is(someError));
|
||||
console.log(api.errors['thisIsNot']['Augmented'].is(someError));
|
||||
}
|
||||
|
||||
function events (api: ApiPromise): void {
|
||||
@@ -97,20 +97,20 @@ function events (api: ApiPromise): void {
|
||||
}
|
||||
|
||||
// something random, just codec[]
|
||||
if (api.events.something.Random.is(event)) {
|
||||
if (api.events['not']['Augmented'].is(event)) {
|
||||
const [a, b] = event.data;
|
||||
|
||||
console.log(a.toHuman(), b.toHuman());
|
||||
}
|
||||
}
|
||||
|
||||
async function query (api: ApiPromise, pairs: TestKeyringMap): Promise<void> {
|
||||
async function query (api: ApiPromise, pairs: TestKeyringMapSubstrate): Promise<void> {
|
||||
const intentions = await api.query.staking.bonded();
|
||||
|
||||
console.log('intentions:', intentions);
|
||||
|
||||
// api.query.*.* is well-typed
|
||||
const bar = await api.query.foo.bar(); // bar is Codec (unknown module)
|
||||
const bar = await api.query['notIn']['augmentation'](); // bar is Codec (unknown module)
|
||||
const bal = await api.query.balances.totalIssuance(); // bal is Balance
|
||||
const bal2 = await api.query.balances.totalIssuance('WRONG_ARG'); // bal2 is Codec (wrong args)
|
||||
const override = await api.query.balances.totalIssuance<Header>(); // override is still available
|
||||
@@ -119,7 +119,7 @@ async function query (api: ApiPromise, pairs: TestKeyringMap): Promise<void> {
|
||||
const oldBal = await api.query.balances.totalIssuance.at('abcd');
|
||||
|
||||
// For older queries we can cast with `<Balance>` (newer chain have multi typed)
|
||||
const multia = await api.query.balances.freeBalance.multi<Balance>([pairs.alice.address, pairs.bob.address]);
|
||||
const multia = await api.query.balances['freeBalance'].multi<Balance>([pairs.alice.address, pairs.bob.address]);
|
||||
const multib = await api.query.system.account.multi([pairs.alice.address, pairs.bob.address]);
|
||||
|
||||
await api.query.system.account(pairs.alice.address);
|
||||
@@ -157,7 +157,7 @@ async function queryExtra (api: ApiPromise): Promise<void> {
|
||||
await api.query.assets.approvals.keys(123, 'blah');
|
||||
await api.query.assets.account.keys(123);
|
||||
await api.query.assets.account.entries(123);
|
||||
await api.query.assets.blah.keys();
|
||||
await api.query.assets['notAugmented'].keys();
|
||||
|
||||
// is
|
||||
const key = {} as StorageKey;
|
||||
@@ -170,7 +170,7 @@ async function queryExtra (api: ApiPromise): Promise<void> {
|
||||
}
|
||||
}
|
||||
|
||||
async function queryMulti (api: ApiPromise, pairs: TestKeyringMap): Promise<void> {
|
||||
async function queryMulti (api: ApiPromise, pairs: TestKeyringMapSubstrate): Promise<void> {
|
||||
// check multi for unsub
|
||||
const multiUnsub = await api.queryMulti([
|
||||
[api.query.staking.validators],
|
||||
@@ -185,7 +185,7 @@ async function queryMulti (api: ApiPromise, pairs: TestKeyringMap): Promise<void
|
||||
const multiRes = await api.queryMulti([
|
||||
[api.query.system.account, pairs.eve.address],
|
||||
// older chains only
|
||||
[api.query.system.accountNonce, pairs.eve.address]
|
||||
[api.query.system['accountNonce'], pairs.eve.address]
|
||||
]);
|
||||
|
||||
console.log(multiRes);
|
||||
@@ -241,7 +241,7 @@ function types (api: ApiPromise): void {
|
||||
console.log(balance, gas, compact, gasUnsafe, overriddenUnsafe, u32.toNumber(), f32.toNumber(), api.createType('AccountData'), raw.subarray(0, 10));
|
||||
}
|
||||
|
||||
async function tx (api: ApiPromise, pairs: TestKeyringMap): Promise<void> {
|
||||
async function tx (api: ApiPromise, pairs: TestKeyringMapSubstrate): Promise<void> {
|
||||
// transfer, also allows for bigint inputs here
|
||||
const transfer = api.tx.balances.transfer(pairs.bob.address, BigInt(123456789));
|
||||
|
||||
@@ -251,7 +251,7 @@ async function tx (api: ApiPromise, pairs: TestKeyringMap): Promise<void> {
|
||||
console.log('hash:', (await transfer.signAndSend(pairs.alice)).toHex());
|
||||
|
||||
// passing options, but waiting for hash
|
||||
const nonce = await api.query.system.accountNonce<Index>(pairs.alice.address);
|
||||
const nonce = await api.query.system['accountNonce']<Index>(pairs.alice.address);
|
||||
|
||||
(await api.tx.balances
|
||||
.transfer(pairs.bob.address, 12345)
|
||||
@@ -264,7 +264,7 @@ async function tx (api: ApiPromise, pairs: TestKeyringMap): Promise<void> {
|
||||
.signAndSend(pairs.alice, ({ status }: SubmittableResult) => console.log(status.type));
|
||||
|
||||
// with options and the callback
|
||||
const nonce2 = await api.query.system.accountNonce(pairs.alice.address);
|
||||
const nonce2 = await api.query.system['accountNonce'](pairs.alice.address);
|
||||
const unsub2 = await api.tx.balances
|
||||
.transfer(pairs.bob.address, 12345)
|
||||
.signAndSend(pairs.alice, { nonce: nonce2 }, ({ status }: SubmittableResult): void => {
|
||||
@@ -280,7 +280,7 @@ async function tx (api: ApiPromise, pairs: TestKeyringMap): Promise<void> {
|
||||
await second.signAndSend('123', (result) => console.log(result));
|
||||
|
||||
// it handles enum inputs correctly
|
||||
await api.tx.democracy.proxyVote(123, { Split: { nay: 456, yay: 123 } }).signAndSend(pairs.alice);
|
||||
await api.tx.democracy['proxyVote'](123, { Split: { nay: 456, yay: 123 } }).signAndSend(pairs.alice);
|
||||
|
||||
// is
|
||||
if (api.tx.balances.transfer.is(second)) {
|
||||
@@ -295,7 +295,7 @@ async function at (api: ApiPromise): Promise<void> {
|
||||
const apiAt = await api.at('0x1234');
|
||||
|
||||
// get old balances
|
||||
console.log(await apiAt.query.balances.freeBalance('0x1234'));
|
||||
console.log(await apiAt.query.balances['freeBalance']('0x1234'));
|
||||
|
||||
// get some constants
|
||||
console.log(apiAt.consts.balances.existentialDeposit);
|
||||
|
||||
@@ -3,4 +3,4 @@
|
||||
|
||||
// Do not edit, auto-generated by @polkadot/dev
|
||||
|
||||
export const packageInfo = { name: '@polkadot/api', path: 'auto', type: 'auto', version: '10.7.3' };
|
||||
export const packageInfo = { name: '@polkadot/api', path: 'auto', type: 'auto', version: '10.9.1' };
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
|
||||
import type { Observable } from 'rxjs';
|
||||
import type { Address, ApplyExtrinsicResult, Call, Extrinsic, ExtrinsicEra, ExtrinsicStatus, Hash, Header, Index, RuntimeDispatchInfo, SignerPayload } from '@polkadot/types/interfaces';
|
||||
import type { Callback, Codec, Constructor, ISubmittableResult, SignatureOptions } from '@polkadot/types/types';
|
||||
import type { Callback, Codec, CodecClass, ISubmittableResult, SignatureOptions } from '@polkadot/types/types';
|
||||
import type { Registry } from '@polkadot/types-codec/types';
|
||||
import type { ApiBase } from '../base/index.js';
|
||||
import type { ApiInterfaceRx, ApiTypes, PromiseOrObs, SignerResult } from '../types/index.js';
|
||||
@@ -83,7 +83,7 @@ function optionsOrNonce (partialOptions: Partial<SignerOptions> = {}): Partial<S
|
||||
: partialOptions;
|
||||
}
|
||||
|
||||
export function createClass <ApiType extends ApiTypes> ({ api, apiType, blockHash, decorateMethod }: SubmittableOptions<ApiType>): Constructor<SubmittableExtrinsic<ApiType>> {
|
||||
export function createClass <ApiType extends ApiTypes> ({ api, apiType, blockHash, decorateMethod }: SubmittableOptions<ApiType>): CodecClass<SubmittableExtrinsic<ApiType>> {
|
||||
// an instance of the base extrinsic for us to extend
|
||||
const ExtrinsicBase = api.registry.createClass('Extrinsic');
|
||||
|
||||
|
||||
@@ -18,55 +18,55 @@ describe('extractStorageArgs', (): void => {
|
||||
|
||||
it('validates no-arg plain', (): void => {
|
||||
expect(
|
||||
extractStorageArgs(registry, storage.timestamp.now, [])
|
||||
).toEqual([storage.timestamp.now, []]);
|
||||
extractStorageArgs(registry, storage['timestamp']['now'], [])
|
||||
).toEqual([storage['timestamp']['now'], []]);
|
||||
});
|
||||
|
||||
it('validates no-arg plain (with undefined, undefined)', (): void => {
|
||||
expect(
|
||||
extractStorageArgs(registry, storage.timestamp.now, [undefined, undefined])
|
||||
).toEqual([storage.timestamp.now, []]);
|
||||
extractStorageArgs(registry, storage['timestamp']['now'], [undefined, undefined])
|
||||
).toEqual([storage['timestamp']['now'], []]);
|
||||
});
|
||||
|
||||
it('validates no-arg plain (failing when there are args)', (): void => {
|
||||
expect(
|
||||
() => extractStorageArgs(registry, storage.timestamp.now, [123, 456])
|
||||
() => extractStorageArgs(registry, storage['timestamp']['now'], [123, 456])
|
||||
).toThrow('timestamp.now() does not take any arguments, 2 found');
|
||||
});
|
||||
|
||||
it('validates map, 1 arg', (): void => {
|
||||
expect(
|
||||
extractStorageArgs(registry, storage.staking.payee, ['abc'])
|
||||
).toEqual([storage.staking.payee, ['abc']]);
|
||||
extractStorageArgs(registry, storage['staking']['payee'], ['abc'])
|
||||
).toEqual([storage['staking']['payee'], ['abc']]);
|
||||
});
|
||||
|
||||
it('validates map, 1 arg (failing with no args)', (): void => {
|
||||
expect(
|
||||
() => extractStorageArgs(registry, storage.staking.payee, [])
|
||||
() => extractStorageArgs(registry, storage['staking']['payee'], [])
|
||||
).toThrow('staking.payee(AccountId32) is a map, requiring 1 arguments, 0 found');
|
||||
});
|
||||
|
||||
it('validates map, 1 arg (failing with more args)', (): void => {
|
||||
expect(
|
||||
() => extractStorageArgs(registry, storage.staking.payee, ['abc', 'def'])
|
||||
() => extractStorageArgs(registry, storage['staking']['payee'], ['abc', 'def'])
|
||||
).toThrow('staking.payee(AccountId32) is a map, requiring 1 arguments, 2 found');
|
||||
});
|
||||
|
||||
it('validates doublemap, 2 args', (): void => {
|
||||
expect(
|
||||
extractStorageArgs(registry, storage.staking.erasStakers, [1, '0x1234'])
|
||||
).toEqual([storage.staking.erasStakers, [1, '0x1234']]);
|
||||
extractStorageArgs(registry, storage['staking']['erasStakers'], [1, '0x1234'])
|
||||
).toEqual([storage['staking']['erasStakers'], [1, '0x1234']]);
|
||||
});
|
||||
|
||||
it('validates doublemap, 2 args (failing with no args)', (): void => {
|
||||
expect(
|
||||
() => extractStorageArgs(registry, storage.staking.erasStakers, [])
|
||||
() => extractStorageArgs(registry, storage['staking']['erasStakers'], [])
|
||||
).toThrow('staking.erasStakers(u32, AccountId32) is a map, requiring 2 arguments, 0 found');
|
||||
});
|
||||
|
||||
it('validates doublemap, 2 args (failing with 1 arg)', (): void => {
|
||||
expect(
|
||||
() => extractStorageArgs(registry, storage.staking.erasStakers, [123])
|
||||
() => extractStorageArgs(registry, storage['staking']['erasStakers'], [123])
|
||||
).toThrow('staking.erasStakers(u32, AccountId32) is a map, requiring 2 arguments, 1 found');
|
||||
});
|
||||
});
|
||||
|
||||
@@ -12,6 +12,7 @@
|
||||
"**/test/**/*"
|
||||
],
|
||||
"references": [
|
||||
{ "path": "../api-augment/tsconfig.build.json" },
|
||||
{ "path": "../api-base/tsconfig.build.json" },
|
||||
{ "path": "../api-derive/tsconfig.build.json" },
|
||||
{ "path": "../rpc-augment/tsconfig.build.json" },
|
||||
|
||||
@@ -18,13 +18,13 @@
|
||||
"./detectPackage.cjs"
|
||||
],
|
||||
"type": "module",
|
||||
"version": "10.7.3",
|
||||
"version": "10.9.1",
|
||||
"main": "index.js",
|
||||
"dependencies": {
|
||||
"@polkadot/rpc-core": "10.7.3",
|
||||
"@polkadot/types": "10.7.3",
|
||||
"@polkadot/types-codec": "10.7.3",
|
||||
"@polkadot/util": "^12.2.1",
|
||||
"tslib": "^2.5.2"
|
||||
"@polkadot/rpc-core": "10.9.1",
|
||||
"@polkadot/types": "10.9.1",
|
||||
"@polkadot/types-codec": "10.9.1",
|
||||
"@polkadot/util": "^12.3.1",
|
||||
"tslib": "^2.5.3"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3,4 +3,4 @@
|
||||
|
||||
// Do not edit, auto-generated by @polkadot/dev
|
||||
|
||||
export const packageInfo = { name: '@polkadot/rpc-augment', path: 'auto', type: 'auto', version: '10.7.3' };
|
||||
export const packageInfo = { name: '@polkadot/rpc-augment', path: 'auto', type: 'auto', version: '10.9.1' };
|
||||
|
||||
@@ -18,18 +18,18 @@
|
||||
"./detectPackage.cjs"
|
||||
],
|
||||
"type": "module",
|
||||
"version": "10.7.3",
|
||||
"version": "10.9.1",
|
||||
"main": "index.js",
|
||||
"dependencies": {
|
||||
"@polkadot/rpc-augment": "10.7.3",
|
||||
"@polkadot/rpc-provider": "10.7.3",
|
||||
"@polkadot/types": "10.7.3",
|
||||
"@polkadot/util": "^12.2.1",
|
||||
"@polkadot/rpc-augment": "10.9.1",
|
||||
"@polkadot/rpc-provider": "10.9.1",
|
||||
"@polkadot/types": "10.9.1",
|
||||
"@polkadot/util": "^12.3.1",
|
||||
"rxjs": "^7.8.1",
|
||||
"tslib": "^2.5.2"
|
||||
"tslib": "^2.5.3"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@polkadot/keyring": "^12.2.1",
|
||||
"@polkadot/rpc-augment": "10.7.3"
|
||||
"@polkadot/keyring": "^12.3.1",
|
||||
"@polkadot/rpc-augment": "10.9.1"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -35,7 +35,7 @@ describe('Api', (): void => {
|
||||
}
|
||||
});
|
||||
|
||||
expect(isFunction((rpc as unknown as Record<string, Record<string, boolean>>).testing.foo)).toBe(true);
|
||||
expect(isFunction((rpc as unknown as { testing: { foo: boolean } }).testing.foo)).toBe(true);
|
||||
expect(rpc.sections.includes('testing')).toBe(true);
|
||||
expect(rpc.mapping.get('testing_foo')).toEqual({
|
||||
description: 'foo',
|
||||
|
||||
@@ -13,7 +13,7 @@ import { RpcCore } from './index.js';
|
||||
describe('methodSend', (): void => {
|
||||
const registry = new TypeRegistry();
|
||||
let rpc: RpcCore;
|
||||
let methods: Record<string, DefinitionRpc>;
|
||||
let methods: { blah: DefinitionRpc; bleh: DefinitionRpc };
|
||||
let provider: ProviderInterface;
|
||||
|
||||
beforeEach((): void => {
|
||||
|
||||
@@ -3,4 +3,4 @@
|
||||
|
||||
// Do not edit, auto-generated by @polkadot/dev
|
||||
|
||||
export const packageInfo = { name: '@polkadot/rpc-core', path: 'auto', type: 'auto', version: '10.7.3' };
|
||||
export const packageInfo = { name: '@polkadot/rpc-core', path: 'auto', type: 'auto', version: '10.9.1' };
|
||||
|
||||
@@ -18,21 +18,21 @@
|
||||
"./detectPackage.cjs"
|
||||
],
|
||||
"type": "module",
|
||||
"version": "10.7.3",
|
||||
"version": "10.9.1",
|
||||
"main": "index.js",
|
||||
"dependencies": {
|
||||
"@polkadot/keyring": "^12.2.1",
|
||||
"@polkadot/types": "10.7.3",
|
||||
"@polkadot/types-support": "10.7.3",
|
||||
"@polkadot/util": "^12.2.1",
|
||||
"@polkadot/util-crypto": "^12.2.1",
|
||||
"@polkadot/x-fetch": "^12.2.1",
|
||||
"@polkadot/x-global": "^12.2.1",
|
||||
"@polkadot/x-ws": "^12.2.1",
|
||||
"@polkadot/keyring": "^12.3.1",
|
||||
"@polkadot/types": "10.9.1",
|
||||
"@polkadot/types-support": "10.9.1",
|
||||
"@polkadot/util": "^12.3.1",
|
||||
"@polkadot/util-crypto": "^12.3.1",
|
||||
"@polkadot/x-fetch": "^12.3.1",
|
||||
"@polkadot/x-global": "^12.3.1",
|
||||
"@polkadot/x-ws": "^12.3.1",
|
||||
"eventemitter3": "^5.0.1",
|
||||
"mock-socket": "^9.2.1",
|
||||
"nock": "^13.3.1",
|
||||
"tslib": "^2.5.2"
|
||||
"tslib": "^2.5.3"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@substrate/connect": "0.7.26"
|
||||
|
||||
@@ -36,7 +36,7 @@ describe.skip('send', (): void => {
|
||||
return http
|
||||
.send('test_body', ['param'])
|
||||
.then((): void => {
|
||||
expect(mock.body.test_body).toEqual({
|
||||
expect(mock.body['test_body']).toEqual({
|
||||
id: 1,
|
||||
jsonrpc: '2.0',
|
||||
method: 'test_body',
|
||||
|
||||
@@ -202,11 +202,11 @@ export class MockProvider implements ProviderInterface {
|
||||
|
||||
// increment the balances and nonce for each account
|
||||
keyring.getPairs().forEach(({ publicKey }, index): void => {
|
||||
this.setStateBn(query.system.account(publicKey), newHead.number.toBn().addn(index));
|
||||
this.setStateBn(query['system']['account'](publicKey), newHead.number.toBn().addn(index));
|
||||
});
|
||||
|
||||
// set the timestamp for the current block
|
||||
this.setStateBn(query.timestamp.now(), Math.floor(Date.now() / 1000));
|
||||
this.setStateBn(query['timestamp']['now'](), Math.floor(Date.now() / 1000));
|
||||
this.updateSubs('chain_subscribeNewHead', newHead);
|
||||
|
||||
// We emit connected/disconnected at intervals
|
||||
|
||||
@@ -17,10 +17,19 @@ export interface Mock {
|
||||
|
||||
export type MockStateSubscriptionCallback = (error: Error | null, value: any) => void;
|
||||
|
||||
export type MockStateSubscriptions = Record<string, {
|
||||
export interface MockStateSubscription {
|
||||
callbacks: Record<number, MockStateSubscriptionCallback>;
|
||||
lastValue: any;
|
||||
}>;
|
||||
}
|
||||
|
||||
export interface MockStateSubscriptions {
|
||||
// known
|
||||
chain_subscribeNewHead: MockStateSubscription;
|
||||
state_subscribeStorage: MockStateSubscription;
|
||||
|
||||
// others
|
||||
[key: string]: MockStateSubscription;
|
||||
}
|
||||
|
||||
export type MockStateDb = Record<string, Uint8Array>;
|
||||
|
||||
|
||||
@@ -3,4 +3,4 @@
|
||||
|
||||
// Do not edit, auto-generated by @polkadot/dev
|
||||
|
||||
export const packageInfo = { name: '@polkadot/rpc-provider', path: 'auto', type: 'auto', version: '10.7.3' };
|
||||
export const packageInfo = { name: '@polkadot/rpc-provider', path: 'auto', type: 'auto', version: '10.9.1' };
|
||||
|
||||
@@ -3,43 +3,30 @@
|
||||
|
||||
/// <reference types="@polkadot/dev-test/globals.d.ts" />
|
||||
|
||||
/* eslint-disable sort-keys */
|
||||
/* eslint-disable promise/param-names */
|
||||
/* eslint-disable @typescript-eslint/no-unsafe-assignment */
|
||||
/* eslint-disable @typescript-eslint/no-non-null-assertion */
|
||||
/* eslint-disable @typescript-eslint/no-unsafe-member-access */
|
||||
/* eslint-disable @typescript-eslint/no-unsafe-argument */
|
||||
/* eslint-disable @typescript-eslint/no-unsafe-call */
|
||||
/* eslint-disable @typescript-eslint/no-unsafe-return */
|
||||
/* eslint-disable @typescript-eslint/no-unsafe-return */
|
||||
/* eslint-disable @typescript-eslint/no-empty-function */
|
||||
/* eslint-disable @typescript-eslint/no-floating-promises */
|
||||
/* eslint-disable @typescript-eslint/restrict-template-expressions */
|
||||
/* eslint-disable @typescript-eslint/ban-types */
|
||||
|
||||
// FIXME A number of tests here, that were passing, is not skipped since
|
||||
// Jest has "some" issues with `await import` - we don't transform these
|
||||
|
||||
import type * as Sc from '@substrate/connect';
|
||||
import type { HealthChecker, SmoldotHealth } from './types.js';
|
||||
|
||||
import { ScProvider } from './index.js';
|
||||
|
||||
type MockChain = Sc.Chain & {
|
||||
_spec: () => string
|
||||
_recevedRequests: () => string[]
|
||||
_isTerminated: () => boolean
|
||||
_triggerCallback: (response: string | {}) => void
|
||||
_setTerminateInterceptor: (fn: () => void) => void
|
||||
_setSendJsonRpcInterceptor: (fn: (rpc: string) => void) => void
|
||||
_getLatestRequest: () => string
|
||||
interface MockChain extends Sc.Chain {
|
||||
_spec: () => string;
|
||||
_recevedRequests: () => string[];
|
||||
_isTerminated: () => boolean;
|
||||
_triggerCallback: (response: string | object) => void;
|
||||
_setTerminateInterceptor: (fn: () => void) => void;
|
||||
_setSendJsonRpcInterceptor: (fn: (rpc: string) => void) => void;
|
||||
_getLatestRequest: () => string;
|
||||
}
|
||||
|
||||
type MockedHealthChecker = HealthChecker & {
|
||||
_isActive: () => boolean
|
||||
_triggerHealthUpdate: (update: SmoldotHealth) => void
|
||||
interface MockedHealthChecker extends HealthChecker {
|
||||
_isActive: () => boolean;
|
||||
_triggerHealthUpdate: (update: SmoldotHealth) => void;
|
||||
}
|
||||
|
||||
type MockSc = typeof Sc & {
|
||||
latestChain: () => MockChain;
|
||||
};
|
||||
|
||||
enum WellKnownChain {
|
||||
polkadot = 'polkadot',
|
||||
ksmcc3 = 'ksmcc3',
|
||||
@@ -47,16 +34,23 @@ enum WellKnownChain {
|
||||
westend2 = 'westend2'
|
||||
}
|
||||
|
||||
const wait = (ms: number) => new Promise((res) => setTimeout(res, ms));
|
||||
const wait = (ms: number) =>
|
||||
new Promise((resolve) =>
|
||||
setTimeout(resolve, ms)
|
||||
);
|
||||
|
||||
function healthCheckerMock (): MockedHealthChecker {
|
||||
let cb: (health: SmoldotHealth) => void = () => {};
|
||||
|
||||
let sendJsonRpc: (request: string) => void = () => {};
|
||||
|
||||
let cb: (health: SmoldotHealth) => void = () => undefined;
|
||||
let sendJsonRpc: (request: string) => void = () => undefined;
|
||||
let isActive = false;
|
||||
|
||||
return {
|
||||
_isActive: () => isActive,
|
||||
_triggerHealthUpdate: (update: SmoldotHealth) => {
|
||||
cb(update);
|
||||
},
|
||||
responsePassThrough: (response) => response,
|
||||
sendJsonRpc: (...args) => sendJsonRpc(...args),
|
||||
setSendJsonRpc: (cb) => {
|
||||
sendJsonRpc = cb;
|
||||
},
|
||||
@@ -66,12 +60,6 @@ function healthCheckerMock (): MockedHealthChecker {
|
||||
},
|
||||
stop: () => {
|
||||
isActive = false;
|
||||
},
|
||||
sendJsonRpc: (...args) => sendJsonRpc(...args),
|
||||
responsePassThrough: (response) => response,
|
||||
_isActive: () => isActive,
|
||||
_triggerHealthUpdate: (update: SmoldotHealth) => {
|
||||
cb(update);
|
||||
}
|
||||
};
|
||||
}
|
||||
@@ -80,15 +68,15 @@ function healthCheckerFactory () {
|
||||
const _healthCheckers: MockedHealthChecker[] = [];
|
||||
|
||||
return {
|
||||
_healthCheckers,
|
||||
_latestHealthChecker: () => _healthCheckers.slice(-1)[0],
|
||||
healthChecker: () => {
|
||||
const result = healthCheckerMock();
|
||||
|
||||
_healthCheckers.push(result);
|
||||
|
||||
return result;
|
||||
},
|
||||
_healthCheckers,
|
||||
_latestHealthChecker: () => _healthCheckers.slice(-1)[0]
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
@@ -96,33 +84,33 @@ function getFakeChain (spec: string, callback: Sc.JsonRpcCallback): MockChain {
|
||||
const _receivedRequests: string[] = [];
|
||||
let _isTerminated = false;
|
||||
|
||||
let terminateInterceptor: Function = Function.prototype;
|
||||
let sendJsonRpcInterceptor: Function = Function.prototype;
|
||||
let terminateInterceptor = Function.prototype;
|
||||
let sendJsonRpcInterceptor = Function.prototype;
|
||||
|
||||
return {
|
||||
_spec: () => spec,
|
||||
_recevedRequests: () => _receivedRequests,
|
||||
_getLatestRequest: () => _receivedRequests[_receivedRequests.length - 1],
|
||||
_isTerminated: () => _isTerminated,
|
||||
_triggerCallback: (response) => {
|
||||
callback(
|
||||
typeof response === 'string' ? response : JSON.stringify(response)
|
||||
);
|
||||
},
|
||||
_recevedRequests: () => _receivedRequests,
|
||||
_setSendJsonRpcInterceptor: (fn) => {
|
||||
sendJsonRpcInterceptor = fn;
|
||||
},
|
||||
_setTerminateInterceptor: (fn) => {
|
||||
terminateInterceptor = fn;
|
||||
},
|
||||
sendJsonRpc: (rpc) => {
|
||||
sendJsonRpcInterceptor(rpc);
|
||||
_receivedRequests.push(rpc);
|
||||
_spec: () => spec,
|
||||
_triggerCallback: (response) => {
|
||||
callback(
|
||||
typeof response === 'string' ? response : JSON.stringify(response)
|
||||
);
|
||||
},
|
||||
remove: () => {
|
||||
terminateInterceptor();
|
||||
_isTerminated = true;
|
||||
},
|
||||
_getLatestRequest: () => _receivedRequests[_receivedRequests.length - 1]
|
||||
sendJsonRpc: (rpc) => {
|
||||
sendJsonRpcInterceptor(rpc);
|
||||
_receivedRequests.push(rpc);
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
@@ -161,12 +149,13 @@ function getFakeClient () {
|
||||
};
|
||||
}
|
||||
|
||||
function connectorFactory () {
|
||||
function connectorFactory (): MockSc {
|
||||
const clients: ReturnType<typeof getFakeClient>[] = [];
|
||||
const latestClient = () => clients[clients.length - 1];
|
||||
|
||||
return {
|
||||
WellKnownChain,
|
||||
_clients: () => clients,
|
||||
createScClient: () => {
|
||||
const result = getFakeClient();
|
||||
|
||||
@@ -174,14 +163,13 @@ function connectorFactory () {
|
||||
|
||||
return result;
|
||||
},
|
||||
_clients: () => clients,
|
||||
latestClient,
|
||||
latestChain: () =>
|
||||
latestClient()._chains()[latestClient()._chains().length - 1]
|
||||
};
|
||||
latestClient()._chains()[latestClient()._chains().length - 1],
|
||||
latestClient
|
||||
} as unknown as MockSc;
|
||||
}
|
||||
|
||||
function setChainSyncyingStatus (isSyncing: boolean) {
|
||||
function setChainSyncyingStatus (isSyncing: boolean): void {
|
||||
getCurrentHealthChecker()._triggerHealthUpdate({
|
||||
isSyncing,
|
||||
peers: 1,
|
||||
@@ -189,13 +177,13 @@ function setChainSyncyingStatus (isSyncing: boolean) {
|
||||
});
|
||||
}
|
||||
|
||||
let mockSc: typeof Sc & { latestChain: () => MockChain };
|
||||
let mockSc: MockSc;
|
||||
let mockedHealthChecker: ReturnType<typeof healthCheckerFactory>;
|
||||
const getCurrentHealthChecker = () => mockedHealthChecker._latestHealthChecker();
|
||||
|
||||
describe('ScProvider', () => {
|
||||
beforeAll(() => {
|
||||
mockSc = connectorFactory() as unknown as typeof Sc & { latestChain: () => MockChain };
|
||||
mockSc = connectorFactory();
|
||||
mockedHealthChecker = healthCheckerFactory();
|
||||
});
|
||||
|
||||
@@ -348,7 +336,7 @@ describe('ScProvider', () => {
|
||||
|
||||
setChainSyncyingStatus(false);
|
||||
|
||||
const responsePromise = provider.send('getData', ['foo']);
|
||||
const responsePromise = provider.send<unknown>('getData', ['foo']);
|
||||
|
||||
await wait(0);
|
||||
expect(chain._getLatestRequest()).toEqual(
|
||||
@@ -358,8 +346,8 @@ describe('ScProvider', () => {
|
||||
const result = { foo: 'foo' };
|
||||
|
||||
chain._triggerCallback({
|
||||
jsonrpc: '2.0',
|
||||
id: 1,
|
||||
jsonrpc: '2.0',
|
||||
result
|
||||
});
|
||||
|
||||
@@ -378,8 +366,8 @@ describe('ScProvider', () => {
|
||||
|
||||
setTimeout(() => {
|
||||
chain._triggerCallback({
|
||||
jsonrpc: '2.0',
|
||||
id: 1
|
||||
id: 1,
|
||||
jsonrpc: '2.0'
|
||||
});
|
||||
}, 0);
|
||||
|
||||
@@ -419,8 +407,8 @@ describe('ScProvider', () => {
|
||||
|
||||
setTimeout(() => {
|
||||
chain._triggerCallback({
|
||||
jsonrpc: '2.0',
|
||||
id: 1,
|
||||
jsonrpc: '2.0',
|
||||
result: unsubscribeToken
|
||||
});
|
||||
}, 0);
|
||||
@@ -458,7 +446,9 @@ describe('ScProvider', () => {
|
||||
expect(cb).toHaveBeenCalledTimes(2);
|
||||
expect(cb).toHaveBeenLastCalledWith(null, 2);
|
||||
|
||||
provider.unsubscribe('foo', 'chain_unsubscribeNewHeads', unsubscribeToken);
|
||||
provider
|
||||
.unsubscribe('foo', 'chain_unsubscribeNewHeads', unsubscribeToken)
|
||||
.catch(console.error);
|
||||
|
||||
chain._triggerCallback({
|
||||
jsonrpc: '2.0',
|
||||
@@ -492,8 +482,8 @@ describe('ScProvider', () => {
|
||||
});
|
||||
setTimeout(() => {
|
||||
chain._triggerCallback({
|
||||
jsonrpc: '2.0',
|
||||
id: 1,
|
||||
jsonrpc: '2.0',
|
||||
result: unsubscribeToken
|
||||
});
|
||||
}, 0);
|
||||
@@ -523,8 +513,8 @@ describe('ScProvider', () => {
|
||||
|
||||
setTimeout(() => {
|
||||
chain._triggerCallback({
|
||||
jsonrpc: '2.0',
|
||||
id: 1,
|
||||
jsonrpc: '2.0',
|
||||
result: unsubscribeToken
|
||||
});
|
||||
}, 0);
|
||||
@@ -560,7 +550,7 @@ describe('ScProvider', () => {
|
||||
|
||||
await wait(0);
|
||||
await expect(
|
||||
provider.subscribe('foo', 'bar', ['baz'], () => {})
|
||||
provider.subscribe('foo', 'bar', ['baz'], () => undefined)
|
||||
).rejects.toThrow(/Unsupported subscribe method: bar/);
|
||||
});
|
||||
});
|
||||
@@ -594,8 +584,8 @@ describe('ScProvider', () => {
|
||||
|
||||
setTimeout(() => {
|
||||
chain._triggerCallback({
|
||||
jsonrpc: '2.0',
|
||||
id: 1,
|
||||
jsonrpc: '2.0',
|
||||
result: unsubscribeToken
|
||||
});
|
||||
}, 0);
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
// Copyright 2017-2023 @polkadot/rpc-provider authors & contributors
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
import type { Constructor } from '@polkadot/util/types';
|
||||
import type { Class } from '@polkadot/util/types';
|
||||
import type { EndpointStats, JsonRpcResponse, ProviderInterface, ProviderInterfaceCallback, ProviderInterfaceEmitCb, ProviderInterfaceEmitted, ProviderStats } from '../types.js';
|
||||
|
||||
import { EventEmitter } from 'eventemitter3';
|
||||
@@ -209,7 +209,7 @@ export class WsProvider implements ProviderInterface {
|
||||
this.#endpointIndex = this.selectEndpointIndex(this.#endpoints);
|
||||
|
||||
// the as here is Deno-specific - not available on the globalThis
|
||||
this.#websocket = typeof xglobal.WebSocket !== 'undefined' && isChildClass(xglobal.WebSocket as unknown as Constructor<WebSocket>, WebSocket)
|
||||
this.#websocket = typeof xglobal.WebSocket !== 'undefined' && isChildClass(xglobal.WebSocket as unknown as Class<WebSocket>, WebSocket)
|
||||
? new WebSocket(this.endpoint)
|
||||
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
||||
// @ts-ignore - WS may be an instance of ws, which supports options
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
"./detectPackage.cjs"
|
||||
],
|
||||
"type": "module",
|
||||
"version": "10.7.3",
|
||||
"version": "10.9.1",
|
||||
"main": "index.js",
|
||||
"bin": {
|
||||
"polkadot-types-chain-info": "./scripts/polkadot-types-chain-info.mjs",
|
||||
@@ -28,20 +28,20 @@
|
||||
"polkadot-types-internal-metadata": "./scripts/polkadot-types-internal-metadata.mjs"
|
||||
},
|
||||
"dependencies": {
|
||||
"@polkadot/api": "10.7.3",
|
||||
"@polkadot/api-augment": "10.7.3",
|
||||
"@polkadot/rpc-augment": "10.7.3",
|
||||
"@polkadot/rpc-provider": "10.7.3",
|
||||
"@polkadot/types": "10.7.3",
|
||||
"@polkadot/types-augment": "10.7.3",
|
||||
"@polkadot/types-codec": "10.7.3",
|
||||
"@polkadot/types-create": "10.7.3",
|
||||
"@polkadot/types-support": "10.7.3",
|
||||
"@polkadot/util": "^12.2.1",
|
||||
"@polkadot/util-crypto": "^12.2.1",
|
||||
"@polkadot/x-ws": "^12.2.1",
|
||||
"@polkadot/api": "10.9.1",
|
||||
"@polkadot/api-augment": "10.9.1",
|
||||
"@polkadot/rpc-augment": "10.9.1",
|
||||
"@polkadot/rpc-provider": "10.9.1",
|
||||
"@polkadot/types": "10.9.1",
|
||||
"@polkadot/types-augment": "10.9.1",
|
||||
"@polkadot/types-codec": "10.9.1",
|
||||
"@polkadot/types-create": "10.9.1",
|
||||
"@polkadot/types-support": "10.9.1",
|
||||
"@polkadot/util": "^12.3.1",
|
||||
"@polkadot/util-crypto": "^12.3.1",
|
||||
"@polkadot/x-ws": "^12.3.1",
|
||||
"handlebars": "^4.7.7",
|
||||
"tslib": "^2.5.2",
|
||||
"tslib": "^2.5.3",
|
||||
"yargs": "^17.7.2"
|
||||
},
|
||||
"devDependencies": {
|
||||
|
||||
@@ -19,6 +19,13 @@ import { isString, stringify } from '@polkadot/util';
|
||||
import { createImports, exportInterface, initMeta, readTemplate, writeFile } from '../util/index.js';
|
||||
import { typeEncoders } from './tsDef.js';
|
||||
|
||||
// Record<string, >
|
||||
interface ParsedDef {
|
||||
_set: Record<string, number>;
|
||||
|
||||
[key: string]: string | Record<string, string> | Record<string, number>;
|
||||
}
|
||||
|
||||
const WITH_TYPEDEF = false;
|
||||
|
||||
const generateLookupDefsTmpl = Handlebars.compile(readTemplate('lookup/defs'));
|
||||
@@ -67,9 +74,9 @@ function expandSet (parsed: Record<string, number>): string[] {
|
||||
);
|
||||
}
|
||||
|
||||
function expandObject (parsed: Record<string, string | Record<string, string>>): string[] {
|
||||
function expandObject (parsed: ParsedDef): string[] {
|
||||
if (parsed._set) {
|
||||
return expandSet(parsed._set as unknown as Record<string, number>);
|
||||
return expandSet(parsed._set);
|
||||
}
|
||||
|
||||
return formatObject(
|
||||
@@ -78,7 +85,7 @@ function expandObject (parsed: Record<string, string | Record<string, string>>):
|
||||
? expandType(v)
|
||||
: Array.isArray(v)
|
||||
? [`[${(v as string[]).map((e) => `'${e}'`).join(', ')}]`]
|
||||
: expandObject(v);
|
||||
: expandObject(v as ParsedDef);
|
||||
|
||||
inner.forEach((l, index): void => {
|
||||
all.push(`${
|
||||
@@ -98,7 +105,7 @@ function expandType (encoded: string): string[] {
|
||||
return [`'${encoded}'`];
|
||||
}
|
||||
|
||||
return expandObject(JSON.parse(encoded) as Record<string, string | Record<string, string>>);
|
||||
return expandObject(JSON.parse(encoded) as ParsedDef);
|
||||
}
|
||||
|
||||
function expandDefToString ({ lookupNameRoot, type }: TypeDef, indent: number): string {
|
||||
|
||||
@@ -114,7 +114,7 @@ function generateForMeta (registry: Registry, meta: Metadata, dest: string, extr
|
||||
})
|
||||
.sort(compareName);
|
||||
|
||||
imports.typesTypes.Observable = true;
|
||||
imports.typesTypes['Observable'] = true;
|
||||
|
||||
return generateForMetaTemplate({
|
||||
headerType: 'chain',
|
||||
|
||||
@@ -126,7 +126,7 @@ export function generateRpcTypes (registry: TypeRegistry, importDefinitions: Rec
|
||||
};
|
||||
}).concat(...Object.values(additional)).sort((a, b) => a.name.localeCompare(b.name));
|
||||
|
||||
imports.typesTypes.Observable = true;
|
||||
imports.typesTypes['Observable'] = true;
|
||||
|
||||
return generateRpcTypesTemplate({
|
||||
headerType: 'chain',
|
||||
|
||||
@@ -141,7 +141,7 @@ export function generateCallTypes (registry: Registry, meta: Metadata, dest: str
|
||||
}).filter(({ items }) => items.length).sort((a, b) => a.name.localeCompare(b.name));
|
||||
|
||||
if (modules.length) {
|
||||
imports.typesTypes.Observable = true;
|
||||
imports.typesTypes['Observable'] = true;
|
||||
}
|
||||
|
||||
return generateCallsTypesTemplate({
|
||||
|
||||
@@ -1,4 +1,7 @@
|
||||
// Copyright 2017-2023 @polkadot/typegen authors & contributors
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
export type ExtraTypes = Record<string, Record<string, { runtime?: Record<string, any>, types: Record<string, any> }>>;
|
||||
export type ExtraTypes = Record<string, Record<string, {
|
||||
runtime?: Record<string, any>;
|
||||
types: Record<string, any>;
|
||||
}>>;
|
||||
|
||||
@@ -3,4 +3,4 @@
|
||||
|
||||
// Do not edit, auto-generated by @polkadot/dev
|
||||
|
||||
export const packageInfo = { name: '@polkadot/typegen', path: 'auto', type: 'auto', version: '10.7.3' };
|
||||
export const packageInfo = { name: '@polkadot/typegen', path: 'auto', type: 'auto', version: '10.9.1' };
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
// Copyright 2017-2023 @polkadot/types authors & contributors
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
import type { Constructor, Registry } from '@polkadot/types/types';
|
||||
import type { CodecClass, Registry } from '@polkadot/types/types';
|
||||
import type { UInt } from '@polkadot/types-codec';
|
||||
import type { TypeDef } from '@polkadot/types-create/types';
|
||||
import type { ModuleTypes, TypeImports } from './imports.js';
|
||||
@@ -69,7 +69,7 @@ export function getSimilarTypes (registry: Registry, definitions: Record<string,
|
||||
}
|
||||
}
|
||||
} else if (isChildClass(Enum, Clazz)) {
|
||||
const { defKeys, isBasic } = new (Clazz as Constructor)(registry) as Enum;
|
||||
const { defKeys, isBasic } = new (Clazz as CodecClass)(registry) as Enum;
|
||||
const keys = defKeys.filter((v) => !v.startsWith('__Unused'));
|
||||
|
||||
if (isBasic) {
|
||||
@@ -80,7 +80,7 @@ export function getSimilarTypes (registry: Registry, definitions: Record<string,
|
||||
}
|
||||
|
||||
possibleTypes.push('Uint8Array');
|
||||
} else if (isChildClass(AbstractInt as unknown as Constructor<UInt>, Clazz) || isChildClass(Compact, Clazz)) {
|
||||
} else if (isChildClass(AbstractInt as unknown as CodecClass<UInt>, Clazz) || isChildClass(Compact, Clazz)) {
|
||||
possibleTypes.push('AnyNumber', 'Uint8Array');
|
||||
} else if (isChildClass(GenericLookupSource, Clazz)) {
|
||||
possibleTypes.push('Address', 'AccountId', 'AccountIndex', 'LookupSource', 'string', 'Uint8Array');
|
||||
@@ -93,7 +93,7 @@ export function getSimilarTypes (registry: Registry, definitions: Record<string,
|
||||
} else if (isChildClass(Null, Clazz)) {
|
||||
possibleTypes.push('null');
|
||||
} else if (isChildClass(Struct, Clazz)) {
|
||||
const s = new (Clazz as Constructor)(registry) as Struct;
|
||||
const s = new (Clazz as CodecClass)(registry) as Struct;
|
||||
const obj = s.defKeys.map((key): string => `${key}?: any`).join('; ');
|
||||
|
||||
possibleTypes.push(`{ ${obj} }`, 'string', 'Uint8Array');
|
||||
|
||||
@@ -18,12 +18,12 @@
|
||||
"./detectPackage.cjs"
|
||||
],
|
||||
"type": "module",
|
||||
"version": "10.7.3",
|
||||
"version": "10.9.1",
|
||||
"main": "index.js",
|
||||
"dependencies": {
|
||||
"@polkadot/types": "10.7.3",
|
||||
"@polkadot/types-codec": "10.7.3",
|
||||
"@polkadot/util": "^12.2.1",
|
||||
"tslib": "^2.5.2"
|
||||
"@polkadot/types": "10.9.1",
|
||||
"@polkadot/types-codec": "10.9.1",
|
||||
"@polkadot/util": "^12.3.1",
|
||||
"tslib": "^2.5.3"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -164,7 +164,7 @@ export default {
|
||||
votes24: 'Vec<(Compact<u32>,[(Compact<u16>,Compact<PerU16>);23],Compact<u16>)>'
|
||||
},
|
||||
/**
|
||||
* Lookup540: kusama_runtime::RuntimeHoldReason
|
||||
* Lookup543: kusama_runtime::RuntimeHoldReason
|
||||
**/
|
||||
KusamaRuntimeRuntimeHoldReason: {
|
||||
_enum: {
|
||||
@@ -210,13 +210,7 @@ export default {
|
||||
}
|
||||
},
|
||||
/**
|
||||
* Lookup541: pallet_nis::pallet::HoldReason
|
||||
**/
|
||||
PalletNisHoldReason: {
|
||||
_enum: ['NftReceipt']
|
||||
},
|
||||
/**
|
||||
* Lookup860: kusama_runtime::Runtime
|
||||
* Lookup869: kusama_runtime::Runtime
|
||||
**/
|
||||
KusamaRuntimeRuntime: 'Null'
|
||||
};
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -108,20 +108,14 @@ declare module '@polkadot/types/lookup' {
|
||||
readonly votes24: Vec<ITuple<[Compact<u32>, Vec<ITuple<[Compact<u16>, Compact<PerU16>]>>, Compact<u16>]>>;
|
||||
}
|
||||
|
||||
/** @name KusamaRuntimeRuntimeHoldReason (540) */
|
||||
/** @name KusamaRuntimeRuntimeHoldReason (543) */
|
||||
interface KusamaRuntimeRuntimeHoldReason extends Enum {
|
||||
readonly isNis: boolean;
|
||||
readonly asNis: PalletNisHoldReason;
|
||||
readonly type: 'Nis';
|
||||
}
|
||||
|
||||
/** @name PalletNisHoldReason (541) */
|
||||
interface PalletNisHoldReason extends Enum {
|
||||
readonly isNftReceipt: boolean;
|
||||
readonly type: 'NftReceipt';
|
||||
}
|
||||
|
||||
/** @name KusamaRuntimeRuntime (860) */
|
||||
/** @name KusamaRuntimeRuntime (869) */
|
||||
type KusamaRuntimeRuntime = Null;
|
||||
|
||||
} // declare module
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
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/types-augment', path: 'auto', type: 'auto', version: '10.7.3' };
|
||||
export const packageInfo = { name: '@polkadot/types-augment', path: 'auto', type: 'auto', version: '10.9.1' };
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user