@dedot/chaintypes 0.152.0 → 0.154.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +2 -2
- package/polkadot/index.d.ts +1 -1
- package/westend/events.d.ts +79 -5
- package/westend/index.d.ts +1 -1
- package/westend/types.d.ts +70 -23
- package/westend-asset-hub/consts.d.ts +14 -0
- package/westend-asset-hub/errors.d.ts +29 -9
- package/westend-asset-hub/events.d.ts +95 -12
- package/westend-asset-hub/index.d.ts +1 -1
- package/westend-asset-hub/query.d.ts +27 -4
- package/westend-asset-hub/runtime.d.ts +17 -0
- package/westend-asset-hub/tx.d.ts +110 -26
- package/westend-asset-hub/types.d.ts +281 -102
- package/westend-people/consts.d.ts +27 -0
- package/westend-people/errors.d.ts +26 -12
- package/westend-people/events.d.ts +181 -3
- package/westend-people/index.d.ts +3 -1
- package/westend-people/query.d.ts +40 -2
- package/westend-people/runtime.d.ts +131 -31
- package/westend-people/tx.d.ts +156 -12
- package/westend-people/types.d.ts +1153 -783
- package/westend-people/view-functions.d.ts +34 -1
|
@@ -92,7 +92,7 @@ import type {
|
|
|
92
92
|
PalletNftFractionalizationDetails,
|
|
93
93
|
PalletAssetConversionPoolInfo,
|
|
94
94
|
PalletReviveVmCodeInfo,
|
|
95
|
-
|
|
95
|
+
PalletReviveStorageAccountInfo,
|
|
96
96
|
PalletReviveStorageDeletionQueueManager,
|
|
97
97
|
PalletAssetRewardsPoolStakerInfo,
|
|
98
98
|
PalletAssetRewardsPoolInfo,
|
|
@@ -111,6 +111,7 @@ import type {
|
|
|
111
111
|
PalletStakingAsyncSlashingOffenceRecord,
|
|
112
112
|
PalletStakingAsyncUnappliedSlash,
|
|
113
113
|
PalletStakingAsyncSnapshotStatus,
|
|
114
|
+
PalletStakingAsyncPalletPruningStep,
|
|
114
115
|
PalletNominationPoolsPoolMember,
|
|
115
116
|
PalletNominationPoolsBondedPoolInner,
|
|
116
117
|
PalletNominationPoolsRewardPool,
|
|
@@ -2122,6 +2123,8 @@ export interface ChainStorage<Rv extends RpcVersion> extends GenericChainStorage
|
|
|
2122
2123
|
revive: {
|
|
2123
2124
|
/**
|
|
2124
2125
|
* A mapping from a contract's code hash to its code.
|
|
2126
|
+
* The code's size is bounded by [`crate::limits::BLOB_BYTES`] for PVM and
|
|
2127
|
+
* [`revm::primitives::eip170::MAX_CODE_SIZE`] for EVM bytecode.
|
|
2125
2128
|
*
|
|
2126
2129
|
* @param {H256} arg
|
|
2127
2130
|
* @param {Callback<Bytes | undefined> =} callback
|
|
@@ -2137,12 +2140,12 @@ export interface ChainStorage<Rv extends RpcVersion> extends GenericChainStorage
|
|
|
2137
2140
|
codeInfoOf: GenericStorageQuery<Rv, (arg: H256) => PalletReviveVmCodeInfo | undefined, H256>;
|
|
2138
2141
|
|
|
2139
2142
|
/**
|
|
2140
|
-
* The
|
|
2143
|
+
* The data associated to a contract or externally owned account.
|
|
2141
2144
|
*
|
|
2142
2145
|
* @param {H160} arg
|
|
2143
|
-
* @param {Callback<
|
|
2146
|
+
* @param {Callback<PalletReviveStorageAccountInfo | undefined> =} callback
|
|
2144
2147
|
**/
|
|
2145
|
-
|
|
2148
|
+
accountInfoOf: GenericStorageQuery<Rv, (arg: H160) => PalletReviveStorageAccountInfo | undefined, H160>;
|
|
2146
2149
|
|
|
2147
2150
|
/**
|
|
2148
2151
|
* The immutable data associated with a given account.
|
|
@@ -2691,6 +2694,18 @@ export interface ChainStorage<Rv extends RpcVersion> extends GenericChainStorage
|
|
|
2691
2694
|
[number, [AccountId32, Perbill, number]]
|
|
2692
2695
|
>;
|
|
2693
2696
|
|
|
2697
|
+
/**
|
|
2698
|
+
* Cancelled slashes by era and validator with maximum slash fraction to be cancelled.
|
|
2699
|
+
*
|
|
2700
|
+
* When slashes are cancelled by governance, this stores the era and the validators
|
|
2701
|
+
* whose slashes should be cancelled, along with the maximum slash fraction that should
|
|
2702
|
+
* be cancelled for each validator.
|
|
2703
|
+
*
|
|
2704
|
+
* @param {number} arg
|
|
2705
|
+
* @param {Callback<Array<[AccountId32, Perbill]>> =} callback
|
|
2706
|
+
**/
|
|
2707
|
+
cancelledSlashes: GenericStorageQuery<Rv, (arg: number) => Array<[AccountId32, Perbill]>, number>;
|
|
2708
|
+
|
|
2694
2709
|
/**
|
|
2695
2710
|
* All slashing events on validators, mapped by era to the highest slash proportion
|
|
2696
2711
|
* and slash value of the era.
|
|
@@ -2742,6 +2757,14 @@ export interface ChainStorage<Rv extends RpcVersion> extends GenericChainStorage
|
|
|
2742
2757
|
**/
|
|
2743
2758
|
electableStashes: GenericStorageQuery<Rv, () => Array<AccountId32>>;
|
|
2744
2759
|
|
|
2760
|
+
/**
|
|
2761
|
+
* Tracks the current step of era pruning process for each era being lazily pruned.
|
|
2762
|
+
*
|
|
2763
|
+
* @param {number} arg
|
|
2764
|
+
* @param {Callback<PalletStakingAsyncPalletPruningStep | undefined> =} callback
|
|
2765
|
+
**/
|
|
2766
|
+
eraPruningState: GenericStorageQuery<Rv, (arg: number) => PalletStakingAsyncPalletPruningStep | undefined, number>;
|
|
2767
|
+
|
|
2745
2768
|
/**
|
|
2746
2769
|
* Generic pallet storage query
|
|
2747
2770
|
**/
|
|
@@ -20,6 +20,7 @@ import type {
|
|
|
20
20
|
import type {
|
|
21
21
|
SpConsensusSlotsSlotDuration,
|
|
22
22
|
SpConsensusAuraSr25519AppSr25519Public,
|
|
23
|
+
PolkadotParachainPrimitivesPrimitivesId,
|
|
23
24
|
SpConsensusSlotsSlot,
|
|
24
25
|
SpRuntimeBlock,
|
|
25
26
|
SpRuntimeExtrinsicInclusionMode,
|
|
@@ -107,6 +108,22 @@ export interface RuntimeApis<Rv extends RpcVersion> extends GenericRuntimeApis<R
|
|
|
107
108
|
**/
|
|
108
109
|
[method: string]: GenericRuntimeApiMethod<Rv>;
|
|
109
110
|
};
|
|
111
|
+
/**
|
|
112
|
+
* @runtimeapi: GetParachainInfo - 0xa2ddb6a58477bf63
|
|
113
|
+
**/
|
|
114
|
+
getParachainInfo: {
|
|
115
|
+
/**
|
|
116
|
+
* Retrieve the parachain id used for runtime.
|
|
117
|
+
*
|
|
118
|
+
* @callname: GetParachainInfo_parachain_id
|
|
119
|
+
**/
|
|
120
|
+
parachainId: GenericRuntimeApiMethod<Rv, () => Promise<PolkadotParachainPrimitivesPrimitivesId>>;
|
|
121
|
+
|
|
122
|
+
/**
|
|
123
|
+
* Generic runtime api call
|
|
124
|
+
**/
|
|
125
|
+
[method: string]: GenericRuntimeApiMethod<Rv>;
|
|
126
|
+
};
|
|
110
127
|
/**
|
|
111
128
|
* @runtimeapi: AuraUnincludedSegmentApi - 0xd7bdd8a272ca0d65
|
|
112
129
|
**/
|
|
@@ -18,6 +18,7 @@ import type {
|
|
|
18
18
|
FixedBytes,
|
|
19
19
|
AccountId32Like,
|
|
20
20
|
H160,
|
|
21
|
+
U256,
|
|
21
22
|
Percent,
|
|
22
23
|
Perbill,
|
|
23
24
|
FixedU128,
|
|
@@ -10640,7 +10641,7 @@ export interface ChainTx<Rv extends RpcVersion> extends GenericChainTx<Rv, TxCal
|
|
|
10640
10641
|
* also bumps the nonce after contract instantiation, since it may be invoked multiple
|
|
10641
10642
|
* times within a batch call transaction.
|
|
10642
10643
|
*
|
|
10643
|
-
* @param {
|
|
10644
|
+
* @param {U256} value
|
|
10644
10645
|
* @param {SpWeightsWeightV2Weight} gasLimit
|
|
10645
10646
|
* @param {bigint} storageDepositLimit
|
|
10646
10647
|
* @param {BytesLike} code
|
|
@@ -10649,7 +10650,7 @@ export interface ChainTx<Rv extends RpcVersion> extends GenericChainTx<Rv, TxCal
|
|
|
10649
10650
|
ethInstantiateWithCode: GenericTxCall<
|
|
10650
10651
|
Rv,
|
|
10651
10652
|
(
|
|
10652
|
-
value:
|
|
10653
|
+
value: U256,
|
|
10653
10654
|
gasLimit: SpWeightsWeightV2Weight,
|
|
10654
10655
|
storageDepositLimit: bigint,
|
|
10655
10656
|
code: BytesLike,
|
|
@@ -10661,7 +10662,7 @@ export interface ChainTx<Rv extends RpcVersion> extends GenericChainTx<Rv, TxCal
|
|
|
10661
10662
|
palletCall: {
|
|
10662
10663
|
name: 'EthInstantiateWithCode';
|
|
10663
10664
|
params: {
|
|
10664
|
-
value:
|
|
10665
|
+
value: U256;
|
|
10665
10666
|
gasLimit: SpWeightsWeightV2Weight;
|
|
10666
10667
|
storageDepositLimit: bigint;
|
|
10667
10668
|
code: BytesLike;
|
|
@@ -10672,12 +10673,47 @@ export interface ChainTx<Rv extends RpcVersion> extends GenericChainTx<Rv, TxCal
|
|
|
10672
10673
|
>
|
|
10673
10674
|
>;
|
|
10674
10675
|
|
|
10676
|
+
/**
|
|
10677
|
+
* Same as [`Self::call`], but intended to be dispatched **only**
|
|
10678
|
+
* by an EVM transaction through the EVM compatibility layer.
|
|
10679
|
+
*
|
|
10680
|
+
* @param {H160} dest
|
|
10681
|
+
* @param {U256} value
|
|
10682
|
+
* @param {SpWeightsWeightV2Weight} gasLimit
|
|
10683
|
+
* @param {bigint} storageDepositLimit
|
|
10684
|
+
* @param {BytesLike} data
|
|
10685
|
+
**/
|
|
10686
|
+
ethCall: GenericTxCall<
|
|
10687
|
+
Rv,
|
|
10688
|
+
(
|
|
10689
|
+
dest: H160,
|
|
10690
|
+
value: U256,
|
|
10691
|
+
gasLimit: SpWeightsWeightV2Weight,
|
|
10692
|
+
storageDepositLimit: bigint,
|
|
10693
|
+
data: BytesLike,
|
|
10694
|
+
) => ChainSubmittableExtrinsic<
|
|
10695
|
+
Rv,
|
|
10696
|
+
{
|
|
10697
|
+
pallet: 'Revive';
|
|
10698
|
+
palletCall: {
|
|
10699
|
+
name: 'EthCall';
|
|
10700
|
+
params: {
|
|
10701
|
+
dest: H160;
|
|
10702
|
+
value: U256;
|
|
10703
|
+
gasLimit: SpWeightsWeightV2Weight;
|
|
10704
|
+
storageDepositLimit: bigint;
|
|
10705
|
+
data: BytesLike;
|
|
10706
|
+
};
|
|
10707
|
+
};
|
|
10708
|
+
}
|
|
10709
|
+
>
|
|
10710
|
+
>;
|
|
10711
|
+
|
|
10675
10712
|
/**
|
|
10676
10713
|
* Upload new `code` without instantiating a contract from it.
|
|
10677
10714
|
*
|
|
10678
10715
|
* If the code does not already exist a deposit is reserved from the caller
|
|
10679
|
-
*
|
|
10680
|
-
* depends on the size of the supplied `code`.
|
|
10716
|
+
* The size of the reserve depends on the size of the supplied `code`.
|
|
10681
10717
|
*
|
|
10682
10718
|
* # Note
|
|
10683
10719
|
*
|
|
@@ -10686,6 +10722,9 @@ export interface ChainTx<Rv extends RpcVersion> extends GenericChainTx<Rv, TxCal
|
|
|
10686
10722
|
* only be instantiated by permissioned entities. The same is true when uploading
|
|
10687
10723
|
* through [`Self::instantiate_with_code`].
|
|
10688
10724
|
*
|
|
10725
|
+
* If the refcount of the code reaches zero after terminating the last contract that
|
|
10726
|
+
* references this code, the code will be removed automatically.
|
|
10727
|
+
*
|
|
10689
10728
|
* @param {BytesLike} code
|
|
10690
10729
|
* @param {bigint} storageDepositLimit
|
|
10691
10730
|
**/
|
|
@@ -11388,10 +11427,14 @@ export interface ChainTx<Rv extends RpcVersion> extends GenericChainTx<Rv, TxCal
|
|
|
11388
11427
|
>;
|
|
11389
11428
|
|
|
11390
11429
|
/**
|
|
11391
|
-
* Remove any
|
|
11430
|
+
* Remove any stake that has been fully unbonded and is ready for withdrawal.
|
|
11431
|
+
*
|
|
11432
|
+
* Stake is considered fully unbonded once [`Config::BondingDuration`] has elapsed since
|
|
11433
|
+
* the unbonding was initiated. In rare cases—such as when offences for the unbonded era
|
|
11434
|
+
* have been reported but not yet processed—withdrawal is restricted to eras for which
|
|
11435
|
+
* all offences have been processed.
|
|
11392
11436
|
*
|
|
11393
|
-
*
|
|
11394
|
-
* it wants.
|
|
11437
|
+
* The unlocked stake will be returned as free balance in the stash account.
|
|
11395
11438
|
*
|
|
11396
11439
|
* The dispatch origin for this call must be _Signed_ by the controller.
|
|
11397
11440
|
*
|
|
@@ -11401,8 +11444,8 @@ export interface ChainTx<Rv extends RpcVersion> extends GenericChainTx<Rv, TxCal
|
|
|
11401
11444
|
*
|
|
11402
11445
|
* ## Parameters
|
|
11403
11446
|
*
|
|
11404
|
-
* - `num_slashing_spans`: **Deprecated**.
|
|
11405
|
-
*
|
|
11447
|
+
* - `num_slashing_spans`: **Deprecated**. Retained only for backward compatibility; this
|
|
11448
|
+
* parameter has no effect.
|
|
11406
11449
|
*
|
|
11407
11450
|
* @param {number} numSlashingSpans
|
|
11408
11451
|
**/
|
|
@@ -11734,29 +11777,31 @@ export interface ChainTx<Rv extends RpcVersion> extends GenericChainTx<Rv, TxCal
|
|
|
11734
11777
|
/**
|
|
11735
11778
|
* Cancels scheduled slashes for a given era before they are applied.
|
|
11736
11779
|
*
|
|
11737
|
-
* This function allows `T::AdminOrigin` to
|
|
11738
|
-
*
|
|
11780
|
+
* This function allows `T::AdminOrigin` to cancel pending slashes for specified validators
|
|
11781
|
+
* in a given era. The cancelled slashes are stored and will be checked when applying
|
|
11782
|
+
* slashes.
|
|
11739
11783
|
*
|
|
11740
11784
|
* ## Parameters
|
|
11741
|
-
* - `era`: The staking era for which slashes
|
|
11742
|
-
*
|
|
11743
|
-
* of
|
|
11785
|
+
* - `era`: The staking era for which slashes should be cancelled. This is the era where
|
|
11786
|
+
* the slash would be applied, not the era in which the offence was committed.
|
|
11787
|
+
* - `validator_slashes`: A list of validator stash accounts and their slash fractions to
|
|
11788
|
+
* be cancelled.
|
|
11744
11789
|
*
|
|
11745
11790
|
* @param {number} era
|
|
11746
|
-
* @param {Array<[AccountId32Like, Perbill
|
|
11791
|
+
* @param {Array<[AccountId32Like, Perbill]>} validatorSlashes
|
|
11747
11792
|
**/
|
|
11748
11793
|
cancelDeferredSlash: GenericTxCall<
|
|
11749
11794
|
Rv,
|
|
11750
11795
|
(
|
|
11751
11796
|
era: number,
|
|
11752
|
-
|
|
11797
|
+
validatorSlashes: Array<[AccountId32Like, Perbill]>,
|
|
11753
11798
|
) => ChainSubmittableExtrinsic<
|
|
11754
11799
|
Rv,
|
|
11755
11800
|
{
|
|
11756
11801
|
pallet: 'Staking';
|
|
11757
11802
|
palletCall: {
|
|
11758
11803
|
name: 'CancelDeferredSlash';
|
|
11759
|
-
params: { era: number;
|
|
11804
|
+
params: { era: number; validatorSlashes: Array<[AccountId32Like, Perbill]> };
|
|
11760
11805
|
};
|
|
11761
11806
|
}
|
|
11762
11807
|
>
|
|
@@ -11822,9 +11867,8 @@ export interface ChainTx<Rv extends RpcVersion> extends GenericChainTx<Rv, TxCal
|
|
|
11822
11867
|
* Remove all data structures concerning a staker/stash once it is at a state where it can
|
|
11823
11868
|
* be considered `dust` in the staking system. The requirements are:
|
|
11824
11869
|
*
|
|
11825
|
-
* 1. the `total_balance` of the stash is below
|
|
11826
|
-
* 2. or, the `ledger.total` of the stash is below
|
|
11827
|
-
* 3. or, existential deposit is zero and either `total_balance` or `ledger.total` is zero.
|
|
11870
|
+
* 1. the `total_balance` of the stash is below `min_chilled_bond` or is zero.
|
|
11871
|
+
* 2. or, the `ledger.total` of the stash is below `min_chilled_bond` or is zero.
|
|
11828
11872
|
*
|
|
11829
11873
|
* The former can happen in cases like a slash; the latter when a fully unbonded account
|
|
11830
11874
|
* is still receiving staking rewards in `RewardDestination::Staked`.
|
|
@@ -12190,11 +12234,21 @@ export interface ChainTx<Rv extends RpcVersion> extends GenericChainTx<Rv, TxCal
|
|
|
12190
12234
|
>;
|
|
12191
12235
|
|
|
12192
12236
|
/**
|
|
12193
|
-
* Manually applies a deferred slash for a given era.
|
|
12237
|
+
* Manually and permissionlessly applies a deferred slash for a given era.
|
|
12194
12238
|
*
|
|
12195
12239
|
* Normally, slashes are automatically applied shortly after the start of the `slash_era`.
|
|
12196
|
-
*
|
|
12197
|
-
*
|
|
12240
|
+
* The automatic application of slashes is handled by the pallet's internal logic, and it
|
|
12241
|
+
* tries to apply one slash page per block of the era.
|
|
12242
|
+
* If for some reason, one era is not enough for applying all slash pages, the remaining
|
|
12243
|
+
* slashes need to be manually (permissionlessly) applied.
|
|
12244
|
+
*
|
|
12245
|
+
* For a given era x, if at era x+1, slashes are still unapplied, all withdrawals get
|
|
12246
|
+
* blocked, and these need to be manually applied by calling this function.
|
|
12247
|
+
* This function exists as a **fallback mechanism** for this extreme situation, but we
|
|
12248
|
+
* never expect to encounter this in normal scenarios.
|
|
12249
|
+
*
|
|
12250
|
+
* The parameters for this call can be queried by looking at the `UnappliedSlashes` storage
|
|
12251
|
+
* for eras older than the active era.
|
|
12198
12252
|
*
|
|
12199
12253
|
* ## Parameters
|
|
12200
12254
|
* - `slash_era`: The staking era in which the slash was originally scheduled.
|
|
@@ -12205,7 +12259,8 @@ export interface ChainTx<Rv extends RpcVersion> extends GenericChainTx<Rv, TxCal
|
|
|
12205
12259
|
*
|
|
12206
12260
|
* ## Behavior
|
|
12207
12261
|
* - The function is **permissionless**—anyone can call it.
|
|
12208
|
-
* - The `slash_era` **must be the current era or a past era**.
|
|
12262
|
+
* - The `slash_era` **must be the current era or a past era**.
|
|
12263
|
+
* If it is in the future, the
|
|
12209
12264
|
* call fails with `EraNotStarted`.
|
|
12210
12265
|
* - The fee is waived if the slash is successfully applied.
|
|
12211
12266
|
*
|
|
@@ -12233,6 +12288,35 @@ export interface ChainTx<Rv extends RpcVersion> extends GenericChainTx<Rv, TxCal
|
|
|
12233
12288
|
>
|
|
12234
12289
|
>;
|
|
12235
12290
|
|
|
12291
|
+
/**
|
|
12292
|
+
* Perform one step of era pruning to prevent PoV size exhaustion from unbounded deletions.
|
|
12293
|
+
*
|
|
12294
|
+
* This extrinsic enables permissionless lazy pruning of era data by performing
|
|
12295
|
+
* incremental deletion of storage items. Each call processes a limited number
|
|
12296
|
+
* of items based on available block weight to avoid exceeding block limits.
|
|
12297
|
+
*
|
|
12298
|
+
* Returns `Pays::No` when work is performed to incentivize regular maintenance.
|
|
12299
|
+
* Anyone can call this to help maintain the chain's storage health.
|
|
12300
|
+
*
|
|
12301
|
+
* The era must be eligible for pruning (older than HistoryDepth + 1).
|
|
12302
|
+
* Check `EraPruningState` storage to see if an era needs pruning before calling.
|
|
12303
|
+
*
|
|
12304
|
+
* @param {number} era
|
|
12305
|
+
**/
|
|
12306
|
+
pruneEraStep: GenericTxCall<
|
|
12307
|
+
Rv,
|
|
12308
|
+
(era: number) => ChainSubmittableExtrinsic<
|
|
12309
|
+
Rv,
|
|
12310
|
+
{
|
|
12311
|
+
pallet: 'Staking';
|
|
12312
|
+
palletCall: {
|
|
12313
|
+
name: 'PruneEraStep';
|
|
12314
|
+
params: { era: number };
|
|
12315
|
+
};
|
|
12316
|
+
}
|
|
12317
|
+
>
|
|
12318
|
+
>;
|
|
12319
|
+
|
|
12236
12320
|
/**
|
|
12237
12321
|
* Generic pallet tx call
|
|
12238
12322
|
**/
|
|
@@ -13475,7 +13559,7 @@ export interface ChainTx<Rv extends RpcVersion> extends GenericChainTx<Rv, TxCal
|
|
|
13475
13559
|
/**
|
|
13476
13560
|
* Retract a submission.
|
|
13477
13561
|
*
|
|
13478
|
-
* A portion of the deposit may be returned, based on the [`Config::
|
|
13562
|
+
* A portion of the deposit may be returned, based on the [`Config::EjectGraceRatio`].
|
|
13479
13563
|
*
|
|
13480
13564
|
* This will fully remove the solution from storage.
|
|
13481
13565
|
*
|