@dedot/chaintypes 0.270.0 → 0.271.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.
@@ -1889,6 +1889,11 @@ export interface ChainErrors extends GenericChainErrors {
1889
1889
  **/
1890
1890
  BelowMinimum: GenericPalletError;
1891
1891
 
1892
+ /**
1893
+ * The pool exists but has no liquidity (at least one of the reserves is zero).
1894
+ **/
1895
+ PoolEmpty: GenericPalletError;
1896
+
1892
1897
  /**
1893
1898
  * Generic pallet error
1894
1899
  **/
@@ -2402,7 +2407,7 @@ export interface ChainErrors extends GenericChainErrors {
2402
2407
  UnsupportedAsset: GenericPalletError;
2403
2408
 
2404
2409
  /**
2405
- * Mint would exceed system-wide maximum pUSD issuance.
2410
+ * Mint would exceed system-wide maximum internal issuance.
2406
2411
  **/
2407
2412
  ExceedsMaxIssuance: GenericPalletError;
2408
2413
 
@@ -2411,6 +2416,11 @@ export interface ChainErrors extends GenericChainErrors {
2411
2416
  **/
2412
2417
  AssetAlreadyApproved: GenericPalletError;
2413
2418
 
2419
+ /**
2420
+ * Asset does not exist.
2421
+ **/
2422
+ AssetDoesNotExist: GenericPalletError;
2423
+
2414
2424
  /**
2415
2425
  * Cannot remove asset: not in approved list.
2416
2426
  **/
@@ -2432,10 +2442,25 @@ export interface ChainErrors extends GenericChainErrors {
2432
2442
  TooManyAssets: GenericPalletError;
2433
2443
 
2434
2444
  /**
2435
- * External asset decimals do not match the stable asset decimals.
2445
+ * Live decimals diverged from the snapshot taken at registration or genesis.
2436
2446
  **/
2437
2447
  DecimalsMismatch: GenericPalletError;
2438
2448
 
2449
+ /**
2450
+ * The asset's decimal precision is outside the supported range.
2451
+ **/
2452
+ DecimalsRangeExceeded: GenericPalletError;
2453
+
2454
+ /**
2455
+ * Decimal scaling produced an arithmetic overflow.
2456
+ **/
2457
+ ConversionOverflow: GenericPalletError;
2458
+
2459
+ /**
2460
+ * Conversion to the counter-asset rounds to zero; swap would transfer nothing.
2461
+ **/
2462
+ AmountTooSmallAfterConversion: GenericPalletError;
2463
+
2439
2464
  /**
2440
2465
  * An unexpected invariant violation occurred. This should be reported.
2441
2466
  **/
@@ -2687,9 +2712,9 @@ export interface ChainErrors extends GenericChainErrors {
2687
2712
  CommissionTooHigh: GenericPalletError;
2688
2713
 
2689
2714
  /**
2690
- * Era has no reward pot but legacy minting is disabled.
2715
+ * Optimum self-stake cannot be greater than hard cap.
2691
2716
  **/
2692
- LegacyMintingDisabled: GenericPalletError;
2717
+ OptimumGreaterThanCap: GenericPalletError;
2693
2718
 
2694
2719
  /**
2695
2720
  * Generic pallet error
@@ -3,8 +3,8 @@
3
3
  import type { GenericChainEvents, GenericPalletEvent } from 'dedot/types';
4
4
  import type {
5
5
  DispatchError,
6
- AccountId32,
7
6
  H256,
7
+ AccountId32,
8
8
  FixedBytes,
9
9
  Bytes,
10
10
  Result,
@@ -85,9 +85,9 @@ export interface ChainEvents extends GenericChainEvents {
85
85
  >;
86
86
 
87
87
  /**
88
- * `:code` was updated.
88
+ * `:code` was updated to the code with the given hash.
89
89
  **/
90
- CodeUpdated: GenericPalletEvent<'System', 'CodeUpdated', null>;
90
+ CodeUpdated: GenericPalletEvent<'System', 'CodeUpdated', { hash: H256 }>;
91
91
 
92
92
  /**
93
93
  * A new account was created.
@@ -729,6 +729,21 @@ export interface ChainEvents extends GenericChainEvents {
729
729
  **/
730
730
  [prop: string]: GenericPalletEvent;
731
731
  };
732
+ /**
733
+ * Pallet `PgasAllowance`'s events
734
+ **/
735
+ pgasAllowance: {
736
+ /**
737
+ * A transaction fee `actual_fee` has been paid by `who` in PGAS and burned. Mirrors
738
+ * [`pallet_transaction_payment::Event::TransactionFeePaid`].
739
+ **/
740
+ PgasFeePaid: GenericPalletEvent<'PgasAllowance', 'PGASFeePaid', { who: AccountId32; actualFee: bigint }>;
741
+
742
+ /**
743
+ * Generic pallet event
744
+ **/
745
+ [prop: string]: GenericPalletEvent;
746
+ };
732
747
  /**
733
748
  * Pallet `CollatorSelection`'s events
734
749
  **/
@@ -3387,21 +3402,21 @@ export interface ChainEvents extends GenericChainEvents {
3387
3402
  **/
3388
3403
  psm: {
3389
3404
  /**
3390
- * User swapped external stablecoin for pUSD.
3405
+ * User swapped external stablecoin for internal.
3391
3406
  **/
3392
3407
  Minted: GenericPalletEvent<
3393
3408
  'Psm',
3394
3409
  'Minted',
3395
- { who: AccountId32; assetId: number; externalAmount: bigint; pusdReceived: bigint; fee: bigint }
3410
+ { who: AccountId32; assetId: StagingXcmV5Location; externalAmount: bigint; received: bigint; fee: bigint }
3396
3411
  >;
3397
3412
 
3398
3413
  /**
3399
- * User swapped pUSD for external stablecoin.
3414
+ * User swapped internal for external stablecoin.
3400
3415
  **/
3401
3416
  Redeemed: GenericPalletEvent<
3402
3417
  'Psm',
3403
3418
  'Redeemed',
3404
- { who: AccountId32; assetId: number; pusdPaid: bigint; externalReceived: bigint; fee: bigint }
3419
+ { who: AccountId32; assetId: StagingXcmV5Location; paid: bigint; externalReceived: bigint; fee: bigint }
3405
3420
  >;
3406
3421
 
3407
3422
  /**
@@ -3410,7 +3425,7 @@ export interface ChainEvents extends GenericChainEvents {
3410
3425
  MintingFeeUpdated: GenericPalletEvent<
3411
3426
  'Psm',
3412
3427
  'MintingFeeUpdated',
3413
- { assetId: number; oldValue: Permill; newValue: Permill }
3428
+ { assetId: StagingXcmV5Location; oldValue: Permill; newValue: Permill }
3414
3429
  >;
3415
3430
 
3416
3431
  /**
@@ -3419,7 +3434,7 @@ export interface ChainEvents extends GenericChainEvents {
3419
3434
  RedemptionFeeUpdated: GenericPalletEvent<
3420
3435
  'Psm',
3421
3436
  'RedemptionFeeUpdated',
3422
- { assetId: number; oldValue: Permill; newValue: Permill }
3437
+ { assetId: StagingXcmV5Location; oldValue: Permill; newValue: Permill }
3423
3438
  >;
3424
3439
 
3425
3440
  /**
@@ -3437,7 +3452,7 @@ export interface ChainEvents extends GenericChainEvents {
3437
3452
  AssetCeilingWeightUpdated: GenericPalletEvent<
3438
3453
  'Psm',
3439
3454
  'AssetCeilingWeightUpdated',
3440
- { assetId: number; oldValue: Permill; newValue: Permill }
3455
+ { assetId: StagingXcmV5Location; oldValue: Permill; newValue: Permill }
3441
3456
  >;
3442
3457
 
3443
3458
  /**
@@ -3446,18 +3461,18 @@ export interface ChainEvents extends GenericChainEvents {
3446
3461
  AssetStatusUpdated: GenericPalletEvent<
3447
3462
  'Psm',
3448
3463
  'AssetStatusUpdated',
3449
- { assetId: number; status: PalletPsmCircuitBreakerLevel }
3464
+ { assetId: StagingXcmV5Location; status: PalletPsmCircuitBreakerLevel }
3450
3465
  >;
3451
3466
 
3452
3467
  /**
3453
3468
  * An external asset was added to the approved list.
3454
3469
  **/
3455
- ExternalAssetAdded: GenericPalletEvent<'Psm', 'ExternalAssetAdded', { assetId: number }>;
3470
+ ExternalAssetAdded: GenericPalletEvent<'Psm', 'ExternalAssetAdded', { assetId: StagingXcmV5Location }>;
3456
3471
 
3457
3472
  /**
3458
3473
  * An external asset was removed from the approved list.
3459
3474
  **/
3460
- ExternalAssetRemoved: GenericPalletEvent<'Psm', 'ExternalAssetRemoved', { assetId: number }>;
3475
+ ExternalAssetRemoved: GenericPalletEvent<'Psm', 'ExternalAssetRemoved', { assetId: StagingXcmV5Location }>;
3461
3476
 
3462
3477
  /**
3463
3478
  * Generic pallet event
@@ -3679,6 +3694,24 @@ export interface ChainEvents extends GenericChainEvents {
3679
3694
  **/
3680
3695
  EraPruned: GenericPalletEvent<'Staking', 'EraPruned', { index: number }>;
3681
3696
 
3697
+ /**
3698
+ * The validator has been paid their self-stake incentive bonus.
3699
+ **/
3700
+ ValidatorIncentivePaid: GenericPalletEvent<
3701
+ 'Staking',
3702
+ 'ValidatorIncentivePaid',
3703
+ { era: number; validatorStash: AccountId32; dest: PalletStakingAsyncRewardDestination; amount: bigint }
3704
+ >;
3705
+
3706
+ /**
3707
+ * Validator self-stake incentive configuration has been updated.
3708
+ **/
3709
+ ValidatorIncentiveConfigSet: GenericPalletEvent<
3710
+ 'Staking',
3711
+ 'ValidatorIncentiveConfigSet',
3712
+ { optimumSelfStake: bigint; hardCapSelfStake: bigint; slopeFactor: Perbill }
3713
+ >;
3714
+
3682
3715
  /**
3683
3716
  * Generic pallet event
3684
3717
  **/
@@ -4808,6 +4841,20 @@ export interface ChainEvents extends GenericChainEvents {
4808
4841
  }
4809
4842
  >;
4810
4843
 
4844
+ /**
4845
+ * Funds were drained from the staging account into the DAP buffer.
4846
+ **/
4847
+ StagingDrained: GenericPalletEvent<
4848
+ 'Dap',
4849
+ 'StagingDrained',
4850
+ {
4851
+ /**
4852
+ * Amount drained.
4853
+ **/
4854
+ amount: bigint;
4855
+ }
4856
+ >;
4857
+
4811
4858
  /**
4812
4859
  * An unexpected/defensive event was triggered.
4813
4860
  **/
@@ -54,7 +54,7 @@ interface ChainKnownTypes extends GenericChainKnownTypes {
54
54
 
55
55
  /**
56
56
  * @name: WestendAssetHubApi
57
- * @specVersion: 1022004
57
+ * @specVersion: 1022005
58
58
  **/
59
59
  export interface WestendAssetHubApi extends GenericSubstrateApi {
60
60
  rpc: ChainJsonRpcApis;
@@ -584,6 +584,13 @@ export interface ChainStorage extends GenericChainStorage {
584
584
  **/
585
585
  pendingUpwardSignals: GenericStorageQuery<() => Array<Bytes>>;
586
586
 
587
+ /**
588
+ * The approved peer id to be sent as a UMP signal on the last block of the PoV.
589
+ *
590
+ * @param {Callback<Bytes | undefined> =} callback
591
+ **/
592
+ pendingApprovedPeer: GenericStorageQuery<() => Bytes | undefined>;
593
+
587
594
  /**
588
595
  * The factor to multiply the base delivery fee by for UMP.
589
596
  *
@@ -2417,28 +2424,28 @@ export interface ChainStorage extends GenericChainStorage {
2417
2424
  **/
2418
2425
  psm: {
2419
2426
  /**
2420
- * pUSD minted through PSM per external asset.
2427
+ * internal minted through PSM per external asset, denominated in internal units.
2421
2428
  *
2422
- * @param {number} arg
2429
+ * @param {StagingXcmV5Location} arg
2423
2430
  * @param {Callback<bigint> =} callback
2424
2431
  **/
2425
- psmDebt: GenericStorageQuery<(arg: number) => bigint, number>;
2432
+ psmDebt: GenericStorageQuery<(arg: StagingXcmV5Location) => bigint, StagingXcmV5Location>;
2426
2433
 
2427
2434
  /**
2428
- * Fee for external → pUSD swaps (minting) per asset. Suggested value is 0.5%.
2435
+ * Fee for external → internal swaps (minting) per asset. Suggested value is 0.5%.
2429
2436
  *
2430
- * @param {number} arg
2437
+ * @param {StagingXcmV5Location} arg
2431
2438
  * @param {Callback<Permill> =} callback
2432
2439
  **/
2433
- mintingFee: GenericStorageQuery<(arg: number) => Permill, number>;
2440
+ mintingFee: GenericStorageQuery<(arg: StagingXcmV5Location) => Permill, StagingXcmV5Location>;
2434
2441
 
2435
2442
  /**
2436
- * Fee for pUSD → external swaps (redemption) per asset. Suggested value is 0.5%.
2443
+ * Fee for internal → external swaps (redemption) per asset. Suggested value is 0.5%.
2437
2444
  *
2438
- * @param {number} arg
2445
+ * @param {StagingXcmV5Location} arg
2439
2446
  * @param {Callback<Permill> =} callback
2440
2447
  **/
2441
- redemptionFee: GenericStorageQuery<(arg: number) => Permill, number>;
2448
+ redemptionFee: GenericStorageQuery<(arg: StagingXcmV5Location) => Permill, StagingXcmV5Location>;
2442
2449
 
2443
2450
  /**
2444
2451
  * Max PSM debt as percentage of MaximumIssuance (global ceiling).
@@ -2451,19 +2458,22 @@ export interface ChainStorage extends GenericChainStorage {
2451
2458
  * Per-asset ceiling weight. Weights are normalized against the sum of all weights.
2452
2459
  * Zero means minting is disabled for this asset.
2453
2460
  *
2454
- * @param {number} arg
2461
+ * @param {StagingXcmV5Location} arg
2455
2462
  * @param {Callback<Permill> =} callback
2456
2463
  **/
2457
- assetCeilingWeight: GenericStorageQuery<(arg: number) => Permill, number>;
2464
+ assetCeilingWeight: GenericStorageQuery<(arg: StagingXcmV5Location) => Permill, StagingXcmV5Location>;
2458
2465
 
2459
2466
  /**
2460
2467
  * Set of approved external stablecoin asset IDs with their operational status.
2461
2468
  * Key existence indicates the asset is approved; the value is the circuit breaker level.
2462
2469
  *
2463
- * @param {number} arg
2470
+ * @param {StagingXcmV5Location} arg
2464
2471
  * @param {Callback<PalletPsmCircuitBreakerLevel | undefined> =} callback
2465
2472
  **/
2466
- externalAssets: GenericStorageQuery<(arg: number) => PalletPsmCircuitBreakerLevel | undefined, number>;
2473
+ externalAssets: GenericStorageQuery<
2474
+ (arg: StagingXcmV5Location) => PalletPsmCircuitBreakerLevel | undefined,
2475
+ StagingXcmV5Location
2476
+ >;
2467
2477
 
2468
2478
  /**
2469
2479
  * Counter for the related counted storage map
@@ -2472,6 +2482,23 @@ export interface ChainStorage extends GenericChainStorage {
2472
2482
  **/
2473
2483
  counterForExternalAssets: GenericStorageQuery<() => number>;
2474
2484
 
2485
+ /**
2486
+ * Snapshot of each approved external asset's decimals at registration.
2487
+ * Used to detect runtime drift from the registered precision.
2488
+ *
2489
+ * @param {StagingXcmV5Location} arg
2490
+ * @param {Callback<number | undefined> =} callback
2491
+ **/
2492
+ externalDecimals: GenericStorageQuery<(arg: StagingXcmV5Location) => number | undefined, StagingXcmV5Location>;
2493
+
2494
+ /**
2495
+ * Snapshot of the internal asset's decimals taken at genesis.
2496
+ * Set once during genesis build; present for the lifetime of the pallet.
2497
+ *
2498
+ * @param {Callback<number | undefined> =} callback
2499
+ **/
2500
+ internalDecimals: GenericStorageQuery<() => number | undefined>;
2501
+
2475
2502
  /**
2476
2503
  * Generic pallet storage query
2477
2504
  **/
@@ -2587,6 +2614,66 @@ export interface ChainStorage extends GenericChainStorage {
2587
2614
  **/
2588
2615
  disableMintingGuard: GenericStorageQuery<() => number | undefined>;
2589
2616
 
2617
+ /**
2618
+ * Optimum self-stake threshold for validators.
2619
+ *
2620
+ * Below this threshold, the incentive weight grows as `sqrt(self_stake)`.
2621
+ * Above it, growth is dampened by [`SelfStakeSlopeFactor`].
2622
+ *
2623
+ * @param {Callback<bigint> =} callback
2624
+ **/
2625
+ optimumSelfStake: GenericStorageQuery<() => bigint>;
2626
+
2627
+ /**
2628
+ * Hard cap on effective validator self-stake.
2629
+ *
2630
+ * Self-stake above this value receives no additional reward benefit (plateau).
2631
+ *
2632
+ * @param {Callback<bigint> =} callback
2633
+ **/
2634
+ hardCapSelfStake: GenericStorageQuery<() => bigint>;
2635
+
2636
+ /**
2637
+ * Slope factor controlling the discouragement rate for self-stake between optimum and cap.
2638
+ *
2639
+ * Value between 0 and 1: k=1 means no discouragement, k=0 means immediate plateau.
2640
+ *
2641
+ * @param {Callback<Perbill> =} callback
2642
+ **/
2643
+ selfStakeSlopeFactor: GenericStorageQuery<() => Perbill>;
2644
+
2645
+ /**
2646
+ * The total validator incentive budget for the given era, snapshotted at era end.
2647
+ *
2648
+ * This is the similar to [`ErasValidatorReward`] but for the self-stake incentive pot.
2649
+ *
2650
+ * @param {number} arg
2651
+ * @param {Callback<bigint> =} callback
2652
+ **/
2653
+ erasValidatorIncentiveBudget: GenericStorageQuery<(arg: number) => bigint, number>;
2654
+
2655
+ /**
2656
+ * Sum of all validators' incentive weights for the era.
2657
+ *
2658
+ * Directly linked to [`ErasValidatorIncentiveWeight`].
2659
+ *
2660
+ * @param {number} arg
2661
+ * @param {Callback<bigint> =} callback
2662
+ **/
2663
+ erasSumValidatorIncentiveWeight: GenericStorageQuery<(arg: number) => bigint, number>;
2664
+
2665
+ /**
2666
+ * Individual validator incentive weight per era.
2667
+ * Each validator's share of the incentive pot = `their_weight / sum_weight`.
2668
+ *
2669
+ * @param {[number, AccountId32Like]} arg
2670
+ * @param {Callback<bigint | undefined> =} callback
2671
+ **/
2672
+ erasValidatorIncentiveWeight: GenericStorageQuery<
2673
+ (arg: [number, AccountId32Like]) => bigint | undefined,
2674
+ [number, AccountId32]
2675
+ >;
2676
+
2590
2677
  /**
2591
2678
  * Whether nominators are slashable or not.
2592
2679
  *
@@ -5,12 +5,12 @@ import type {
5
5
  H256,
6
6
  RuntimeVersion,
7
7
  Header,
8
- DispatchError,
8
+ Bytes,
9
9
  Result,
10
+ BytesLike,
11
+ DispatchError,
10
12
  UncheckedExtrinsicLike,
11
13
  UncheckedExtrinsic,
12
- BytesLike,
13
- Bytes,
14
14
  AccountId32Like,
15
15
  AccountId32,
16
16
  U256,
@@ -25,6 +25,8 @@ import type {
25
25
  SpRuntimeBlockLazyBlock,
26
26
  SpRuntimeExtrinsicInclusionMode,
27
27
  SpCoreOpaqueMetadata,
28
+ FrameSupportViewFunctionsViewFunctionDispatchError,
29
+ FrameSupportViewFunctionsViewFunctionId,
28
30
  SpRuntimeTransactionValidityTransactionValidityError,
29
31
  SpInherentsInherentData,
30
32
  SpInherentsCheckInherentsResult,
@@ -67,6 +69,7 @@ import type {
67
69
  PalletReviveEvmApiDebugRpcTypesTrace,
68
70
  SpRuntimeBlock,
69
71
  PalletReviveEvmApiDebugRpcTypesTracerType,
72
+ PalletReviveEvmApiRpcTypesTracingConfig,
70
73
  PalletRevivePrimitivesBalanceConversionError,
71
74
  } from './types.js';
72
75
 
@@ -241,6 +244,29 @@ export interface RuntimeApis extends GenericRuntimeApis {
241
244
  **/
242
245
  [method: string]: GenericRuntimeApiMethod;
243
246
  };
247
+ /**
248
+ * @runtimeapi: RuntimeViewFunction - 0xccd9de6396c899ca
249
+ **/
250
+ runtimeViewFunction: {
251
+ /**
252
+ * Execute a view function query.
253
+ *
254
+ * @callname: RuntimeViewFunction_execute_view_function
255
+ * @param {FrameSupportViewFunctionsViewFunctionId} query_id
256
+ * @param {BytesLike} input
257
+ **/
258
+ executeViewFunction: GenericRuntimeApiMethod<
259
+ (
260
+ queryId: FrameSupportViewFunctionsViewFunctionId,
261
+ input: BytesLike,
262
+ ) => Promise<Result<Bytes, FrameSupportViewFunctionsViewFunctionDispatchError>>
263
+ >;
264
+
265
+ /**
266
+ * Generic runtime api call
267
+ **/
268
+ [method: string]: GenericRuntimeApiMethod;
269
+ };
244
270
  /**
245
271
  * @runtimeapi: BlockBuilder - 0x40fe3ad401f8959a
246
272
  **/
@@ -1258,6 +1284,16 @@ export interface RuntimeApis extends GenericRuntimeApis {
1258
1284
  ) => Promise<Result<U256, PalletRevivePrimitivesEthTransactError>>
1259
1285
  >;
1260
1286
 
1287
+ /**
1288
+ * Return the pre-dispatch weight booked for the signed Ethereum transaction payload.
1289
+ *
1290
+ * @callname: ReviveApi_eth_pre_dispatch_weight
1291
+ * @param {BytesLike} tx
1292
+ **/
1293
+ ethPreDispatchWeight: GenericRuntimeApiMethod<
1294
+ (tx: BytesLike) => Promise<Result<SpWeightsWeightV2Weight, PalletRevivePrimitivesEthTransactError>>
1295
+ >;
1296
+
1261
1297
  /**
1262
1298
  * Upload new code without instantiating a contract from it.
1263
1299
  *
@@ -1365,6 +1401,26 @@ export interface RuntimeApis extends GenericRuntimeApis {
1365
1401
  ) => Promise<Result<PalletReviveEvmApiDebugRpcTypesTrace, PalletRevivePrimitivesEthTransactError>>
1366
1402
  >;
1367
1403
 
1404
+ /**
1405
+ * Dry run and return the trace of the given call with additional configuration.
1406
+ *
1407
+ * Like [`Self::trace_call`], but accepts a [`TracingConfig`] that can carry state
1408
+ * overrides and future extensibility. The config must be the **last argument** for
1409
+ * backwards compatibility — see [`TracingConfig`] documentation.
1410
+ *
1411
+ * @callname: ReviveApi_trace_call_with_config
1412
+ * @param {PalletReviveEvmApiRpcTypesGenGenericTransaction} tx
1413
+ * @param {PalletReviveEvmApiDebugRpcTypesTracerType} tracer_type
1414
+ * @param {PalletReviveEvmApiRpcTypesTracingConfig} config
1415
+ **/
1416
+ traceCallWithConfig: GenericRuntimeApiMethod<
1417
+ (
1418
+ tx: PalletReviveEvmApiRpcTypesGenGenericTransaction,
1419
+ tracerType: PalletReviveEvmApiDebugRpcTypesTracerType,
1420
+ config: PalletReviveEvmApiRpcTypesTracingConfig,
1421
+ ) => Promise<Result<PalletReviveEvmApiDebugRpcTypesTrace, PalletRevivePrimitivesEthTransactError>>
1422
+ >;
1423
+
1368
1424
  /**
1369
1425
  * The address of the validator that produced the current block.
1370
1426
  *