@dedot/chaintypes 0.71.0 → 0.73.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/astar/events.d.ts +0 -10
- package/astar/index.d.ts +1 -1
- package/astar/query.d.ts +0 -9
- package/astar/tx.d.ts +29 -26
- package/astar/types.d.ts +36 -35
- package/package.json +2 -2
- package/polkadot-asset-hub/consts.d.ts +34 -0
- package/polkadot-asset-hub/errors.d.ts +45 -0
- package/polkadot-asset-hub/events.d.ts +37 -0
- package/polkadot-asset-hub/index.d.ts +1 -1
- package/polkadot-asset-hub/query.d.ts +39 -0
- package/polkadot-asset-hub/tx.d.ts +188 -0
- package/polkadot-asset-hub/types.d.ts +239 -5
package/astar/events.d.ts
CHANGED
|
@@ -693,16 +693,6 @@ export interface ChainEvents<Rv extends RpcVersion> extends GenericChainEvents<R
|
|
|
693
693
|
**/
|
|
694
694
|
InflationParametersForceChanged: GenericPalletEvent<Rv, 'Inflation', 'InflationParametersForceChanged', null>;
|
|
695
695
|
|
|
696
|
-
/**
|
|
697
|
-
* Inflation configuration has been force changed. This will have an immediate effect from this block.
|
|
698
|
-
**/
|
|
699
|
-
InflationConfigurationForceChanged: GenericPalletEvent<
|
|
700
|
-
Rv,
|
|
701
|
-
'Inflation',
|
|
702
|
-
'InflationConfigurationForceChanged',
|
|
703
|
-
{ config: PalletInflationInflationConfiguration }
|
|
704
|
-
>;
|
|
705
|
-
|
|
706
696
|
/**
|
|
707
697
|
* Inflation recalculation has been forced.
|
|
708
698
|
**/
|
package/astar/index.d.ts
CHANGED
package/astar/query.d.ts
CHANGED
|
@@ -64,7 +64,6 @@ import type {
|
|
|
64
64
|
PalletDappStakingTiersConfiguration,
|
|
65
65
|
PalletDappStakingDAppTierRewards,
|
|
66
66
|
PalletDappStakingCleanupMarker,
|
|
67
|
-
PalletDappStakingBonusUpdateState,
|
|
68
67
|
PalletAssetsAssetDetails,
|
|
69
68
|
PalletAssetsAssetAccount,
|
|
70
69
|
PalletAssetsApproval,
|
|
@@ -1068,14 +1067,6 @@ export interface ChainStorage<Rv extends RpcVersion> extends GenericChainStorage
|
|
|
1068
1067
|
**/
|
|
1069
1068
|
safeguard: GenericStorageQuery<Rv, () => boolean>;
|
|
1070
1069
|
|
|
1071
|
-
/**
|
|
1072
|
-
* Temporary cursor to persist latest BonusStatus item updated.
|
|
1073
|
-
* TODO: remove it once all BonusStatus are updated and this storage value is cleanup.
|
|
1074
|
-
*
|
|
1075
|
-
* @param {Callback<PalletDappStakingBonusUpdateState> =} callback
|
|
1076
|
-
**/
|
|
1077
|
-
activeBonusUpdateState: GenericStorageQuery<Rv, () => PalletDappStakingBonusUpdateState>;
|
|
1078
|
-
|
|
1079
1070
|
/**
|
|
1080
1071
|
* Generic pallet storage query
|
|
1081
1072
|
**/
|
package/astar/tx.d.ts
CHANGED
|
@@ -2700,6 +2700,35 @@ export interface ChainTx<Rv extends RpcVersion> extends GenericChainTx<Rv, TxCal
|
|
|
2700
2700
|
>
|
|
2701
2701
|
>;
|
|
2702
2702
|
|
|
2703
|
+
/**
|
|
2704
|
+
* Re-adjust the existing inflation configuration using the current inflation parameters.
|
|
2705
|
+
*
|
|
2706
|
+
* It might seem similar to forcing the inflation recalculation, but it's not.
|
|
2707
|
+
* This function adjusts the existing configuration, respecting the `max_emission` value used to calculate the current inflation config.
|
|
2708
|
+
* (The 'force' approach uses the current total issuance)
|
|
2709
|
+
*
|
|
2710
|
+
* This call should be used in case inflation parameters have changed during the cycle, and the configuration should be adjusted now.
|
|
2711
|
+
*
|
|
2712
|
+
* NOTE:
|
|
2713
|
+
* The call will do the best possible approximation of what the calculated max emission was at the moment when last inflation recalculation was done.
|
|
2714
|
+
* But due to rounding losses, it's not possible to get the exact same value. As a consequence, repeated calls to this function
|
|
2715
|
+
* might result in changes to the configuration, even though the inflation parameters haven't changed.
|
|
2716
|
+
* However, since this function isn't supposed to be called often, and changes are minimal, this is acceptable.
|
|
2717
|
+
*
|
|
2718
|
+
**/
|
|
2719
|
+
forceReadjustConfig: GenericTxCall<
|
|
2720
|
+
Rv,
|
|
2721
|
+
() => ChainSubmittableExtrinsic<
|
|
2722
|
+
Rv,
|
|
2723
|
+
{
|
|
2724
|
+
pallet: 'Inflation';
|
|
2725
|
+
palletCall: {
|
|
2726
|
+
name: 'ForceReadjustConfig';
|
|
2727
|
+
};
|
|
2728
|
+
}
|
|
2729
|
+
>
|
|
2730
|
+
>;
|
|
2731
|
+
|
|
2703
2732
|
/**
|
|
2704
2733
|
* Generic pallet tx call
|
|
2705
2734
|
**/
|
|
@@ -3243,32 +3272,6 @@ export interface ChainTx<Rv extends RpcVersion> extends GenericChainTx<Rv, TxCal
|
|
|
3243
3272
|
>
|
|
3244
3273
|
>;
|
|
3245
3274
|
|
|
3246
|
-
/**
|
|
3247
|
-
* Active update `BonusStatus` according to the new MaxBonusSafeMovesPerPeriod from config
|
|
3248
|
-
* for all already existing StakerInfo in steps, consuming up to the specified amount of
|
|
3249
|
-
* weight.
|
|
3250
|
-
*
|
|
3251
|
-
* If no weight is specified, max allowed weight is used.
|
|
3252
|
-
* In any case the weight_limit is clamped between the minimum & maximum allowed values.
|
|
3253
|
-
*
|
|
3254
|
-
* TODO: remove this extrinsic once BonusStatus update is done
|
|
3255
|
-
*
|
|
3256
|
-
* @param {SpWeightsWeightV2Weight | undefined} weightLimit
|
|
3257
|
-
**/
|
|
3258
|
-
updateBonus: GenericTxCall<
|
|
3259
|
-
Rv,
|
|
3260
|
-
(weightLimit: SpWeightsWeightV2Weight | undefined) => ChainSubmittableExtrinsic<
|
|
3261
|
-
Rv,
|
|
3262
|
-
{
|
|
3263
|
-
pallet: 'DappStaking';
|
|
3264
|
-
palletCall: {
|
|
3265
|
-
name: 'UpdateBonus';
|
|
3266
|
-
params: { weightLimit: SpWeightsWeightV2Weight | undefined };
|
|
3267
|
-
};
|
|
3268
|
-
}
|
|
3269
|
-
>
|
|
3270
|
-
>;
|
|
3271
|
-
|
|
3272
3275
|
/**
|
|
3273
3276
|
* Generic pallet tx call
|
|
3274
3277
|
**/
|
package/astar/types.d.ts
CHANGED
|
@@ -546,10 +546,6 @@ export type PalletInflationEvent =
|
|
|
546
546
|
* Inflation parameters have been force changed. This will have effect on the next inflation recalculation.
|
|
547
547
|
**/
|
|
548
548
|
| { name: 'InflationParametersForceChanged' }
|
|
549
|
-
/**
|
|
550
|
-
* Inflation configuration has been force changed. This will have an immediate effect from this block.
|
|
551
|
-
**/
|
|
552
|
-
| { name: 'InflationConfigurationForceChanged'; data: { config: PalletInflationInflationConfiguration } }
|
|
553
549
|
/**
|
|
554
550
|
* Inflation recalculation has been forced.
|
|
555
551
|
**/
|
|
@@ -4690,7 +4686,23 @@ export type PalletInflationCall =
|
|
|
4690
4686
|
*
|
|
4691
4687
|
* Purpose of the call is testing & handling unforeseen circumstances.
|
|
4692
4688
|
**/
|
|
4693
|
-
| { name: 'ForceInflationRecalculation'; params: { nextEra: number } }
|
|
4689
|
+
| { name: 'ForceInflationRecalculation'; params: { nextEra: number } }
|
|
4690
|
+
/**
|
|
4691
|
+
* Re-adjust the existing inflation configuration using the current inflation parameters.
|
|
4692
|
+
*
|
|
4693
|
+
* It might seem similar to forcing the inflation recalculation, but it's not.
|
|
4694
|
+
* This function adjusts the existing configuration, respecting the `max_emission` value used to calculate the current inflation config.
|
|
4695
|
+
* (The 'force' approach uses the current total issuance)
|
|
4696
|
+
*
|
|
4697
|
+
* This call should be used in case inflation parameters have changed during the cycle, and the configuration should be adjusted now.
|
|
4698
|
+
*
|
|
4699
|
+
* NOTE:
|
|
4700
|
+
* The call will do the best possible approximation of what the calculated max emission was at the moment when last inflation recalculation was done.
|
|
4701
|
+
* But due to rounding losses, it's not possible to get the exact same value. As a consequence, repeated calls to this function
|
|
4702
|
+
* might result in changes to the configuration, even though the inflation parameters haven't changed.
|
|
4703
|
+
* However, since this function isn't supposed to be called often, and changes are minimal, this is acceptable.
|
|
4704
|
+
**/
|
|
4705
|
+
| { name: 'ForceReadjustConfig' };
|
|
4694
4706
|
|
|
4695
4707
|
export type PalletInflationCallLike =
|
|
4696
4708
|
/**
|
|
@@ -4710,7 +4722,23 @@ export type PalletInflationCallLike =
|
|
|
4710
4722
|
*
|
|
4711
4723
|
* Purpose of the call is testing & handling unforeseen circumstances.
|
|
4712
4724
|
**/
|
|
4713
|
-
| { name: 'ForceInflationRecalculation'; params: { nextEra: number } }
|
|
4725
|
+
| { name: 'ForceInflationRecalculation'; params: { nextEra: number } }
|
|
4726
|
+
/**
|
|
4727
|
+
* Re-adjust the existing inflation configuration using the current inflation parameters.
|
|
4728
|
+
*
|
|
4729
|
+
* It might seem similar to forcing the inflation recalculation, but it's not.
|
|
4730
|
+
* This function adjusts the existing configuration, respecting the `max_emission` value used to calculate the current inflation config.
|
|
4731
|
+
* (The 'force' approach uses the current total issuance)
|
|
4732
|
+
*
|
|
4733
|
+
* This call should be used in case inflation parameters have changed during the cycle, and the configuration should be adjusted now.
|
|
4734
|
+
*
|
|
4735
|
+
* NOTE:
|
|
4736
|
+
* The call will do the best possible approximation of what the calculated max emission was at the moment when last inflation recalculation was done.
|
|
4737
|
+
* But due to rounding losses, it's not possible to get the exact same value. As a consequence, repeated calls to this function
|
|
4738
|
+
* might result in changes to the configuration, even though the inflation parameters haven't changed.
|
|
4739
|
+
* However, since this function isn't supposed to be called often, and changes are minimal, this is acceptable.
|
|
4740
|
+
**/
|
|
4741
|
+
| { name: 'ForceReadjustConfig' };
|
|
4714
4742
|
|
|
4715
4743
|
export type PalletInflationInflationParameters = {
|
|
4716
4744
|
maxInflationRate: Perquintill;
|
|
@@ -4891,18 +4919,7 @@ export type PalletDappStakingCall =
|
|
|
4891
4919
|
* This is a delicate call and great care should be taken when changing these
|
|
4892
4920
|
* values since it has a significant impact on the reward system.
|
|
4893
4921
|
**/
|
|
4894
|
-
| { name: 'SetStaticTierParams'; params: { params: PalletDappStakingTierParameters } }
|
|
4895
|
-
/**
|
|
4896
|
-
* Active update `BonusStatus` according to the new MaxBonusSafeMovesPerPeriod from config
|
|
4897
|
-
* for all already existing StakerInfo in steps, consuming up to the specified amount of
|
|
4898
|
-
* weight.
|
|
4899
|
-
*
|
|
4900
|
-
* If no weight is specified, max allowed weight is used.
|
|
4901
|
-
* In any case the weight_limit is clamped between the minimum & maximum allowed values.
|
|
4902
|
-
*
|
|
4903
|
-
* TODO: remove this extrinsic once BonusStatus update is done
|
|
4904
|
-
**/
|
|
4905
|
-
| { name: 'UpdateBonus'; params: { weightLimit?: SpWeightsWeightV2Weight | undefined } };
|
|
4922
|
+
| { name: 'SetStaticTierParams'; params: { params: PalletDappStakingTierParameters } };
|
|
4906
4923
|
|
|
4907
4924
|
export type PalletDappStakingCallLike =
|
|
4908
4925
|
/**
|
|
@@ -5072,18 +5089,7 @@ export type PalletDappStakingCallLike =
|
|
|
5072
5089
|
* This is a delicate call and great care should be taken when changing these
|
|
5073
5090
|
* values since it has a significant impact on the reward system.
|
|
5074
5091
|
**/
|
|
5075
|
-
| { name: 'SetStaticTierParams'; params: { params: PalletDappStakingTierParameters } }
|
|
5076
|
-
/**
|
|
5077
|
-
* Active update `BonusStatus` according to the new MaxBonusSafeMovesPerPeriod from config
|
|
5078
|
-
* for all already existing StakerInfo in steps, consuming up to the specified amount of
|
|
5079
|
-
* weight.
|
|
5080
|
-
*
|
|
5081
|
-
* If no weight is specified, max allowed weight is used.
|
|
5082
|
-
* In any case the weight_limit is clamped between the minimum & maximum allowed values.
|
|
5083
|
-
*
|
|
5084
|
-
* TODO: remove this extrinsic once BonusStatus update is done
|
|
5085
|
-
**/
|
|
5086
|
-
| { name: 'UpdateBonus'; params: { weightLimit?: SpWeightsWeightV2Weight | undefined } };
|
|
5092
|
+
| { name: 'SetStaticTierParams'; params: { params: PalletDappStakingTierParameters } };
|
|
5087
5093
|
|
|
5088
5094
|
/**
|
|
5089
5095
|
* Contains a variant per dispatchable extrinsic that this pallet has.
|
|
@@ -10221,11 +10227,6 @@ export type AstarPrimitivesDappStakingRankedTier = number;
|
|
|
10221
10227
|
|
|
10222
10228
|
export type PalletDappStakingCleanupMarker = { eraRewardIndex: number; dappTiersIndex: number; oldestValidEra: number };
|
|
10223
10229
|
|
|
10224
|
-
export type PalletDappStakingBonusUpdateState =
|
|
10225
|
-
| { type: 'NotInProgress' }
|
|
10226
|
-
| { type: 'InProgress'; value: [AccountId32, AstarPrimitivesDappStakingSmartContract] }
|
|
10227
|
-
| { type: 'Finished' };
|
|
10228
|
-
|
|
10229
10230
|
/**
|
|
10230
10231
|
* The `Error` enum of this pallet.
|
|
10231
10232
|
**/
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dedot/chaintypes",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.73.0",
|
|
4
4
|
"description": "Types for substrate-based chains",
|
|
5
5
|
"author": "Thang X. Vu <thang@coongcrafts.io>",
|
|
6
6
|
"main": "",
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
"directory": "dist"
|
|
20
20
|
},
|
|
21
21
|
"license": "Apache-2.0",
|
|
22
|
-
"gitHead": "
|
|
22
|
+
"gitHead": "904274b4e8bb344ddd4e5dbae115d4a2fb317180",
|
|
23
23
|
"module": "./index.js",
|
|
24
24
|
"types": "./index.d.ts"
|
|
25
25
|
}
|
|
@@ -771,6 +771,40 @@ export interface ChainConsts<Rv extends RpcVersion> extends GenericChainConsts<R
|
|
|
771
771
|
**/
|
|
772
772
|
palletId: FrameSupportPalletId;
|
|
773
773
|
|
|
774
|
+
/**
|
|
775
|
+
* Generic pallet constant
|
|
776
|
+
**/
|
|
777
|
+
[name: string]: any;
|
|
778
|
+
};
|
|
779
|
+
/**
|
|
780
|
+
* Pallet `StateTrieMigration`'s constants
|
|
781
|
+
**/
|
|
782
|
+
stateTrieMigration: {
|
|
783
|
+
/**
|
|
784
|
+
* Maximal number of bytes that a key can have.
|
|
785
|
+
*
|
|
786
|
+
* FRAME itself does not limit the key length.
|
|
787
|
+
* The concrete value must therefore depend on your storage usage.
|
|
788
|
+
* A [`frame_support::storage::StorageNMap`] for example can have an arbitrary number of
|
|
789
|
+
* keys which are then hashed and concatenated, resulting in arbitrarily long keys.
|
|
790
|
+
*
|
|
791
|
+
* Use the *state migration RPC* to retrieve the length of the longest key in your
|
|
792
|
+
* storage: <https://github.com/paritytech/substrate/issues/11642>
|
|
793
|
+
*
|
|
794
|
+
* The migration will halt with a `Halted` event if this value is too small.
|
|
795
|
+
* Since there is no real penalty from over-estimating, it is advised to use a large
|
|
796
|
+
* value. The default is 512 byte.
|
|
797
|
+
*
|
|
798
|
+
* Some key lengths for reference:
|
|
799
|
+
* - [`frame_support::storage::StorageValue`]: 32 byte
|
|
800
|
+
* - [`frame_support::storage::StorageMap`]: 64 byte
|
|
801
|
+
* - [`frame_support::storage::StorageDoubleMap`]: 96 byte
|
|
802
|
+
*
|
|
803
|
+
* For more info see
|
|
804
|
+
* <https://www.shawntabrizi.com/blog/substrate/querying-substrate-storage-via-rpc/>
|
|
805
|
+
**/
|
|
806
|
+
maxKeyLen: number;
|
|
807
|
+
|
|
774
808
|
/**
|
|
775
809
|
* Generic pallet constant
|
|
776
810
|
**/
|
|
@@ -1517,6 +1517,51 @@ export interface ChainErrors<Rv extends RpcVersion> extends GenericChainErrors<R
|
|
|
1517
1517
|
**/
|
|
1518
1518
|
BelowMinimum: GenericPalletError<Rv>;
|
|
1519
1519
|
|
|
1520
|
+
/**
|
|
1521
|
+
* Generic pallet error
|
|
1522
|
+
**/
|
|
1523
|
+
[error: string]: GenericPalletError<Rv>;
|
|
1524
|
+
};
|
|
1525
|
+
/**
|
|
1526
|
+
* Pallet `StateTrieMigration`'s errors
|
|
1527
|
+
**/
|
|
1528
|
+
stateTrieMigration: {
|
|
1529
|
+
/**
|
|
1530
|
+
* Max signed limits not respected.
|
|
1531
|
+
**/
|
|
1532
|
+
MaxSignedLimits: GenericPalletError<Rv>;
|
|
1533
|
+
|
|
1534
|
+
/**
|
|
1535
|
+
* A key was longer than the configured maximum.
|
|
1536
|
+
*
|
|
1537
|
+
* This means that the migration halted at the current [`Progress`] and
|
|
1538
|
+
* can be resumed with a larger [`crate::Config::MaxKeyLen`] value.
|
|
1539
|
+
* Retrying with the same [`crate::Config::MaxKeyLen`] value will not work.
|
|
1540
|
+
* The value should only be increased to avoid a storage migration for the currently
|
|
1541
|
+
* stored [`crate::Progress::LastKey`].
|
|
1542
|
+
**/
|
|
1543
|
+
KeyTooLong: GenericPalletError<Rv>;
|
|
1544
|
+
|
|
1545
|
+
/**
|
|
1546
|
+
* submitter does not have enough funds.
|
|
1547
|
+
**/
|
|
1548
|
+
NotEnoughFunds: GenericPalletError<Rv>;
|
|
1549
|
+
|
|
1550
|
+
/**
|
|
1551
|
+
* Bad witness data provided.
|
|
1552
|
+
**/
|
|
1553
|
+
BadWitness: GenericPalletError<Rv>;
|
|
1554
|
+
|
|
1555
|
+
/**
|
|
1556
|
+
* Signed migration is not allowed because the maximum limit is not set yet.
|
|
1557
|
+
**/
|
|
1558
|
+
SignedMigrationNotAllowed: GenericPalletError<Rv>;
|
|
1559
|
+
|
|
1560
|
+
/**
|
|
1561
|
+
* Bad child root provided.
|
|
1562
|
+
**/
|
|
1563
|
+
BadChildRoot: GenericPalletError<Rv>;
|
|
1564
|
+
|
|
1520
1565
|
/**
|
|
1521
1566
|
* Generic pallet error
|
|
1522
1567
|
**/
|
|
@@ -30,6 +30,8 @@ import type {
|
|
|
30
30
|
PalletNftsAttributeNamespace,
|
|
31
31
|
PalletNftsPriceWithDirection,
|
|
32
32
|
PalletNftsPalletAttributes,
|
|
33
|
+
PalletStateTrieMigrationMigrationCompute,
|
|
34
|
+
PalletStateTrieMigrationError,
|
|
33
35
|
} from './types';
|
|
34
36
|
|
|
35
37
|
export interface ChainEvents<Rv extends RpcVersion> extends GenericChainEvents<Rv> {
|
|
@@ -2473,6 +2475,41 @@ export interface ChainEvents<Rv extends RpcVersion> extends GenericChainEvents<R
|
|
|
2473
2475
|
}
|
|
2474
2476
|
>;
|
|
2475
2477
|
|
|
2478
|
+
/**
|
|
2479
|
+
* Generic pallet event
|
|
2480
|
+
**/
|
|
2481
|
+
[prop: string]: GenericPalletEvent<Rv>;
|
|
2482
|
+
};
|
|
2483
|
+
/**
|
|
2484
|
+
* Pallet `StateTrieMigration`'s events
|
|
2485
|
+
**/
|
|
2486
|
+
stateTrieMigration: {
|
|
2487
|
+
/**
|
|
2488
|
+
* Given number of `(top, child)` keys were migrated respectively, with the given
|
|
2489
|
+
* `compute`.
|
|
2490
|
+
**/
|
|
2491
|
+
Migrated: GenericPalletEvent<
|
|
2492
|
+
Rv,
|
|
2493
|
+
'StateTrieMigration',
|
|
2494
|
+
'Migrated',
|
|
2495
|
+
{ top: number; child: number; compute: PalletStateTrieMigrationMigrationCompute }
|
|
2496
|
+
>;
|
|
2497
|
+
|
|
2498
|
+
/**
|
|
2499
|
+
* Some account got slashed by the given amount.
|
|
2500
|
+
**/
|
|
2501
|
+
Slashed: GenericPalletEvent<Rv, 'StateTrieMigration', 'Slashed', { who: AccountId32; amount: bigint }>;
|
|
2502
|
+
|
|
2503
|
+
/**
|
|
2504
|
+
* The auto migration task finished.
|
|
2505
|
+
**/
|
|
2506
|
+
AutoMigrationFinished: GenericPalletEvent<Rv, 'StateTrieMigration', 'AutoMigrationFinished', null>;
|
|
2507
|
+
|
|
2508
|
+
/**
|
|
2509
|
+
* Migration got halted due to an error or miss-configuration.
|
|
2510
|
+
**/
|
|
2511
|
+
Halted: GenericPalletEvent<Rv, 'StateTrieMigration', 'Halted', { error: PalletStateTrieMigrationError }>;
|
|
2512
|
+
|
|
2476
2513
|
/**
|
|
2477
2514
|
* Generic pallet event
|
|
2478
2515
|
**/
|
|
@@ -23,7 +23,7 @@ export interface VersionedPolkadotAssetHubApi<Rv extends RpcVersion> extends Gen
|
|
|
23
23
|
|
|
24
24
|
/**
|
|
25
25
|
* @name: PolkadotAssetHubApi
|
|
26
|
-
* @specVersion:
|
|
26
|
+
* @specVersion: 1004002
|
|
27
27
|
**/
|
|
28
28
|
export interface PolkadotAssetHubApi {
|
|
29
29
|
legacy: VersionedPolkadotAssetHubApi<RpcLegacy>;
|
|
@@ -78,6 +78,8 @@ import type {
|
|
|
78
78
|
PalletNftsItemConfig,
|
|
79
79
|
StagingXcmV4Location,
|
|
80
80
|
PalletAssetConversionPoolInfo,
|
|
81
|
+
PalletStateTrieMigrationMigrationTask,
|
|
82
|
+
PalletStateTrieMigrationMigrationLimits,
|
|
81
83
|
} from './types';
|
|
82
84
|
|
|
83
85
|
export interface ChainStorage<Rv extends RpcVersion> extends GenericChainStorage<Rv> {
|
|
@@ -1721,6 +1723,43 @@ export interface ChainStorage<Rv extends RpcVersion> extends GenericChainStorage
|
|
|
1721
1723
|
**/
|
|
1722
1724
|
nextPoolAssetId: GenericStorageQuery<Rv, () => number | undefined>;
|
|
1723
1725
|
|
|
1726
|
+
/**
|
|
1727
|
+
* Generic pallet storage query
|
|
1728
|
+
**/
|
|
1729
|
+
[storage: string]: GenericStorageQuery<Rv>;
|
|
1730
|
+
};
|
|
1731
|
+
/**
|
|
1732
|
+
* Pallet `StateTrieMigration`'s storage queries
|
|
1733
|
+
**/
|
|
1734
|
+
stateTrieMigration: {
|
|
1735
|
+
/**
|
|
1736
|
+
* Migration progress.
|
|
1737
|
+
*
|
|
1738
|
+
* This stores the snapshot of the last migrated keys. It can be set into motion and move
|
|
1739
|
+
* forward by any of the means provided by this pallet.
|
|
1740
|
+
*
|
|
1741
|
+
* @param {Callback<PalletStateTrieMigrationMigrationTask> =} callback
|
|
1742
|
+
**/
|
|
1743
|
+
migrationProcess: GenericStorageQuery<Rv, () => PalletStateTrieMigrationMigrationTask>;
|
|
1744
|
+
|
|
1745
|
+
/**
|
|
1746
|
+
* The limits that are imposed on automatic migrations.
|
|
1747
|
+
*
|
|
1748
|
+
* If set to None, then no automatic migration happens.
|
|
1749
|
+
*
|
|
1750
|
+
* @param {Callback<PalletStateTrieMigrationMigrationLimits | undefined> =} callback
|
|
1751
|
+
**/
|
|
1752
|
+
autoLimits: GenericStorageQuery<Rv, () => PalletStateTrieMigrationMigrationLimits | undefined>;
|
|
1753
|
+
|
|
1754
|
+
/**
|
|
1755
|
+
* The maximum limits that the signed migration could use.
|
|
1756
|
+
*
|
|
1757
|
+
* If not set, no signed submission is allowed.
|
|
1758
|
+
*
|
|
1759
|
+
* @param {Callback<PalletStateTrieMigrationMigrationLimits | undefined> =} callback
|
|
1760
|
+
**/
|
|
1761
|
+
signedMigrationMaxLimits: GenericStorageQuery<Rv, () => PalletStateTrieMigrationMigrationLimits | undefined>;
|
|
1762
|
+
|
|
1724
1763
|
/**
|
|
1725
1764
|
* Generic pallet storage query
|
|
1726
1765
|
**/
|
|
@@ -44,6 +44,9 @@ import type {
|
|
|
44
44
|
PalletNftsPriceWithDirection,
|
|
45
45
|
PalletNftsPreSignedMint,
|
|
46
46
|
PalletNftsPreSignedAttributes,
|
|
47
|
+
PalletStateTrieMigrationMigrationLimits,
|
|
48
|
+
PalletStateTrieMigrationMigrationTask,
|
|
49
|
+
PalletStateTrieMigrationProgress,
|
|
47
50
|
} from './types';
|
|
48
51
|
|
|
49
52
|
export type ChainSubmittableExtrinsic<
|
|
@@ -9115,6 +9118,191 @@ export interface ChainTx<Rv extends RpcVersion> extends GenericChainTx<Rv, TxCal
|
|
|
9115
9118
|
>
|
|
9116
9119
|
>;
|
|
9117
9120
|
|
|
9121
|
+
/**
|
|
9122
|
+
* Generic pallet tx call
|
|
9123
|
+
**/
|
|
9124
|
+
[callName: string]: GenericTxCall<Rv, TxCall<Rv>>;
|
|
9125
|
+
};
|
|
9126
|
+
/**
|
|
9127
|
+
* Pallet `StateTrieMigration`'s transaction calls
|
|
9128
|
+
**/
|
|
9129
|
+
stateTrieMigration: {
|
|
9130
|
+
/**
|
|
9131
|
+
* Control the automatic migration.
|
|
9132
|
+
*
|
|
9133
|
+
* The dispatch origin of this call must be [`Config::ControlOrigin`].
|
|
9134
|
+
*
|
|
9135
|
+
* @param {PalletStateTrieMigrationMigrationLimits | undefined} maybeConfig
|
|
9136
|
+
**/
|
|
9137
|
+
controlAutoMigration: GenericTxCall<
|
|
9138
|
+
Rv,
|
|
9139
|
+
(maybeConfig: PalletStateTrieMigrationMigrationLimits | undefined) => ChainSubmittableExtrinsic<
|
|
9140
|
+
Rv,
|
|
9141
|
+
{
|
|
9142
|
+
pallet: 'StateTrieMigration';
|
|
9143
|
+
palletCall: {
|
|
9144
|
+
name: 'ControlAutoMigration';
|
|
9145
|
+
params: { maybeConfig: PalletStateTrieMigrationMigrationLimits | undefined };
|
|
9146
|
+
};
|
|
9147
|
+
}
|
|
9148
|
+
>
|
|
9149
|
+
>;
|
|
9150
|
+
|
|
9151
|
+
/**
|
|
9152
|
+
* Continue the migration for the given `limits`.
|
|
9153
|
+
*
|
|
9154
|
+
* The dispatch origin of this call can be any signed account.
|
|
9155
|
+
*
|
|
9156
|
+
* This transaction has NO MONETARY INCENTIVES. calling it will not reward anyone. Albeit,
|
|
9157
|
+
* Upon successful execution, the transaction fee is returned.
|
|
9158
|
+
*
|
|
9159
|
+
* The (potentially over-estimated) of the byte length of all the data read must be
|
|
9160
|
+
* provided for up-front fee-payment and weighing. In essence, the caller is guaranteeing
|
|
9161
|
+
* that executing the current `MigrationTask` with the given `limits` will not exceed
|
|
9162
|
+
* `real_size_upper` bytes of read data.
|
|
9163
|
+
*
|
|
9164
|
+
* The `witness_task` is merely a helper to prevent the caller from being slashed or
|
|
9165
|
+
* generally trigger a migration that they do not intend. This parameter is just a message
|
|
9166
|
+
* from caller, saying that they believed `witness_task` was the last state of the
|
|
9167
|
+
* migration, and they only wish for their transaction to do anything, if this assumption
|
|
9168
|
+
* holds. In case `witness_task` does not match, the transaction fails.
|
|
9169
|
+
*
|
|
9170
|
+
* Based on the documentation of [`MigrationTask::migrate_until_exhaustion`], the
|
|
9171
|
+
* recommended way of doing this is to pass a `limit` that only bounds `count`, as the
|
|
9172
|
+
* `size` limit can always be overwritten.
|
|
9173
|
+
*
|
|
9174
|
+
* @param {PalletStateTrieMigrationMigrationLimits} limits
|
|
9175
|
+
* @param {number} realSizeUpper
|
|
9176
|
+
* @param {PalletStateTrieMigrationMigrationTask} witnessTask
|
|
9177
|
+
**/
|
|
9178
|
+
continueMigrate: GenericTxCall<
|
|
9179
|
+
Rv,
|
|
9180
|
+
(
|
|
9181
|
+
limits: PalletStateTrieMigrationMigrationLimits,
|
|
9182
|
+
realSizeUpper: number,
|
|
9183
|
+
witnessTask: PalletStateTrieMigrationMigrationTask,
|
|
9184
|
+
) => ChainSubmittableExtrinsic<
|
|
9185
|
+
Rv,
|
|
9186
|
+
{
|
|
9187
|
+
pallet: 'StateTrieMigration';
|
|
9188
|
+
palletCall: {
|
|
9189
|
+
name: 'ContinueMigrate';
|
|
9190
|
+
params: {
|
|
9191
|
+
limits: PalletStateTrieMigrationMigrationLimits;
|
|
9192
|
+
realSizeUpper: number;
|
|
9193
|
+
witnessTask: PalletStateTrieMigrationMigrationTask;
|
|
9194
|
+
};
|
|
9195
|
+
};
|
|
9196
|
+
}
|
|
9197
|
+
>
|
|
9198
|
+
>;
|
|
9199
|
+
|
|
9200
|
+
/**
|
|
9201
|
+
* Migrate the list of top keys by iterating each of them one by one.
|
|
9202
|
+
*
|
|
9203
|
+
* This does not affect the global migration process tracker ([`MigrationProcess`]), and
|
|
9204
|
+
* should only be used in case any keys are leftover due to a bug.
|
|
9205
|
+
*
|
|
9206
|
+
* @param {Array<BytesLike>} keys
|
|
9207
|
+
* @param {number} witnessSize
|
|
9208
|
+
**/
|
|
9209
|
+
migrateCustomTop: GenericTxCall<
|
|
9210
|
+
Rv,
|
|
9211
|
+
(
|
|
9212
|
+
keys: Array<BytesLike>,
|
|
9213
|
+
witnessSize: number,
|
|
9214
|
+
) => ChainSubmittableExtrinsic<
|
|
9215
|
+
Rv,
|
|
9216
|
+
{
|
|
9217
|
+
pallet: 'StateTrieMigration';
|
|
9218
|
+
palletCall: {
|
|
9219
|
+
name: 'MigrateCustomTop';
|
|
9220
|
+
params: { keys: Array<BytesLike>; witnessSize: number };
|
|
9221
|
+
};
|
|
9222
|
+
}
|
|
9223
|
+
>
|
|
9224
|
+
>;
|
|
9225
|
+
|
|
9226
|
+
/**
|
|
9227
|
+
* Migrate the list of child keys by iterating each of them one by one.
|
|
9228
|
+
*
|
|
9229
|
+
* All of the given child keys must be present under one `child_root`.
|
|
9230
|
+
*
|
|
9231
|
+
* This does not affect the global migration process tracker ([`MigrationProcess`]), and
|
|
9232
|
+
* should only be used in case any keys are leftover due to a bug.
|
|
9233
|
+
*
|
|
9234
|
+
* @param {BytesLike} root
|
|
9235
|
+
* @param {Array<BytesLike>} childKeys
|
|
9236
|
+
* @param {number} totalSize
|
|
9237
|
+
**/
|
|
9238
|
+
migrateCustomChild: GenericTxCall<
|
|
9239
|
+
Rv,
|
|
9240
|
+
(
|
|
9241
|
+
root: BytesLike,
|
|
9242
|
+
childKeys: Array<BytesLike>,
|
|
9243
|
+
totalSize: number,
|
|
9244
|
+
) => ChainSubmittableExtrinsic<
|
|
9245
|
+
Rv,
|
|
9246
|
+
{
|
|
9247
|
+
pallet: 'StateTrieMigration';
|
|
9248
|
+
palletCall: {
|
|
9249
|
+
name: 'MigrateCustomChild';
|
|
9250
|
+
params: { root: BytesLike; childKeys: Array<BytesLike>; totalSize: number };
|
|
9251
|
+
};
|
|
9252
|
+
}
|
|
9253
|
+
>
|
|
9254
|
+
>;
|
|
9255
|
+
|
|
9256
|
+
/**
|
|
9257
|
+
* Set the maximum limit of the signed migration.
|
|
9258
|
+
*
|
|
9259
|
+
* @param {PalletStateTrieMigrationMigrationLimits} limits
|
|
9260
|
+
**/
|
|
9261
|
+
setSignedMaxLimits: GenericTxCall<
|
|
9262
|
+
Rv,
|
|
9263
|
+
(limits: PalletStateTrieMigrationMigrationLimits) => ChainSubmittableExtrinsic<
|
|
9264
|
+
Rv,
|
|
9265
|
+
{
|
|
9266
|
+
pallet: 'StateTrieMigration';
|
|
9267
|
+
palletCall: {
|
|
9268
|
+
name: 'SetSignedMaxLimits';
|
|
9269
|
+
params: { limits: PalletStateTrieMigrationMigrationLimits };
|
|
9270
|
+
};
|
|
9271
|
+
}
|
|
9272
|
+
>
|
|
9273
|
+
>;
|
|
9274
|
+
|
|
9275
|
+
/**
|
|
9276
|
+
* Forcefully set the progress the running migration.
|
|
9277
|
+
*
|
|
9278
|
+
* This is only useful in one case: the next key to migrate is too big to be migrated with
|
|
9279
|
+
* a signed account, in a parachain context, and we simply want to skip it. A reasonable
|
|
9280
|
+
* example of this would be `:code:`, which is both very expensive to migrate, and commonly
|
|
9281
|
+
* used, so probably it is already migrated.
|
|
9282
|
+
*
|
|
9283
|
+
* In case you mess things up, you can also, in principle, use this to reset the migration
|
|
9284
|
+
* process.
|
|
9285
|
+
*
|
|
9286
|
+
* @param {PalletStateTrieMigrationProgress} progressTop
|
|
9287
|
+
* @param {PalletStateTrieMigrationProgress} progressChild
|
|
9288
|
+
**/
|
|
9289
|
+
forceSetProgress: GenericTxCall<
|
|
9290
|
+
Rv,
|
|
9291
|
+
(
|
|
9292
|
+
progressTop: PalletStateTrieMigrationProgress,
|
|
9293
|
+
progressChild: PalletStateTrieMigrationProgress,
|
|
9294
|
+
) => ChainSubmittableExtrinsic<
|
|
9295
|
+
Rv,
|
|
9296
|
+
{
|
|
9297
|
+
pallet: 'StateTrieMigration';
|
|
9298
|
+
palletCall: {
|
|
9299
|
+
name: 'ForceSetProgress';
|
|
9300
|
+
params: { progressTop: PalletStateTrieMigrationProgress; progressChild: PalletStateTrieMigrationProgress };
|
|
9301
|
+
};
|
|
9302
|
+
}
|
|
9303
|
+
>
|
|
9304
|
+
>;
|
|
9305
|
+
|
|
9118
9306
|
/**
|
|
9119
9307
|
* Generic pallet tx call
|
|
9120
9308
|
**/
|
|
@@ -70,7 +70,8 @@ export type AssetHubPolkadotRuntimeRuntimeEvent =
|
|
|
70
70
|
| { pallet: 'Nfts'; palletEvent: PalletNftsEvent }
|
|
71
71
|
| { pallet: 'ForeignAssets'; palletEvent: PalletAssetsEvent002 }
|
|
72
72
|
| { pallet: 'PoolAssets'; palletEvent: PalletAssetsEvent }
|
|
73
|
-
| { pallet: 'AssetConversion'; palletEvent: PalletAssetConversionEvent }
|
|
73
|
+
| { pallet: 'AssetConversion'; palletEvent: PalletAssetConversionEvent }
|
|
74
|
+
| { pallet: 'StateTrieMigration'; palletEvent: PalletStateTrieMigrationEvent };
|
|
74
75
|
|
|
75
76
|
/**
|
|
76
77
|
* Event for the System pallet.
|
|
@@ -2079,6 +2080,65 @@ export type PalletAssetConversionEvent =
|
|
|
2079
2080
|
};
|
|
2080
2081
|
};
|
|
2081
2082
|
|
|
2083
|
+
/**
|
|
2084
|
+
* Inner events of this pallet.
|
|
2085
|
+
**/
|
|
2086
|
+
export type PalletStateTrieMigrationEvent =
|
|
2087
|
+
/**
|
|
2088
|
+
* Given number of `(top, child)` keys were migrated respectively, with the given
|
|
2089
|
+
* `compute`.
|
|
2090
|
+
**/
|
|
2091
|
+
| { name: 'Migrated'; data: { top: number; child: number; compute: PalletStateTrieMigrationMigrationCompute } }
|
|
2092
|
+
/**
|
|
2093
|
+
* Some account got slashed by the given amount.
|
|
2094
|
+
**/
|
|
2095
|
+
| { name: 'Slashed'; data: { who: AccountId32; amount: bigint } }
|
|
2096
|
+
/**
|
|
2097
|
+
* The auto migration task finished.
|
|
2098
|
+
**/
|
|
2099
|
+
| { name: 'AutoMigrationFinished' }
|
|
2100
|
+
/**
|
|
2101
|
+
* Migration got halted due to an error or miss-configuration.
|
|
2102
|
+
**/
|
|
2103
|
+
| { name: 'Halted'; data: { error: PalletStateTrieMigrationError } };
|
|
2104
|
+
|
|
2105
|
+
export type PalletStateTrieMigrationMigrationCompute = 'Signed' | 'Auto';
|
|
2106
|
+
|
|
2107
|
+
/**
|
|
2108
|
+
* The `Error` enum of this pallet.
|
|
2109
|
+
**/
|
|
2110
|
+
export type PalletStateTrieMigrationError =
|
|
2111
|
+
/**
|
|
2112
|
+
* Max signed limits not respected.
|
|
2113
|
+
**/
|
|
2114
|
+
| 'MaxSignedLimits'
|
|
2115
|
+
/**
|
|
2116
|
+
* A key was longer than the configured maximum.
|
|
2117
|
+
*
|
|
2118
|
+
* This means that the migration halted at the current [`Progress`] and
|
|
2119
|
+
* can be resumed with a larger [`crate::Config::MaxKeyLen`] value.
|
|
2120
|
+
* Retrying with the same [`crate::Config::MaxKeyLen`] value will not work.
|
|
2121
|
+
* The value should only be increased to avoid a storage migration for the currently
|
|
2122
|
+
* stored [`crate::Progress::LastKey`].
|
|
2123
|
+
**/
|
|
2124
|
+
| 'KeyTooLong'
|
|
2125
|
+
/**
|
|
2126
|
+
* submitter does not have enough funds.
|
|
2127
|
+
**/
|
|
2128
|
+
| 'NotEnoughFunds'
|
|
2129
|
+
/**
|
|
2130
|
+
* Bad witness data provided.
|
|
2131
|
+
**/
|
|
2132
|
+
| 'BadWitness'
|
|
2133
|
+
/**
|
|
2134
|
+
* Signed migration is not allowed because the maximum limit is not set yet.
|
|
2135
|
+
**/
|
|
2136
|
+
| 'SignedMigrationNotAllowed'
|
|
2137
|
+
/**
|
|
2138
|
+
* Bad child root provided.
|
|
2139
|
+
**/
|
|
2140
|
+
| 'BadChildRoot';
|
|
2141
|
+
|
|
2082
2142
|
export type FrameSystemLastRuntimeUpgradeInfo = { specVersion: number; specName: string };
|
|
2083
2143
|
|
|
2084
2144
|
export type FrameSystemCodeUpgradeAuthorization = { codeHash: H256; checkVersion: boolean };
|
|
@@ -2531,7 +2591,12 @@ export type PalletBalancesReserveData = { id: FixedBytes<8>; amount: bigint };
|
|
|
2531
2591
|
|
|
2532
2592
|
export type FrameSupportTokensMiscIdAmount = { id: AssetHubPolkadotRuntimeRuntimeHoldReason; amount: bigint };
|
|
2533
2593
|
|
|
2534
|
-
export type AssetHubPolkadotRuntimeRuntimeHoldReason =
|
|
2594
|
+
export type AssetHubPolkadotRuntimeRuntimeHoldReason = {
|
|
2595
|
+
type: 'StateTrieMigration';
|
|
2596
|
+
value: PalletStateTrieMigrationHoldReason;
|
|
2597
|
+
};
|
|
2598
|
+
|
|
2599
|
+
export type PalletStateTrieMigrationHoldReason = 'SlashForMigrate';
|
|
2535
2600
|
|
|
2536
2601
|
export type FrameSupportTokensMiscIdAmount002 = { id: []; amount: bigint };
|
|
2537
2602
|
|
|
@@ -4857,7 +4922,8 @@ export type AssetHubPolkadotRuntimeRuntimeCall =
|
|
|
4857
4922
|
| { pallet: 'Nfts'; palletCall: PalletNftsCall }
|
|
4858
4923
|
| { pallet: 'ForeignAssets'; palletCall: PalletAssetsCall002 }
|
|
4859
4924
|
| { pallet: 'PoolAssets'; palletCall: PalletAssetsCall003 }
|
|
4860
|
-
| { pallet: 'AssetConversion'; palletCall: PalletAssetConversionCall }
|
|
4925
|
+
| { pallet: 'AssetConversion'; palletCall: PalletAssetConversionCall }
|
|
4926
|
+
| { pallet: 'StateTrieMigration'; palletCall: PalletStateTrieMigrationCall };
|
|
4861
4927
|
|
|
4862
4928
|
export type AssetHubPolkadotRuntimeRuntimeCallLike =
|
|
4863
4929
|
| { pallet: 'System'; palletCall: FrameSystemCallLike }
|
|
@@ -4881,7 +4947,8 @@ export type AssetHubPolkadotRuntimeRuntimeCallLike =
|
|
|
4881
4947
|
| { pallet: 'Nfts'; palletCall: PalletNftsCallLike }
|
|
4882
4948
|
| { pallet: 'ForeignAssets'; palletCall: PalletAssetsCallLike002 }
|
|
4883
4949
|
| { pallet: 'PoolAssets'; palletCall: PalletAssetsCallLike003 }
|
|
4884
|
-
| { pallet: 'AssetConversion'; palletCall: PalletAssetConversionCallLike }
|
|
4950
|
+
| { pallet: 'AssetConversion'; palletCall: PalletAssetConversionCallLike }
|
|
4951
|
+
| { pallet: 'StateTrieMigration'; palletCall: PalletStateTrieMigrationCallLike };
|
|
4885
4952
|
|
|
4886
4953
|
/**
|
|
4887
4954
|
* Contains a variant per dispatchable extrinsic that this pallet has.
|
|
@@ -11521,6 +11588,172 @@ export type PalletAssetConversionCallLike =
|
|
|
11521
11588
|
**/
|
|
11522
11589
|
| { name: 'Touch'; params: { asset1: StagingXcmV4Location; asset2: StagingXcmV4Location } };
|
|
11523
11590
|
|
|
11591
|
+
/**
|
|
11592
|
+
* Contains a variant per dispatchable extrinsic that this pallet has.
|
|
11593
|
+
**/
|
|
11594
|
+
export type PalletStateTrieMigrationCall =
|
|
11595
|
+
/**
|
|
11596
|
+
* Control the automatic migration.
|
|
11597
|
+
*
|
|
11598
|
+
* The dispatch origin of this call must be [`Config::ControlOrigin`].
|
|
11599
|
+
**/
|
|
11600
|
+
| { name: 'ControlAutoMigration'; params: { maybeConfig?: PalletStateTrieMigrationMigrationLimits | undefined } }
|
|
11601
|
+
/**
|
|
11602
|
+
* Continue the migration for the given `limits`.
|
|
11603
|
+
*
|
|
11604
|
+
* The dispatch origin of this call can be any signed account.
|
|
11605
|
+
*
|
|
11606
|
+
* This transaction has NO MONETARY INCENTIVES. calling it will not reward anyone. Albeit,
|
|
11607
|
+
* Upon successful execution, the transaction fee is returned.
|
|
11608
|
+
*
|
|
11609
|
+
* The (potentially over-estimated) of the byte length of all the data read must be
|
|
11610
|
+
* provided for up-front fee-payment and weighing. In essence, the caller is guaranteeing
|
|
11611
|
+
* that executing the current `MigrationTask` with the given `limits` will not exceed
|
|
11612
|
+
* `real_size_upper` bytes of read data.
|
|
11613
|
+
*
|
|
11614
|
+
* The `witness_task` is merely a helper to prevent the caller from being slashed or
|
|
11615
|
+
* generally trigger a migration that they do not intend. This parameter is just a message
|
|
11616
|
+
* from caller, saying that they believed `witness_task` was the last state of the
|
|
11617
|
+
* migration, and they only wish for their transaction to do anything, if this assumption
|
|
11618
|
+
* holds. In case `witness_task` does not match, the transaction fails.
|
|
11619
|
+
*
|
|
11620
|
+
* Based on the documentation of [`MigrationTask::migrate_until_exhaustion`], the
|
|
11621
|
+
* recommended way of doing this is to pass a `limit` that only bounds `count`, as the
|
|
11622
|
+
* `size` limit can always be overwritten.
|
|
11623
|
+
**/
|
|
11624
|
+
| {
|
|
11625
|
+
name: 'ContinueMigrate';
|
|
11626
|
+
params: {
|
|
11627
|
+
limits: PalletStateTrieMigrationMigrationLimits;
|
|
11628
|
+
realSizeUpper: number;
|
|
11629
|
+
witnessTask: PalletStateTrieMigrationMigrationTask;
|
|
11630
|
+
};
|
|
11631
|
+
}
|
|
11632
|
+
/**
|
|
11633
|
+
* Migrate the list of top keys by iterating each of them one by one.
|
|
11634
|
+
*
|
|
11635
|
+
* This does not affect the global migration process tracker ([`MigrationProcess`]), and
|
|
11636
|
+
* should only be used in case any keys are leftover due to a bug.
|
|
11637
|
+
**/
|
|
11638
|
+
| { name: 'MigrateCustomTop'; params: { keys: Array<Bytes>; witnessSize: number } }
|
|
11639
|
+
/**
|
|
11640
|
+
* Migrate the list of child keys by iterating each of them one by one.
|
|
11641
|
+
*
|
|
11642
|
+
* All of the given child keys must be present under one `child_root`.
|
|
11643
|
+
*
|
|
11644
|
+
* This does not affect the global migration process tracker ([`MigrationProcess`]), and
|
|
11645
|
+
* should only be used in case any keys are leftover due to a bug.
|
|
11646
|
+
**/
|
|
11647
|
+
| { name: 'MigrateCustomChild'; params: { root: Bytes; childKeys: Array<Bytes>; totalSize: number } }
|
|
11648
|
+
/**
|
|
11649
|
+
* Set the maximum limit of the signed migration.
|
|
11650
|
+
**/
|
|
11651
|
+
| { name: 'SetSignedMaxLimits'; params: { limits: PalletStateTrieMigrationMigrationLimits } }
|
|
11652
|
+
/**
|
|
11653
|
+
* Forcefully set the progress the running migration.
|
|
11654
|
+
*
|
|
11655
|
+
* This is only useful in one case: the next key to migrate is too big to be migrated with
|
|
11656
|
+
* a signed account, in a parachain context, and we simply want to skip it. A reasonable
|
|
11657
|
+
* example of this would be `:code:`, which is both very expensive to migrate, and commonly
|
|
11658
|
+
* used, so probably it is already migrated.
|
|
11659
|
+
*
|
|
11660
|
+
* In case you mess things up, you can also, in principle, use this to reset the migration
|
|
11661
|
+
* process.
|
|
11662
|
+
**/
|
|
11663
|
+
| {
|
|
11664
|
+
name: 'ForceSetProgress';
|
|
11665
|
+
params: { progressTop: PalletStateTrieMigrationProgress; progressChild: PalletStateTrieMigrationProgress };
|
|
11666
|
+
};
|
|
11667
|
+
|
|
11668
|
+
export type PalletStateTrieMigrationCallLike =
|
|
11669
|
+
/**
|
|
11670
|
+
* Control the automatic migration.
|
|
11671
|
+
*
|
|
11672
|
+
* The dispatch origin of this call must be [`Config::ControlOrigin`].
|
|
11673
|
+
**/
|
|
11674
|
+
| { name: 'ControlAutoMigration'; params: { maybeConfig?: PalletStateTrieMigrationMigrationLimits | undefined } }
|
|
11675
|
+
/**
|
|
11676
|
+
* Continue the migration for the given `limits`.
|
|
11677
|
+
*
|
|
11678
|
+
* The dispatch origin of this call can be any signed account.
|
|
11679
|
+
*
|
|
11680
|
+
* This transaction has NO MONETARY INCENTIVES. calling it will not reward anyone. Albeit,
|
|
11681
|
+
* Upon successful execution, the transaction fee is returned.
|
|
11682
|
+
*
|
|
11683
|
+
* The (potentially over-estimated) of the byte length of all the data read must be
|
|
11684
|
+
* provided for up-front fee-payment and weighing. In essence, the caller is guaranteeing
|
|
11685
|
+
* that executing the current `MigrationTask` with the given `limits` will not exceed
|
|
11686
|
+
* `real_size_upper` bytes of read data.
|
|
11687
|
+
*
|
|
11688
|
+
* The `witness_task` is merely a helper to prevent the caller from being slashed or
|
|
11689
|
+
* generally trigger a migration that they do not intend. This parameter is just a message
|
|
11690
|
+
* from caller, saying that they believed `witness_task` was the last state of the
|
|
11691
|
+
* migration, and they only wish for their transaction to do anything, if this assumption
|
|
11692
|
+
* holds. In case `witness_task` does not match, the transaction fails.
|
|
11693
|
+
*
|
|
11694
|
+
* Based on the documentation of [`MigrationTask::migrate_until_exhaustion`], the
|
|
11695
|
+
* recommended way of doing this is to pass a `limit` that only bounds `count`, as the
|
|
11696
|
+
* `size` limit can always be overwritten.
|
|
11697
|
+
**/
|
|
11698
|
+
| {
|
|
11699
|
+
name: 'ContinueMigrate';
|
|
11700
|
+
params: {
|
|
11701
|
+
limits: PalletStateTrieMigrationMigrationLimits;
|
|
11702
|
+
realSizeUpper: number;
|
|
11703
|
+
witnessTask: PalletStateTrieMigrationMigrationTask;
|
|
11704
|
+
};
|
|
11705
|
+
}
|
|
11706
|
+
/**
|
|
11707
|
+
* Migrate the list of top keys by iterating each of them one by one.
|
|
11708
|
+
*
|
|
11709
|
+
* This does not affect the global migration process tracker ([`MigrationProcess`]), and
|
|
11710
|
+
* should only be used in case any keys are leftover due to a bug.
|
|
11711
|
+
**/
|
|
11712
|
+
| { name: 'MigrateCustomTop'; params: { keys: Array<BytesLike>; witnessSize: number } }
|
|
11713
|
+
/**
|
|
11714
|
+
* Migrate the list of child keys by iterating each of them one by one.
|
|
11715
|
+
*
|
|
11716
|
+
* All of the given child keys must be present under one `child_root`.
|
|
11717
|
+
*
|
|
11718
|
+
* This does not affect the global migration process tracker ([`MigrationProcess`]), and
|
|
11719
|
+
* should only be used in case any keys are leftover due to a bug.
|
|
11720
|
+
**/
|
|
11721
|
+
| { name: 'MigrateCustomChild'; params: { root: BytesLike; childKeys: Array<BytesLike>; totalSize: number } }
|
|
11722
|
+
/**
|
|
11723
|
+
* Set the maximum limit of the signed migration.
|
|
11724
|
+
**/
|
|
11725
|
+
| { name: 'SetSignedMaxLimits'; params: { limits: PalletStateTrieMigrationMigrationLimits } }
|
|
11726
|
+
/**
|
|
11727
|
+
* Forcefully set the progress the running migration.
|
|
11728
|
+
*
|
|
11729
|
+
* This is only useful in one case: the next key to migrate is too big to be migrated with
|
|
11730
|
+
* a signed account, in a parachain context, and we simply want to skip it. A reasonable
|
|
11731
|
+
* example of this would be `:code:`, which is both very expensive to migrate, and commonly
|
|
11732
|
+
* used, so probably it is already migrated.
|
|
11733
|
+
*
|
|
11734
|
+
* In case you mess things up, you can also, in principle, use this to reset the migration
|
|
11735
|
+
* process.
|
|
11736
|
+
**/
|
|
11737
|
+
| {
|
|
11738
|
+
name: 'ForceSetProgress';
|
|
11739
|
+
params: { progressTop: PalletStateTrieMigrationProgress; progressChild: PalletStateTrieMigrationProgress };
|
|
11740
|
+
};
|
|
11741
|
+
|
|
11742
|
+
export type PalletStateTrieMigrationMigrationLimits = { size: number; item: number };
|
|
11743
|
+
|
|
11744
|
+
export type PalletStateTrieMigrationMigrationTask = {
|
|
11745
|
+
progressTop: PalletStateTrieMigrationProgress;
|
|
11746
|
+
progressChild: PalletStateTrieMigrationProgress;
|
|
11747
|
+
size: number;
|
|
11748
|
+
topItems: number;
|
|
11749
|
+
childItems: number;
|
|
11750
|
+
};
|
|
11751
|
+
|
|
11752
|
+
export type PalletStateTrieMigrationProgress =
|
|
11753
|
+
| { type: 'ToStart' }
|
|
11754
|
+
| { type: 'LastKey'; value: Bytes }
|
|
11755
|
+
| { type: 'Complete' };
|
|
11756
|
+
|
|
11524
11757
|
export type AssetHubPolkadotRuntimeOriginCaller =
|
|
11525
11758
|
| { type: 'System'; value: FrameSupportDispatchRawOrigin }
|
|
11526
11759
|
| { type: 'PolkadotXcm'; value: PalletXcmOrigin }
|
|
@@ -12377,4 +12610,5 @@ export type AssetHubPolkadotRuntimeRuntimeError =
|
|
|
12377
12610
|
| { pallet: 'Nfts'; palletError: PalletNftsError }
|
|
12378
12611
|
| { pallet: 'ForeignAssets'; palletError: PalletAssetsError }
|
|
12379
12612
|
| { pallet: 'PoolAssets'; palletError: PalletAssetsError }
|
|
12380
|
-
| { pallet: 'AssetConversion'; palletError: PalletAssetConversionError }
|
|
12613
|
+
| { pallet: 'AssetConversion'; palletError: PalletAssetConversionError }
|
|
12614
|
+
| { pallet: 'StateTrieMigration'; palletError: PalletStateTrieMigrationError };
|