@dedot/chaintypes 0.72.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dedot/chaintypes",
3
- "version": "0.72.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": "cf860568f0e7ec8b51e4469dfdc1f4666ecaa673",
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: 1004000
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 = null;
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 };