@dedot/chaintypes 0.48.0 → 0.50.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.
@@ -94,7 +94,7 @@ export interface RuntimeApis<Rv extends RpcVersion> extends GenericRuntimeApis<R
94
94
  /**
95
95
  * Whether it is legal to extend the chain, assuming the given block is the most
96
96
  * recently included one as-of the relay parent that will be built against, and
97
- * the given slot.
97
+ * the given relay chain slot.
98
98
  *
99
99
  * This should be consistent with the logic the runtime uses when validating blocks to
100
100
  * avoid issues.
@@ -751,6 +751,24 @@ export interface RuntimeApis<Rv extends RpcVersion> extends GenericRuntimeApis<R
751
751
  **/
752
752
  [method: string]: GenericRuntimeApiMethod<Rv>;
753
753
  };
754
+ /**
755
+ * @runtimeapi: AssetRewards - 0x65f855d6e093c2f1
756
+ **/
757
+ assetRewards: {
758
+ /**
759
+ * Get the cost of creating a pool.
760
+ *
761
+ * This is especially useful when the cost is dynamic.
762
+ *
763
+ * @callname: AssetRewards_pool_creation_cost
764
+ **/
765
+ poolCreationCost: GenericRuntimeApiMethod<Rv, () => Promise<bigint>>;
766
+
767
+ /**
768
+ * Generic runtime api call
769
+ **/
770
+ [method: string]: GenericRuntimeApiMethod<Rv>;
771
+ };
754
772
  /**
755
773
  * @runtimeapi: GetCoreSelectorApi - 0x695c80446b8b3d4e
756
774
  **/
@@ -43,6 +43,7 @@ import type {
43
43
  PalletNftsPriceWithDirection,
44
44
  PalletNftsPreSignedMint,
45
45
  PalletNftsPreSignedAttributes,
46
+ FrameSupportScheduleDispatchTime,
46
47
  PalletStateTrieMigrationMigrationLimits,
47
48
  PalletStateTrieMigrationMigrationTask,
48
49
  PalletStateTrieMigrationProgress,
@@ -1688,6 +1689,38 @@ export interface ChainTx<Rv extends RpcVersion> extends GenericChainTx<Rv, TxCal
1688
1689
  **/
1689
1690
  [callName: string]: GenericTxCall<Rv, TxCall<Rv>>;
1690
1691
  };
1692
+ /**
1693
+ * Pallet `ToRococoXcmRouter`'s transaction calls
1694
+ **/
1695
+ toRococoXcmRouter: {
1696
+ /**
1697
+ * Notification about congested bridge queue.
1698
+ *
1699
+ * @param {H256} bridgeId
1700
+ * @param {boolean} isCongested
1701
+ **/
1702
+ reportBridgeStatus: GenericTxCall<
1703
+ Rv,
1704
+ (
1705
+ bridgeId: H256,
1706
+ isCongested: boolean,
1707
+ ) => ChainSubmittableExtrinsic<
1708
+ Rv,
1709
+ {
1710
+ pallet: 'ToRococoXcmRouter';
1711
+ palletCall: {
1712
+ name: 'ReportBridgeStatus';
1713
+ params: { bridgeId: H256; isCongested: boolean };
1714
+ };
1715
+ }
1716
+ >
1717
+ >;
1718
+
1719
+ /**
1720
+ * Generic pallet tx call
1721
+ **/
1722
+ [callName: string]: GenericTxCall<Rv, TxCall<Rv>>;
1723
+ };
1691
1724
  /**
1692
1725
  * Pallet `MessageQueue`'s transaction calls
1693
1726
  **/
@@ -9007,22 +9040,16 @@ export interface ChainTx<Rv extends RpcVersion> extends GenericChainTx<Rv, TxCal
9007
9040
  * signer and validating the transaction.
9008
9041
  *
9009
9042
  * @param {BytesLike} payload
9010
- * @param {SpWeightsWeightV2Weight} gasLimit
9011
- * @param {bigint} storageDepositLimit
9012
9043
  **/
9013
9044
  ethTransact: GenericTxCall<
9014
9045
  Rv,
9015
- (
9016
- payload: BytesLike,
9017
- gasLimit: SpWeightsWeightV2Weight,
9018
- storageDepositLimit: bigint,
9019
- ) => ChainSubmittableExtrinsic<
9046
+ (payload: BytesLike) => ChainSubmittableExtrinsic<
9020
9047
  Rv,
9021
9048
  {
9022
9049
  pallet: 'Revive';
9023
9050
  palletCall: {
9024
9051
  name: 'EthTransact';
9025
- params: { payload: BytesLike; gasLimit: SpWeightsWeightV2Weight; storageDepositLimit: bigint };
9052
+ params: { payload: BytesLike };
9026
9053
  };
9027
9054
  }
9028
9055
  >
@@ -9340,6 +9367,277 @@ export interface ChainTx<Rv extends RpcVersion> extends GenericChainTx<Rv, TxCal
9340
9367
  **/
9341
9368
  [callName: string]: GenericTxCall<Rv, TxCall<Rv>>;
9342
9369
  };
9370
+ /**
9371
+ * Pallet `AssetRewards`'s transaction calls
9372
+ **/
9373
+ assetRewards: {
9374
+ /**
9375
+ * Create a new reward pool.
9376
+ *
9377
+ * Parameters:
9378
+ * - `origin`: must be `Config::CreatePoolOrigin`;
9379
+ * - `staked_asset_id`: the asset to be staked in the pool;
9380
+ * - `reward_asset_id`: the asset to be distributed as rewards;
9381
+ * - `reward_rate_per_block`: the amount of reward tokens distributed per block;
9382
+ * - `expiry`: the block number at which the pool will cease to accumulate rewards. The
9383
+ * [`DispatchTime::After`] variant evaluated at the execution time.
9384
+ * - `admin`: the account allowed to extend the pool expiration, increase the rewards rate
9385
+ * and receive the unutilized reward tokens back after the pool completion. If `None`,
9386
+ * the caller is set as an admin.
9387
+ *
9388
+ * @param {StagingXcmV5Location} stakedAssetId
9389
+ * @param {StagingXcmV5Location} rewardAssetId
9390
+ * @param {bigint} rewardRatePerBlock
9391
+ * @param {FrameSupportScheduleDispatchTime} expiry
9392
+ * @param {AccountId32Like | undefined} admin
9393
+ **/
9394
+ createPool: GenericTxCall<
9395
+ Rv,
9396
+ (
9397
+ stakedAssetId: StagingXcmV5Location,
9398
+ rewardAssetId: StagingXcmV5Location,
9399
+ rewardRatePerBlock: bigint,
9400
+ expiry: FrameSupportScheduleDispatchTime,
9401
+ admin: AccountId32Like | undefined,
9402
+ ) => ChainSubmittableExtrinsic<
9403
+ Rv,
9404
+ {
9405
+ pallet: 'AssetRewards';
9406
+ palletCall: {
9407
+ name: 'CreatePool';
9408
+ params: {
9409
+ stakedAssetId: StagingXcmV5Location;
9410
+ rewardAssetId: StagingXcmV5Location;
9411
+ rewardRatePerBlock: bigint;
9412
+ expiry: FrameSupportScheduleDispatchTime;
9413
+ admin: AccountId32Like | undefined;
9414
+ };
9415
+ };
9416
+ }
9417
+ >
9418
+ >;
9419
+
9420
+ /**
9421
+ * Stake additional tokens in a pool.
9422
+ *
9423
+ * A freeze is placed on the staked tokens.
9424
+ *
9425
+ * @param {number} poolId
9426
+ * @param {bigint} amount
9427
+ **/
9428
+ stake: GenericTxCall<
9429
+ Rv,
9430
+ (
9431
+ poolId: number,
9432
+ amount: bigint,
9433
+ ) => ChainSubmittableExtrinsic<
9434
+ Rv,
9435
+ {
9436
+ pallet: 'AssetRewards';
9437
+ palletCall: {
9438
+ name: 'Stake';
9439
+ params: { poolId: number; amount: bigint };
9440
+ };
9441
+ }
9442
+ >
9443
+ >;
9444
+
9445
+ /**
9446
+ * Unstake tokens from a pool.
9447
+ *
9448
+ * Removes the freeze on the staked tokens.
9449
+ *
9450
+ * Parameters:
9451
+ * - origin: must be the `staker` if the pool is still active. Otherwise, any account.
9452
+ * - pool_id: the pool to unstake from.
9453
+ * - amount: the amount of tokens to unstake.
9454
+ * - staker: the account to unstake from. If `None`, the caller is used.
9455
+ *
9456
+ * @param {number} poolId
9457
+ * @param {bigint} amount
9458
+ * @param {AccountId32Like | undefined} staker
9459
+ **/
9460
+ unstake: GenericTxCall<
9461
+ Rv,
9462
+ (
9463
+ poolId: number,
9464
+ amount: bigint,
9465
+ staker: AccountId32Like | undefined,
9466
+ ) => ChainSubmittableExtrinsic<
9467
+ Rv,
9468
+ {
9469
+ pallet: 'AssetRewards';
9470
+ palletCall: {
9471
+ name: 'Unstake';
9472
+ params: { poolId: number; amount: bigint; staker: AccountId32Like | undefined };
9473
+ };
9474
+ }
9475
+ >
9476
+ >;
9477
+
9478
+ /**
9479
+ * Harvest unclaimed pool rewards.
9480
+ *
9481
+ * Parameters:
9482
+ * - origin: must be the `staker` if the pool is still active. Otherwise, any account.
9483
+ * - pool_id: the pool to harvest from.
9484
+ * - staker: the account for which to harvest rewards. If `None`, the caller is used.
9485
+ *
9486
+ * @param {number} poolId
9487
+ * @param {AccountId32Like | undefined} staker
9488
+ **/
9489
+ harvestRewards: GenericTxCall<
9490
+ Rv,
9491
+ (
9492
+ poolId: number,
9493
+ staker: AccountId32Like | undefined,
9494
+ ) => ChainSubmittableExtrinsic<
9495
+ Rv,
9496
+ {
9497
+ pallet: 'AssetRewards';
9498
+ palletCall: {
9499
+ name: 'HarvestRewards';
9500
+ params: { poolId: number; staker: AccountId32Like | undefined };
9501
+ };
9502
+ }
9503
+ >
9504
+ >;
9505
+
9506
+ /**
9507
+ * Modify a pool reward rate.
9508
+ *
9509
+ * Currently the reward rate can only be increased.
9510
+ *
9511
+ * Only the pool admin may perform this operation.
9512
+ *
9513
+ * @param {number} poolId
9514
+ * @param {bigint} newRewardRatePerBlock
9515
+ **/
9516
+ setPoolRewardRatePerBlock: GenericTxCall<
9517
+ Rv,
9518
+ (
9519
+ poolId: number,
9520
+ newRewardRatePerBlock: bigint,
9521
+ ) => ChainSubmittableExtrinsic<
9522
+ Rv,
9523
+ {
9524
+ pallet: 'AssetRewards';
9525
+ palletCall: {
9526
+ name: 'SetPoolRewardRatePerBlock';
9527
+ params: { poolId: number; newRewardRatePerBlock: bigint };
9528
+ };
9529
+ }
9530
+ >
9531
+ >;
9532
+
9533
+ /**
9534
+ * Modify a pool admin.
9535
+ *
9536
+ * Only the pool admin may perform this operation.
9537
+ *
9538
+ * @param {number} poolId
9539
+ * @param {AccountId32Like} newAdmin
9540
+ **/
9541
+ setPoolAdmin: GenericTxCall<
9542
+ Rv,
9543
+ (
9544
+ poolId: number,
9545
+ newAdmin: AccountId32Like,
9546
+ ) => ChainSubmittableExtrinsic<
9547
+ Rv,
9548
+ {
9549
+ pallet: 'AssetRewards';
9550
+ palletCall: {
9551
+ name: 'SetPoolAdmin';
9552
+ params: { poolId: number; newAdmin: AccountId32Like };
9553
+ };
9554
+ }
9555
+ >
9556
+ >;
9557
+
9558
+ /**
9559
+ * Set when the pool should expire.
9560
+ *
9561
+ * Currently the expiry block can only be extended.
9562
+ *
9563
+ * Only the pool admin may perform this operation.
9564
+ *
9565
+ * @param {number} poolId
9566
+ * @param {FrameSupportScheduleDispatchTime} newExpiry
9567
+ **/
9568
+ setPoolExpiryBlock: GenericTxCall<
9569
+ Rv,
9570
+ (
9571
+ poolId: number,
9572
+ newExpiry: FrameSupportScheduleDispatchTime,
9573
+ ) => ChainSubmittableExtrinsic<
9574
+ Rv,
9575
+ {
9576
+ pallet: 'AssetRewards';
9577
+ palletCall: {
9578
+ name: 'SetPoolExpiryBlock';
9579
+ params: { poolId: number; newExpiry: FrameSupportScheduleDispatchTime };
9580
+ };
9581
+ }
9582
+ >
9583
+ >;
9584
+
9585
+ /**
9586
+ * Convenience method to deposit reward tokens into a pool.
9587
+ *
9588
+ * This method is not strictly necessary (tokens could be transferred directly to the
9589
+ * pool pot address), but is provided for convenience so manual derivation of the
9590
+ * account id is not required.
9591
+ *
9592
+ * @param {number} poolId
9593
+ * @param {bigint} amount
9594
+ **/
9595
+ depositRewardTokens: GenericTxCall<
9596
+ Rv,
9597
+ (
9598
+ poolId: number,
9599
+ amount: bigint,
9600
+ ) => ChainSubmittableExtrinsic<
9601
+ Rv,
9602
+ {
9603
+ pallet: 'AssetRewards';
9604
+ palletCall: {
9605
+ name: 'DepositRewardTokens';
9606
+ params: { poolId: number; amount: bigint };
9607
+ };
9608
+ }
9609
+ >
9610
+ >;
9611
+
9612
+ /**
9613
+ * Cleanup a pool.
9614
+ *
9615
+ * Origin must be the pool admin.
9616
+ *
9617
+ * Cleanup storage, release any associated storage cost and return the remaining reward
9618
+ * tokens to the admin.
9619
+ *
9620
+ * @param {number} poolId
9621
+ **/
9622
+ cleanupPool: GenericTxCall<
9623
+ Rv,
9624
+ (poolId: number) => ChainSubmittableExtrinsic<
9625
+ Rv,
9626
+ {
9627
+ pallet: 'AssetRewards';
9628
+ palletCall: {
9629
+ name: 'CleanupPool';
9630
+ params: { poolId: number };
9631
+ };
9632
+ }
9633
+ >
9634
+ >;
9635
+
9636
+ /**
9637
+ * Generic pallet tx call
9638
+ **/
9639
+ [callName: string]: GenericTxCall<Rv, TxCall<Rv>>;
9640
+ };
9343
9641
  /**
9344
9642
  * Pallet `StateTrieMigration`'s transaction calls
9345
9643
  **/