@dedot/chaintypes 0.197.0 → 0.198.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.
@@ -265,7 +265,7 @@ export interface ChainConsts extends GenericChainConsts {
265
265
  slotDuration: bigint;
266
266
 
267
267
  /**
268
- * Get the average time beetween 2 blocks in milliseconds
268
+ * Get the average time between 2 blocks in milliseconds
269
269
  **/
270
270
  blockTime: bigint;
271
271
 
@@ -343,6 +343,15 @@ export interface ChainConsts extends GenericChainConsts {
343
343
  **/
344
344
  asyncBacking: {
345
345
  /**
346
+ * The slot duration Nimbus should run with, expressed in milliseconds.
347
+ * The effective value of this type should not change while the chain is running.
348
+ **/
349
+ slotDuration: bigint;
350
+
351
+ /**
352
+ * TODO: Remove this constant once chopsticks has been updated
353
+ * - https://github.com/AcalaNetwork/chopsticks/blob/1a84b55097d2efdfaee64964b4b36af7c741d854/packages/core/src/utils/index.ts#L132
354
+ *
346
355
  * Purely informative, but used by mocking tools like chospticks to allow knowing how to mock
347
356
  * blocks
348
357
  **/
@@ -859,54 +868,6 @@ export interface ChainConsts extends GenericChainConsts {
859
868
  **/
860
869
  [name: string]: any;
861
870
  };
862
- /**
863
- * Pallet `Assets`'s constants
864
- **/
865
- assets: {
866
- /**
867
- * Max number of items to destroy per `destroy_accounts` and `destroy_approvals` call.
868
- *
869
- * Must be configured to result in a weight that makes each call fit in a block.
870
- **/
871
- removeItemsLimit: number;
872
-
873
- /**
874
- * The basic amount of funds that must be reserved for an asset.
875
- **/
876
- assetDeposit: bigint;
877
-
878
- /**
879
- * The amount of funds that must be reserved for a non-provider asset account to be
880
- * maintained.
881
- **/
882
- assetAccountDeposit: bigint;
883
-
884
- /**
885
- * The basic amount of funds that must be reserved when adding metadata to your asset.
886
- **/
887
- metadataDepositBase: bigint;
888
-
889
- /**
890
- * The additional funds that must be reserved for the number of bytes you store in your
891
- * metadata.
892
- **/
893
- metadataDepositPerByte: bigint;
894
-
895
- /**
896
- * The amount of funds that must be reserved when creating a new approval.
897
- **/
898
- approvalDeposit: bigint;
899
-
900
- /**
901
- * The maximum length of a name or symbol stored on-chain.
902
- **/
903
- stringLimit: number;
904
-
905
- /**
906
- * Generic pallet constant
907
- **/
908
- [name: string]: any;
909
- };
910
871
  /**
911
872
  * Pallet `XcmTransactor`'s constants
912
873
  **/
@@ -229,6 +229,7 @@ export interface ChainErrors extends GenericChainErrors {
229
229
  CannotSetAboveMaxCandidates: GenericPalletError;
230
230
  MarkingOfflineNotEnabled: GenericPalletError;
231
231
  CurrentRoundTooLow: GenericPalletError;
232
+ EmptyMigrationBatch: GenericPalletError;
232
233
 
233
234
  /**
234
235
  * Generic pallet error
@@ -1541,133 +1542,6 @@ export interface ChainErrors extends GenericChainErrors {
1541
1542
  **/
1542
1543
  [error: string]: GenericPalletError;
1543
1544
  };
1544
- /**
1545
- * Pallet `Assets`'s errors
1546
- **/
1547
- assets: {
1548
- /**
1549
- * Account balance must be greater than or equal to the transfer amount.
1550
- **/
1551
- BalanceLow: GenericPalletError;
1552
-
1553
- /**
1554
- * The account to alter does not exist.
1555
- **/
1556
- NoAccount: GenericPalletError;
1557
-
1558
- /**
1559
- * The signing account has no permission to do the operation.
1560
- **/
1561
- NoPermission: GenericPalletError;
1562
-
1563
- /**
1564
- * The given asset ID is unknown.
1565
- **/
1566
- Unknown: GenericPalletError;
1567
-
1568
- /**
1569
- * The origin account is frozen.
1570
- **/
1571
- Frozen: GenericPalletError;
1572
-
1573
- /**
1574
- * The asset ID is already taken.
1575
- **/
1576
- InUse: GenericPalletError;
1577
-
1578
- /**
1579
- * Invalid witness data given.
1580
- **/
1581
- BadWitness: GenericPalletError;
1582
-
1583
- /**
1584
- * Minimum balance should be non-zero.
1585
- **/
1586
- MinBalanceZero: GenericPalletError;
1587
-
1588
- /**
1589
- * Unable to increment the consumer reference counters on the account. Either no provider
1590
- * reference exists to allow a non-zero balance of a non-self-sufficient asset, or one
1591
- * fewer then the maximum number of consumers has been reached.
1592
- **/
1593
- UnavailableConsumer: GenericPalletError;
1594
-
1595
- /**
1596
- * Invalid metadata given.
1597
- **/
1598
- BadMetadata: GenericPalletError;
1599
-
1600
- /**
1601
- * No approval exists that would allow the transfer.
1602
- **/
1603
- Unapproved: GenericPalletError;
1604
-
1605
- /**
1606
- * The source account would not survive the transfer and it needs to stay alive.
1607
- **/
1608
- WouldDie: GenericPalletError;
1609
-
1610
- /**
1611
- * The asset-account already exists.
1612
- **/
1613
- AlreadyExists: GenericPalletError;
1614
-
1615
- /**
1616
- * The asset-account doesn't have an associated deposit.
1617
- **/
1618
- NoDeposit: GenericPalletError;
1619
-
1620
- /**
1621
- * The operation would result in funds being burned.
1622
- **/
1623
- WouldBurn: GenericPalletError;
1624
-
1625
- /**
1626
- * The asset is a live asset and is actively being used. Usually emit for operations such
1627
- * as `start_destroy` which require the asset to be in a destroying state.
1628
- **/
1629
- LiveAsset: GenericPalletError;
1630
-
1631
- /**
1632
- * The asset is not live, and likely being destroyed.
1633
- **/
1634
- AssetNotLive: GenericPalletError;
1635
-
1636
- /**
1637
- * The asset status is not the expected status.
1638
- **/
1639
- IncorrectStatus: GenericPalletError;
1640
-
1641
- /**
1642
- * The asset should be frozen before the given operation.
1643
- **/
1644
- NotFrozen: GenericPalletError;
1645
-
1646
- /**
1647
- * Callback action resulted in error
1648
- **/
1649
- CallbackFailed: GenericPalletError;
1650
-
1651
- /**
1652
- * The asset ID must be equal to the [`NextAssetId`].
1653
- **/
1654
- BadAssetId: GenericPalletError;
1655
-
1656
- /**
1657
- * The asset cannot be destroyed because some accounts for this asset contain freezes.
1658
- **/
1659
- ContainsFreezes: GenericPalletError;
1660
-
1661
- /**
1662
- * The asset cannot be destroyed because some accounts for this asset contain holds.
1663
- **/
1664
- ContainsHolds: GenericPalletError;
1665
-
1666
- /**
1667
- * Generic pallet error
1668
- **/
1669
- [error: string]: GenericPalletError;
1670
- };
1671
1545
  /**
1672
1546
  * Pallet `XcmTransactor`'s errors
1673
1547
  **/
@@ -2353,182 +2353,6 @@ export interface ChainEvents extends GenericChainEvents {
2353
2353
  **/
2354
2354
  [prop: string]: GenericPalletEvent;
2355
2355
  };
2356
- /**
2357
- * Pallet `Assets`'s events
2358
- **/
2359
- assets: {
2360
- /**
2361
- * Some asset class was created.
2362
- **/
2363
- Created: GenericPalletEvent<'Assets', 'Created', { assetId: bigint; creator: AccountId20; owner: AccountId20 }>;
2364
-
2365
- /**
2366
- * Some assets were issued.
2367
- **/
2368
- Issued: GenericPalletEvent<'Assets', 'Issued', { assetId: bigint; owner: AccountId20; amount: bigint }>;
2369
-
2370
- /**
2371
- * Some assets were transferred.
2372
- **/
2373
- Transferred: GenericPalletEvent<
2374
- 'Assets',
2375
- 'Transferred',
2376
- { assetId: bigint; from: AccountId20; to: AccountId20; amount: bigint }
2377
- >;
2378
-
2379
- /**
2380
- * Some assets were destroyed.
2381
- **/
2382
- Burned: GenericPalletEvent<'Assets', 'Burned', { assetId: bigint; owner: AccountId20; balance: bigint }>;
2383
-
2384
- /**
2385
- * The management team changed.
2386
- **/
2387
- TeamChanged: GenericPalletEvent<
2388
- 'Assets',
2389
- 'TeamChanged',
2390
- { assetId: bigint; issuer: AccountId20; admin: AccountId20; freezer: AccountId20 }
2391
- >;
2392
-
2393
- /**
2394
- * The owner changed.
2395
- **/
2396
- OwnerChanged: GenericPalletEvent<'Assets', 'OwnerChanged', { assetId: bigint; owner: AccountId20 }>;
2397
-
2398
- /**
2399
- * Some account `who` was frozen.
2400
- **/
2401
- Frozen: GenericPalletEvent<'Assets', 'Frozen', { assetId: bigint; who: AccountId20 }>;
2402
-
2403
- /**
2404
- * Some account `who` was thawed.
2405
- **/
2406
- Thawed: GenericPalletEvent<'Assets', 'Thawed', { assetId: bigint; who: AccountId20 }>;
2407
-
2408
- /**
2409
- * Some asset `asset_id` was frozen.
2410
- **/
2411
- AssetFrozen: GenericPalletEvent<'Assets', 'AssetFrozen', { assetId: bigint }>;
2412
-
2413
- /**
2414
- * Some asset `asset_id` was thawed.
2415
- **/
2416
- AssetThawed: GenericPalletEvent<'Assets', 'AssetThawed', { assetId: bigint }>;
2417
-
2418
- /**
2419
- * Accounts were destroyed for given asset.
2420
- **/
2421
- AccountsDestroyed: GenericPalletEvent<
2422
- 'Assets',
2423
- 'AccountsDestroyed',
2424
- { assetId: bigint; accountsDestroyed: number; accountsRemaining: number }
2425
- >;
2426
-
2427
- /**
2428
- * Approvals were destroyed for given asset.
2429
- **/
2430
- ApprovalsDestroyed: GenericPalletEvent<
2431
- 'Assets',
2432
- 'ApprovalsDestroyed',
2433
- { assetId: bigint; approvalsDestroyed: number; approvalsRemaining: number }
2434
- >;
2435
-
2436
- /**
2437
- * An asset class is in the process of being destroyed.
2438
- **/
2439
- DestructionStarted: GenericPalletEvent<'Assets', 'DestructionStarted', { assetId: bigint }>;
2440
-
2441
- /**
2442
- * An asset class was destroyed.
2443
- **/
2444
- Destroyed: GenericPalletEvent<'Assets', 'Destroyed', { assetId: bigint }>;
2445
-
2446
- /**
2447
- * Some asset class was force-created.
2448
- **/
2449
- ForceCreated: GenericPalletEvent<'Assets', 'ForceCreated', { assetId: bigint; owner: AccountId20 }>;
2450
-
2451
- /**
2452
- * New metadata has been set for an asset.
2453
- **/
2454
- MetadataSet: GenericPalletEvent<
2455
- 'Assets',
2456
- 'MetadataSet',
2457
- { assetId: bigint; name: Bytes; symbol: Bytes; decimals: number; isFrozen: boolean }
2458
- >;
2459
-
2460
- /**
2461
- * Metadata has been cleared for an asset.
2462
- **/
2463
- MetadataCleared: GenericPalletEvent<'Assets', 'MetadataCleared', { assetId: bigint }>;
2464
-
2465
- /**
2466
- * (Additional) funds have been approved for transfer to a destination account.
2467
- **/
2468
- ApprovedTransfer: GenericPalletEvent<
2469
- 'Assets',
2470
- 'ApprovedTransfer',
2471
- { assetId: bigint; source: AccountId20; delegate: AccountId20; amount: bigint }
2472
- >;
2473
-
2474
- /**
2475
- * An approval for account `delegate` was cancelled by `owner`.
2476
- **/
2477
- ApprovalCancelled: GenericPalletEvent<
2478
- 'Assets',
2479
- 'ApprovalCancelled',
2480
- { assetId: bigint; owner: AccountId20; delegate: AccountId20 }
2481
- >;
2482
-
2483
- /**
2484
- * An `amount` was transferred in its entirety from `owner` to `destination` by
2485
- * the approved `delegate`.
2486
- **/
2487
- TransferredApproved: GenericPalletEvent<
2488
- 'Assets',
2489
- 'TransferredApproved',
2490
- { assetId: bigint; owner: AccountId20; delegate: AccountId20; destination: AccountId20; amount: bigint }
2491
- >;
2492
-
2493
- /**
2494
- * An asset has had its attributes changed by the `Force` origin.
2495
- **/
2496
- AssetStatusChanged: GenericPalletEvent<'Assets', 'AssetStatusChanged', { assetId: bigint }>;
2497
-
2498
- /**
2499
- * The min_balance of an asset has been updated by the asset owner.
2500
- **/
2501
- AssetMinBalanceChanged: GenericPalletEvent<
2502
- 'Assets',
2503
- 'AssetMinBalanceChanged',
2504
- { assetId: bigint; newMinBalance: bigint }
2505
- >;
2506
-
2507
- /**
2508
- * Some account `who` was created with a deposit from `depositor`.
2509
- **/
2510
- Touched: GenericPalletEvent<'Assets', 'Touched', { assetId: bigint; who: AccountId20; depositor: AccountId20 }>;
2511
-
2512
- /**
2513
- * Some account `who` was blocked.
2514
- **/
2515
- Blocked: GenericPalletEvent<'Assets', 'Blocked', { assetId: bigint; who: AccountId20 }>;
2516
-
2517
- /**
2518
- * Some assets were deposited (e.g. for transaction fees).
2519
- **/
2520
- Deposited: GenericPalletEvent<'Assets', 'Deposited', { assetId: bigint; who: AccountId20; amount: bigint }>;
2521
-
2522
- /**
2523
- * Some assets were withdrawn from the account (e.g. for transaction fees).
2524
- **/
2525
- Withdrawn: GenericPalletEvent<'Assets', 'Withdrawn', { assetId: bigint; who: AccountId20; amount: bigint }>;
2526
-
2527
- /**
2528
- * Generic pallet event
2529
- **/
2530
- [prop: string]: GenericPalletEvent;
2531
- };
2532
2356
  /**
2533
2357
  * Pallet `XcmTransactor`'s events
2534
2358
  **/
@@ -51,7 +51,7 @@ interface ChainKnownTypes extends GenericChainKnownTypes {
51
51
 
52
52
  /**
53
53
  * @name: MoonbeamApi
54
- * @specVersion: 3901
54
+ * @specVersion: 4001
55
55
  **/
56
56
  export interface MoonbeamApi extends GenericSubstrateApi {
57
57
  rpc: ChainJsonRpcApis;
@@ -39,7 +39,7 @@ import type {
39
39
  PalletBalancesBalanceLock,
40
40
  PalletBalancesReserveData,
41
41
  FrameSupportTokensMiscIdAmount,
42
- FrameSupportTokensMiscIdAmount002,
42
+ FrameSupportTokensMiscIdAmountRuntimeFreezeReason,
43
43
  PalletTransactionPaymentReleases,
44
44
  PalletParachainStakingInflationDistributionConfig,
45
45
  PalletParachainStakingRoundInfo,
@@ -92,10 +92,6 @@ import type {
92
92
  XcmVersionedAssetId,
93
93
  StagingXcmV5Xcm,
94
94
  PalletXcmAuthorizedAliasesEntry,
95
- PalletAssetsAssetDetails,
96
- PalletAssetsAssetAccount,
97
- PalletAssetsApproval,
98
- PalletAssetsAssetMetadata,
99
95
  PalletXcmTransactorRemoteTransactInfoWithMaxWeight,
100
96
  StagingXcmV5Location,
101
97
  PalletXcmTransactorRelayIndicesRelayChainIndices,
@@ -674,9 +670,12 @@ export interface ChainStorage extends GenericChainStorage {
674
670
  * Freeze locks on account balances.
675
671
  *
676
672
  * @param {AccountId20Like} arg
677
- * @param {Callback<Array<FrameSupportTokensMiscIdAmount002>> =} callback
673
+ * @param {Callback<Array<FrameSupportTokensMiscIdAmountRuntimeFreezeReason>> =} callback
678
674
  **/
679
- freezes: GenericStorageQuery<(arg: AccountId20Like) => Array<FrameSupportTokensMiscIdAmount002>, AccountId20>;
675
+ freezes: GenericStorageQuery<
676
+ (arg: AccountId20Like) => Array<FrameSupportTokensMiscIdAmountRuntimeFreezeReason>,
677
+ AccountId20
678
+ >;
680
679
 
681
680
  /**
682
681
  * Generic pallet storage query
@@ -884,6 +883,24 @@ export interface ChainStorage extends GenericChainStorage {
884
883
  **/
885
884
  enableMarkingOffline: GenericStorageQuery<() => boolean>;
886
885
 
886
+ /**
887
+ * Temporary storage to track candidates that have been migrated from locks to freezes.
888
+ * This storage should be removed after all accounts have been migrated.
889
+ *
890
+ * @param {AccountId20Like} arg
891
+ * @param {Callback<[] | undefined> =} callback
892
+ **/
893
+ migratedCandidates: GenericStorageQuery<(arg: AccountId20Like) => [] | undefined, AccountId20>;
894
+
895
+ /**
896
+ * Temporary storage to track delegators that have been migrated from locks to freezes.
897
+ * This storage should be removed after all accounts have been migrated.
898
+ *
899
+ * @param {AccountId20Like} arg
900
+ * @param {Callback<[] | undefined> =} callback
901
+ **/
902
+ migratedDelegators: GenericStorageQuery<(arg: AccountId20Like) => [] | undefined, AccountId20>;
903
+
887
904
  /**
888
905
  * Generic pallet storage query
889
906
  **/
@@ -1051,9 +1068,10 @@ export interface ChainStorage extends GenericChainStorage {
1051
1068
  **/
1052
1069
  asyncBacking: {
1053
1070
  /**
1054
- * First tuple element is the highest slot that has been seen in the history of this chain.
1055
- * Second tuple element is the number of authored blocks so far.
1056
- * This is a strictly-increasing value if T::AllowMultipleBlocksPerSlot = false.
1071
+ * Current relay chain slot paired with a number of authored blocks.
1072
+ *
1073
+ * This is updated in [`FixedVelocityConsensusHook::on_state_proof`] with the current relay
1074
+ * chain slot as provided by the relay chain state proof.
1057
1075
  *
1058
1076
  * @param {Callback<[SpConsensusSlotsSlot, number] | undefined> =} callback
1059
1077
  **/
@@ -2053,70 +2071,6 @@ export interface ChainStorage extends GenericChainStorage {
2053
2071
  **/
2054
2072
  [storage: string]: GenericStorageQuery;
2055
2073
  };
2056
- /**
2057
- * Pallet `Assets`'s storage queries
2058
- **/
2059
- assets: {
2060
- /**
2061
- * Details of an asset.
2062
- *
2063
- * @param {bigint} arg
2064
- * @param {Callback<PalletAssetsAssetDetails | undefined> =} callback
2065
- **/
2066
- asset: GenericStorageQuery<(arg: bigint) => PalletAssetsAssetDetails | undefined, bigint>;
2067
-
2068
- /**
2069
- * The holdings of a specific account for a specific asset.
2070
- *
2071
- * @param {[bigint, AccountId20Like]} arg
2072
- * @param {Callback<PalletAssetsAssetAccount | undefined> =} callback
2073
- **/
2074
- account: GenericStorageQuery<
2075
- (arg: [bigint, AccountId20Like]) => PalletAssetsAssetAccount | undefined,
2076
- [bigint, AccountId20]
2077
- >;
2078
-
2079
- /**
2080
- * Approved balance transfers. First balance is the amount approved for transfer. Second
2081
- * is the amount of `T::Currency` reserved for storing this.
2082
- * First key is the asset ID, second key is the owner and third key is the delegate.
2083
- *
2084
- * @param {[bigint, AccountId20Like, AccountId20Like]} arg
2085
- * @param {Callback<PalletAssetsApproval | undefined> =} callback
2086
- **/
2087
- approvals: GenericStorageQuery<
2088
- (arg: [bigint, AccountId20Like, AccountId20Like]) => PalletAssetsApproval | undefined,
2089
- [bigint, AccountId20, AccountId20]
2090
- >;
2091
-
2092
- /**
2093
- * Metadata of an asset.
2094
- *
2095
- * @param {bigint} arg
2096
- * @param {Callback<PalletAssetsAssetMetadata> =} callback
2097
- **/
2098
- metadata: GenericStorageQuery<(arg: bigint) => PalletAssetsAssetMetadata, bigint>;
2099
-
2100
- /**
2101
- * The asset ID enforced for the next asset creation, if any present. Otherwise, this storage
2102
- * item has no effect.
2103
- *
2104
- * This can be useful for setting up constraints for IDs of the new assets. For example, by
2105
- * providing an initial [`NextAssetId`] and using the [`crate::AutoIncAssetId`] callback, an
2106
- * auto-increment model can be applied to all new asset IDs.
2107
- *
2108
- * The initial next asset ID can be set using the [`GenesisConfig`] or the
2109
- * [SetNextAssetId](`migration::next_asset_id::SetNextAssetId`) migration.
2110
- *
2111
- * @param {Callback<bigint | undefined> =} callback
2112
- **/
2113
- nextAssetId: GenericStorageQuery<() => bigint | undefined>;
2114
-
2115
- /**
2116
- * Generic pallet storage query
2117
- **/
2118
- [storage: string]: GenericStorageQuery;
2119
- };
2120
2074
  /**
2121
2075
  * Pallet `XcmTransactor`'s storage queries
2122
2076
  **/