@dedot/chaintypes 0.61.0 → 0.63.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/tx.d.ts CHANGED
@@ -38,6 +38,7 @@ import type {
38
38
  PalletInflationInflationParameters,
39
39
  AstarPrimitivesDappStakingSmartContract,
40
40
  PalletDappStakingForcingType,
41
+ PalletDappStakingTierParameters,
41
42
  AstarPrimitivesOracleCurrencyId,
42
43
  AstarRuntimeSessionKeys,
43
44
  XcmVersionedLocation,
@@ -3104,8 +3105,8 @@ export interface ChainTx<Rv extends RpcVersion> extends GenericChainTx<Rv, TxCal
3104
3105
  * Cleanup expired stake entries for the contract.
3105
3106
  *
3106
3107
  * Entry is considered to be expired if:
3107
- * 1. It's from a past period & the account wasn't a loyal staker, meaning there's no claimable bonus reward.
3108
- * 2. It's from a period older than the oldest claimable period, regardless whether the account was loyal or not.
3108
+ * 1. It's from a past period & the account did not maintain an eligible bonus status, meaning there's no claimable bonus reward.
3109
+ * 2. It's from a period older than the oldest claimable period, regardless of whether the account had an eligible bonus status or not.
3109
3110
  *
3110
3111
  **/
3111
3112
  cleanupExpiredEntries: GenericTxCall<
@@ -3189,6 +3190,85 @@ export interface ChainTx<Rv extends RpcVersion> extends GenericChainTx<Rv, TxCal
3189
3190
  >
3190
3191
  >;
3191
3192
 
3193
+ /**
3194
+ * Transfers stake between two smart contracts, ensuring bonus status preservation if eligible.
3195
+ * Emits a `StakeMoved` event.
3196
+ *
3197
+ * @param {AstarPrimitivesDappStakingSmartContract} sourceContract
3198
+ * @param {AstarPrimitivesDappStakingSmartContract} destinationContract
3199
+ * @param {bigint} amount
3200
+ **/
3201
+ moveStake: GenericTxCall<
3202
+ Rv,
3203
+ (
3204
+ sourceContract: AstarPrimitivesDappStakingSmartContract,
3205
+ destinationContract: AstarPrimitivesDappStakingSmartContract,
3206
+ amount: bigint,
3207
+ ) => ChainSubmittableExtrinsic<
3208
+ Rv,
3209
+ {
3210
+ pallet: 'DappStaking';
3211
+ palletCall: {
3212
+ name: 'MoveStake';
3213
+ params: {
3214
+ sourceContract: AstarPrimitivesDappStakingSmartContract;
3215
+ destinationContract: AstarPrimitivesDappStakingSmartContract;
3216
+ amount: bigint;
3217
+ };
3218
+ };
3219
+ }
3220
+ >
3221
+ >;
3222
+
3223
+ /**
3224
+ * Used to set static tier parameters, which are used to calculate tier configuration.
3225
+ * Tier configuration defines tier entry threshold values, number of slots, and reward portions.
3226
+ *
3227
+ * This is a delicate call and great care should be taken when changing these
3228
+ * values since it has a significant impact on the reward system.
3229
+ *
3230
+ * @param {PalletDappStakingTierParameters} params
3231
+ **/
3232
+ setStaticTierParams: GenericTxCall<
3233
+ Rv,
3234
+ (params: PalletDappStakingTierParameters) => ChainSubmittableExtrinsic<
3235
+ Rv,
3236
+ {
3237
+ pallet: 'DappStaking';
3238
+ palletCall: {
3239
+ name: 'SetStaticTierParams';
3240
+ params: { params: PalletDappStakingTierParameters };
3241
+ };
3242
+ }
3243
+ >
3244
+ >;
3245
+
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
+
3192
3272
  /**
3193
3273
  * Generic pallet tx call
3194
3274
  **/
@@ -8754,244 +8834,6 @@ export interface ChainTx<Rv extends RpcVersion> extends GenericChainTx<Rv, TxCal
8754
8834
  >
8755
8835
  >;
8756
8836
 
8757
- /**
8758
- * Propose and approve a spend of treasury funds.
8759
- *
8760
- * ## Dispatch Origin
8761
- *
8762
- * Must be [`Config::SpendOrigin`] with the `Success` value being at least `amount`.
8763
- *
8764
- * ### Details
8765
- * NOTE: For record-keeping purposes, the proposer is deemed to be equivalent to the
8766
- * beneficiary.
8767
- *
8768
- * ### Parameters
8769
- * - `amount`: The amount to be transferred from the treasury to the `beneficiary`.
8770
- * - `beneficiary`: The destination account for the transfer.
8771
- *
8772
- * ## Events
8773
- *
8774
- * Emits [`Event::SpendApproved`] if successful.
8775
- *
8776
- * @param {bigint} amount
8777
- * @param {MultiAddressLike} beneficiary
8778
- **/
8779
- spendLocal: GenericTxCall<
8780
- Rv,
8781
- (
8782
- amount: bigint,
8783
- beneficiary: MultiAddressLike,
8784
- ) => ChainSubmittableExtrinsic<
8785
- Rv,
8786
- {
8787
- pallet: 'Treasury';
8788
- palletCall: {
8789
- name: 'SpendLocal';
8790
- params: { amount: bigint; beneficiary: MultiAddressLike };
8791
- };
8792
- }
8793
- >
8794
- >;
8795
-
8796
- /**
8797
- * Force a previously approved proposal to be removed from the approval queue.
8798
- *
8799
- * ## Dispatch Origin
8800
- *
8801
- * Must be [`Config::RejectOrigin`].
8802
- *
8803
- * ## Details
8804
- *
8805
- * The original deposit will no longer be returned.
8806
- *
8807
- * ### Parameters
8808
- * - `proposal_id`: The index of a proposal
8809
- *
8810
- * ### Complexity
8811
- * - O(A) where `A` is the number of approvals
8812
- *
8813
- * ### Errors
8814
- * - [`Error::ProposalNotApproved`]: The `proposal_id` supplied was not found in the
8815
- * approval queue, i.e., the proposal has not been approved. This could also mean the
8816
- * proposal does not exist altogether, thus there is no way it would have been approved
8817
- * in the first place.
8818
- *
8819
- * @param {number} proposalId
8820
- **/
8821
- removeApproval: GenericTxCall<
8822
- Rv,
8823
- (proposalId: number) => ChainSubmittableExtrinsic<
8824
- Rv,
8825
- {
8826
- pallet: 'Treasury';
8827
- palletCall: {
8828
- name: 'RemoveApproval';
8829
- params: { proposalId: number };
8830
- };
8831
- }
8832
- >
8833
- >;
8834
-
8835
- /**
8836
- * Propose and approve a spend of treasury funds.
8837
- *
8838
- * ## Dispatch Origin
8839
- *
8840
- * Must be [`Config::SpendOrigin`] with the `Success` value being at least
8841
- * `amount` of `asset_kind` in the native asset. The amount of `asset_kind` is converted
8842
- * for assertion using the [`Config::BalanceConverter`].
8843
- *
8844
- * ## Details
8845
- *
8846
- * Create an approved spend for transferring a specific `amount` of `asset_kind` to a
8847
- * designated beneficiary. The spend must be claimed using the `payout` dispatchable within
8848
- * the [`Config::PayoutPeriod`].
8849
- *
8850
- * ### Parameters
8851
- * - `asset_kind`: An indicator of the specific asset class to be spent.
8852
- * - `amount`: The amount to be transferred from the treasury to the `beneficiary`.
8853
- * - `beneficiary`: The beneficiary of the spend.
8854
- * - `valid_from`: The block number from which the spend can be claimed. It can refer to
8855
- * the past if the resulting spend has not yet expired according to the
8856
- * [`Config::PayoutPeriod`]. If `None`, the spend can be claimed immediately after
8857
- * approval.
8858
- *
8859
- * ## Events
8860
- *
8861
- * Emits [`Event::AssetSpendApproved`] if successful.
8862
- *
8863
- * @param {[]} assetKind
8864
- * @param {bigint} amount
8865
- * @param {AccountId32Like} beneficiary
8866
- * @param {number | undefined} validFrom
8867
- **/
8868
- spend: GenericTxCall<
8869
- Rv,
8870
- (
8871
- assetKind: [],
8872
- amount: bigint,
8873
- beneficiary: AccountId32Like,
8874
- validFrom: number | undefined,
8875
- ) => ChainSubmittableExtrinsic<
8876
- Rv,
8877
- {
8878
- pallet: 'Treasury';
8879
- palletCall: {
8880
- name: 'Spend';
8881
- params: { assetKind: []; amount: bigint; beneficiary: AccountId32Like; validFrom: number | undefined };
8882
- };
8883
- }
8884
- >
8885
- >;
8886
-
8887
- /**
8888
- * Claim a spend.
8889
- *
8890
- * ## Dispatch Origin
8891
- *
8892
- * Must be signed.
8893
- *
8894
- * ## Details
8895
- *
8896
- * Spends must be claimed within some temporal bounds. A spend may be claimed within one
8897
- * [`Config::PayoutPeriod`] from the `valid_from` block.
8898
- * In case of a payout failure, the spend status must be updated with the `check_status`
8899
- * dispatchable before retrying with the current function.
8900
- *
8901
- * ### Parameters
8902
- * - `index`: The spend index.
8903
- *
8904
- * ## Events
8905
- *
8906
- * Emits [`Event::Paid`] if successful.
8907
- *
8908
- * @param {number} index
8909
- **/
8910
- payout: GenericTxCall<
8911
- Rv,
8912
- (index: number) => ChainSubmittableExtrinsic<
8913
- Rv,
8914
- {
8915
- pallet: 'Treasury';
8916
- palletCall: {
8917
- name: 'Payout';
8918
- params: { index: number };
8919
- };
8920
- }
8921
- >
8922
- >;
8923
-
8924
- /**
8925
- * Check the status of the spend and remove it from the storage if processed.
8926
- *
8927
- * ## Dispatch Origin
8928
- *
8929
- * Must be signed.
8930
- *
8931
- * ## Details
8932
- *
8933
- * The status check is a prerequisite for retrying a failed payout.
8934
- * If a spend has either succeeded or expired, it is removed from the storage by this
8935
- * function. In such instances, transaction fees are refunded.
8936
- *
8937
- * ### Parameters
8938
- * - `index`: The spend index.
8939
- *
8940
- * ## Events
8941
- *
8942
- * Emits [`Event::PaymentFailed`] if the spend payout has failed.
8943
- * Emits [`Event::SpendProcessed`] if the spend payout has succeed.
8944
- *
8945
- * @param {number} index
8946
- **/
8947
- checkStatus: GenericTxCall<
8948
- Rv,
8949
- (index: number) => ChainSubmittableExtrinsic<
8950
- Rv,
8951
- {
8952
- pallet: 'Treasury';
8953
- palletCall: {
8954
- name: 'CheckStatus';
8955
- params: { index: number };
8956
- };
8957
- }
8958
- >
8959
- >;
8960
-
8961
- /**
8962
- * Void previously approved spend.
8963
- *
8964
- * ## Dispatch Origin
8965
- *
8966
- * Must be [`Config::RejectOrigin`].
8967
- *
8968
- * ## Details
8969
- *
8970
- * A spend void is only possible if the payout has not been attempted yet.
8971
- *
8972
- * ### Parameters
8973
- * - `index`: The spend index.
8974
- *
8975
- * ## Events
8976
- *
8977
- * Emits [`Event::AssetSpendVoided`] if successful.
8978
- *
8979
- * @param {number} index
8980
- **/
8981
- voidSpend: GenericTxCall<
8982
- Rv,
8983
- (index: number) => ChainSubmittableExtrinsic<
8984
- Rv,
8985
- {
8986
- pallet: 'Treasury';
8987
- palletCall: {
8988
- name: 'VoidSpend';
8989
- params: { index: number };
8990
- };
8991
- }
8992
- >
8993
- >;
8994
-
8995
8837
  /**
8996
8838
  * Generic pallet tx call
8997
8839
  **/
@@ -9107,244 +8949,6 @@ export interface ChainTx<Rv extends RpcVersion> extends GenericChainTx<Rv, TxCal
9107
8949
  >
9108
8950
  >;
9109
8951
 
9110
- /**
9111
- * Propose and approve a spend of treasury funds.
9112
- *
9113
- * ## Dispatch Origin
9114
- *
9115
- * Must be [`Config::SpendOrigin`] with the `Success` value being at least `amount`.
9116
- *
9117
- * ### Details
9118
- * NOTE: For record-keeping purposes, the proposer is deemed to be equivalent to the
9119
- * beneficiary.
9120
- *
9121
- * ### Parameters
9122
- * - `amount`: The amount to be transferred from the treasury to the `beneficiary`.
9123
- * - `beneficiary`: The destination account for the transfer.
9124
- *
9125
- * ## Events
9126
- *
9127
- * Emits [`Event::SpendApproved`] if successful.
9128
- *
9129
- * @param {bigint} amount
9130
- * @param {MultiAddressLike} beneficiary
9131
- **/
9132
- spendLocal: GenericTxCall<
9133
- Rv,
9134
- (
9135
- amount: bigint,
9136
- beneficiary: MultiAddressLike,
9137
- ) => ChainSubmittableExtrinsic<
9138
- Rv,
9139
- {
9140
- pallet: 'CommunityTreasury';
9141
- palletCall: {
9142
- name: 'SpendLocal';
9143
- params: { amount: bigint; beneficiary: MultiAddressLike };
9144
- };
9145
- }
9146
- >
9147
- >;
9148
-
9149
- /**
9150
- * Force a previously approved proposal to be removed from the approval queue.
9151
- *
9152
- * ## Dispatch Origin
9153
- *
9154
- * Must be [`Config::RejectOrigin`].
9155
- *
9156
- * ## Details
9157
- *
9158
- * The original deposit will no longer be returned.
9159
- *
9160
- * ### Parameters
9161
- * - `proposal_id`: The index of a proposal
9162
- *
9163
- * ### Complexity
9164
- * - O(A) where `A` is the number of approvals
9165
- *
9166
- * ### Errors
9167
- * - [`Error::ProposalNotApproved`]: The `proposal_id` supplied was not found in the
9168
- * approval queue, i.e., the proposal has not been approved. This could also mean the
9169
- * proposal does not exist altogether, thus there is no way it would have been approved
9170
- * in the first place.
9171
- *
9172
- * @param {number} proposalId
9173
- **/
9174
- removeApproval: GenericTxCall<
9175
- Rv,
9176
- (proposalId: number) => ChainSubmittableExtrinsic<
9177
- Rv,
9178
- {
9179
- pallet: 'CommunityTreasury';
9180
- palletCall: {
9181
- name: 'RemoveApproval';
9182
- params: { proposalId: number };
9183
- };
9184
- }
9185
- >
9186
- >;
9187
-
9188
- /**
9189
- * Propose and approve a spend of treasury funds.
9190
- *
9191
- * ## Dispatch Origin
9192
- *
9193
- * Must be [`Config::SpendOrigin`] with the `Success` value being at least
9194
- * `amount` of `asset_kind` in the native asset. The amount of `asset_kind` is converted
9195
- * for assertion using the [`Config::BalanceConverter`].
9196
- *
9197
- * ## Details
9198
- *
9199
- * Create an approved spend for transferring a specific `amount` of `asset_kind` to a
9200
- * designated beneficiary. The spend must be claimed using the `payout` dispatchable within
9201
- * the [`Config::PayoutPeriod`].
9202
- *
9203
- * ### Parameters
9204
- * - `asset_kind`: An indicator of the specific asset class to be spent.
9205
- * - `amount`: The amount to be transferred from the treasury to the `beneficiary`.
9206
- * - `beneficiary`: The beneficiary of the spend.
9207
- * - `valid_from`: The block number from which the spend can be claimed. It can refer to
9208
- * the past if the resulting spend has not yet expired according to the
9209
- * [`Config::PayoutPeriod`]. If `None`, the spend can be claimed immediately after
9210
- * approval.
9211
- *
9212
- * ## Events
9213
- *
9214
- * Emits [`Event::AssetSpendApproved`] if successful.
9215
- *
9216
- * @param {[]} assetKind
9217
- * @param {bigint} amount
9218
- * @param {AccountId32Like} beneficiary
9219
- * @param {number | undefined} validFrom
9220
- **/
9221
- spend: GenericTxCall<
9222
- Rv,
9223
- (
9224
- assetKind: [],
9225
- amount: bigint,
9226
- beneficiary: AccountId32Like,
9227
- validFrom: number | undefined,
9228
- ) => ChainSubmittableExtrinsic<
9229
- Rv,
9230
- {
9231
- pallet: 'CommunityTreasury';
9232
- palletCall: {
9233
- name: 'Spend';
9234
- params: { assetKind: []; amount: bigint; beneficiary: AccountId32Like; validFrom: number | undefined };
9235
- };
9236
- }
9237
- >
9238
- >;
9239
-
9240
- /**
9241
- * Claim a spend.
9242
- *
9243
- * ## Dispatch Origin
9244
- *
9245
- * Must be signed.
9246
- *
9247
- * ## Details
9248
- *
9249
- * Spends must be claimed within some temporal bounds. A spend may be claimed within one
9250
- * [`Config::PayoutPeriod`] from the `valid_from` block.
9251
- * In case of a payout failure, the spend status must be updated with the `check_status`
9252
- * dispatchable before retrying with the current function.
9253
- *
9254
- * ### Parameters
9255
- * - `index`: The spend index.
9256
- *
9257
- * ## Events
9258
- *
9259
- * Emits [`Event::Paid`] if successful.
9260
- *
9261
- * @param {number} index
9262
- **/
9263
- payout: GenericTxCall<
9264
- Rv,
9265
- (index: number) => ChainSubmittableExtrinsic<
9266
- Rv,
9267
- {
9268
- pallet: 'CommunityTreasury';
9269
- palletCall: {
9270
- name: 'Payout';
9271
- params: { index: number };
9272
- };
9273
- }
9274
- >
9275
- >;
9276
-
9277
- /**
9278
- * Check the status of the spend and remove it from the storage if processed.
9279
- *
9280
- * ## Dispatch Origin
9281
- *
9282
- * Must be signed.
9283
- *
9284
- * ## Details
9285
- *
9286
- * The status check is a prerequisite for retrying a failed payout.
9287
- * If a spend has either succeeded or expired, it is removed from the storage by this
9288
- * function. In such instances, transaction fees are refunded.
9289
- *
9290
- * ### Parameters
9291
- * - `index`: The spend index.
9292
- *
9293
- * ## Events
9294
- *
9295
- * Emits [`Event::PaymentFailed`] if the spend payout has failed.
9296
- * Emits [`Event::SpendProcessed`] if the spend payout has succeed.
9297
- *
9298
- * @param {number} index
9299
- **/
9300
- checkStatus: GenericTxCall<
9301
- Rv,
9302
- (index: number) => ChainSubmittableExtrinsic<
9303
- Rv,
9304
- {
9305
- pallet: 'CommunityTreasury';
9306
- palletCall: {
9307
- name: 'CheckStatus';
9308
- params: { index: number };
9309
- };
9310
- }
9311
- >
9312
- >;
9313
-
9314
- /**
9315
- * Void previously approved spend.
9316
- *
9317
- * ## Dispatch Origin
9318
- *
9319
- * Must be [`Config::RejectOrigin`].
9320
- *
9321
- * ## Details
9322
- *
9323
- * A spend void is only possible if the payout has not been attempted yet.
9324
- *
9325
- * ### Parameters
9326
- * - `index`: The spend index.
9327
- *
9328
- * ## Events
9329
- *
9330
- * Emits [`Event::AssetSpendVoided`] if successful.
9331
- *
9332
- * @param {number} index
9333
- **/
9334
- voidSpend: GenericTxCall<
9335
- Rv,
9336
- (index: number) => ChainSubmittableExtrinsic<
9337
- Rv,
9338
- {
9339
- pallet: 'CommunityTreasury';
9340
- palletCall: {
9341
- name: 'VoidSpend';
9342
- params: { index: number };
9343
- };
9344
- }
9345
- >
9346
- >;
9347
-
9348
8952
  /**
9349
8953
  * Generic pallet tx call
9350
8954
  **/