@dedot/chaintypes 0.71.0 → 0.72.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/events.d.ts CHANGED
@@ -693,16 +693,6 @@ export interface ChainEvents<Rv extends RpcVersion> extends GenericChainEvents<R
693
693
  **/
694
694
  InflationParametersForceChanged: GenericPalletEvent<Rv, 'Inflation', 'InflationParametersForceChanged', null>;
695
695
 
696
- /**
697
- * Inflation configuration has been force changed. This will have an immediate effect from this block.
698
- **/
699
- InflationConfigurationForceChanged: GenericPalletEvent<
700
- Rv,
701
- 'Inflation',
702
- 'InflationConfigurationForceChanged',
703
- { config: PalletInflationInflationConfiguration }
704
- >;
705
-
706
696
  /**
707
697
  * Inflation recalculation has been forced.
708
698
  **/
package/astar/index.d.ts CHANGED
@@ -23,7 +23,7 @@ export interface VersionedAstarApi<Rv extends RpcVersion> extends GenericSubstra
23
23
 
24
24
  /**
25
25
  * @name: AstarApi
26
- * @specVersion: 1301
26
+ * @specVersion: 1401
27
27
  **/
28
28
  export interface AstarApi {
29
29
  legacy: VersionedAstarApi<RpcLegacy>;
package/astar/query.d.ts CHANGED
@@ -64,7 +64,6 @@ import type {
64
64
  PalletDappStakingTiersConfiguration,
65
65
  PalletDappStakingDAppTierRewards,
66
66
  PalletDappStakingCleanupMarker,
67
- PalletDappStakingBonusUpdateState,
68
67
  PalletAssetsAssetDetails,
69
68
  PalletAssetsAssetAccount,
70
69
  PalletAssetsApproval,
@@ -1068,14 +1067,6 @@ export interface ChainStorage<Rv extends RpcVersion> extends GenericChainStorage
1068
1067
  **/
1069
1068
  safeguard: GenericStorageQuery<Rv, () => boolean>;
1070
1069
 
1071
- /**
1072
- * Temporary cursor to persist latest BonusStatus item updated.
1073
- * TODO: remove it once all BonusStatus are updated and this storage value is cleanup.
1074
- *
1075
- * @param {Callback<PalletDappStakingBonusUpdateState> =} callback
1076
- **/
1077
- activeBonusUpdateState: GenericStorageQuery<Rv, () => PalletDappStakingBonusUpdateState>;
1078
-
1079
1070
  /**
1080
1071
  * Generic pallet storage query
1081
1072
  **/
package/astar/tx.d.ts CHANGED
@@ -2700,6 +2700,35 @@ export interface ChainTx<Rv extends RpcVersion> extends GenericChainTx<Rv, TxCal
2700
2700
  >
2701
2701
  >;
2702
2702
 
2703
+ /**
2704
+ * Re-adjust the existing inflation configuration using the current inflation parameters.
2705
+ *
2706
+ * It might seem similar to forcing the inflation recalculation, but it's not.
2707
+ * This function adjusts the existing configuration, respecting the `max_emission` value used to calculate the current inflation config.
2708
+ * (The 'force' approach uses the current total issuance)
2709
+ *
2710
+ * This call should be used in case inflation parameters have changed during the cycle, and the configuration should be adjusted now.
2711
+ *
2712
+ * NOTE:
2713
+ * The call will do the best possible approximation of what the calculated max emission was at the moment when last inflation recalculation was done.
2714
+ * But due to rounding losses, it's not possible to get the exact same value. As a consequence, repeated calls to this function
2715
+ * might result in changes to the configuration, even though the inflation parameters haven't changed.
2716
+ * However, since this function isn't supposed to be called often, and changes are minimal, this is acceptable.
2717
+ *
2718
+ **/
2719
+ forceReadjustConfig: GenericTxCall<
2720
+ Rv,
2721
+ () => ChainSubmittableExtrinsic<
2722
+ Rv,
2723
+ {
2724
+ pallet: 'Inflation';
2725
+ palletCall: {
2726
+ name: 'ForceReadjustConfig';
2727
+ };
2728
+ }
2729
+ >
2730
+ >;
2731
+
2703
2732
  /**
2704
2733
  * Generic pallet tx call
2705
2734
  **/
@@ -3243,32 +3272,6 @@ export interface ChainTx<Rv extends RpcVersion> extends GenericChainTx<Rv, TxCal
3243
3272
  >
3244
3273
  >;
3245
3274
 
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
-
3272
3275
  /**
3273
3276
  * Generic pallet tx call
3274
3277
  **/
package/astar/types.d.ts CHANGED
@@ -546,10 +546,6 @@ export type PalletInflationEvent =
546
546
  * Inflation parameters have been force changed. This will have effect on the next inflation recalculation.
547
547
  **/
548
548
  | { name: 'InflationParametersForceChanged' }
549
- /**
550
- * Inflation configuration has been force changed. This will have an immediate effect from this block.
551
- **/
552
- | { name: 'InflationConfigurationForceChanged'; data: { config: PalletInflationInflationConfiguration } }
553
549
  /**
554
550
  * Inflation recalculation has been forced.
555
551
  **/
@@ -4690,7 +4686,23 @@ export type PalletInflationCall =
4690
4686
  *
4691
4687
  * Purpose of the call is testing & handling unforeseen circumstances.
4692
4688
  **/
4693
- | { name: 'ForceInflationRecalculation'; params: { nextEra: number } };
4689
+ | { name: 'ForceInflationRecalculation'; params: { nextEra: number } }
4690
+ /**
4691
+ * Re-adjust the existing inflation configuration using the current inflation parameters.
4692
+ *
4693
+ * It might seem similar to forcing the inflation recalculation, but it's not.
4694
+ * This function adjusts the existing configuration, respecting the `max_emission` value used to calculate the current inflation config.
4695
+ * (The 'force' approach uses the current total issuance)
4696
+ *
4697
+ * This call should be used in case inflation parameters have changed during the cycle, and the configuration should be adjusted now.
4698
+ *
4699
+ * NOTE:
4700
+ * The call will do the best possible approximation of what the calculated max emission was at the moment when last inflation recalculation was done.
4701
+ * But due to rounding losses, it's not possible to get the exact same value. As a consequence, repeated calls to this function
4702
+ * might result in changes to the configuration, even though the inflation parameters haven't changed.
4703
+ * However, since this function isn't supposed to be called often, and changes are minimal, this is acceptable.
4704
+ **/
4705
+ | { name: 'ForceReadjustConfig' };
4694
4706
 
4695
4707
  export type PalletInflationCallLike =
4696
4708
  /**
@@ -4710,7 +4722,23 @@ export type PalletInflationCallLike =
4710
4722
  *
4711
4723
  * Purpose of the call is testing & handling unforeseen circumstances.
4712
4724
  **/
4713
- | { name: 'ForceInflationRecalculation'; params: { nextEra: number } };
4725
+ | { name: 'ForceInflationRecalculation'; params: { nextEra: number } }
4726
+ /**
4727
+ * Re-adjust the existing inflation configuration using the current inflation parameters.
4728
+ *
4729
+ * It might seem similar to forcing the inflation recalculation, but it's not.
4730
+ * This function adjusts the existing configuration, respecting the `max_emission` value used to calculate the current inflation config.
4731
+ * (The 'force' approach uses the current total issuance)
4732
+ *
4733
+ * This call should be used in case inflation parameters have changed during the cycle, and the configuration should be adjusted now.
4734
+ *
4735
+ * NOTE:
4736
+ * The call will do the best possible approximation of what the calculated max emission was at the moment when last inflation recalculation was done.
4737
+ * But due to rounding losses, it's not possible to get the exact same value. As a consequence, repeated calls to this function
4738
+ * might result in changes to the configuration, even though the inflation parameters haven't changed.
4739
+ * However, since this function isn't supposed to be called often, and changes are minimal, this is acceptable.
4740
+ **/
4741
+ | { name: 'ForceReadjustConfig' };
4714
4742
 
4715
4743
  export type PalletInflationInflationParameters = {
4716
4744
  maxInflationRate: Perquintill;
@@ -4891,18 +4919,7 @@ export type PalletDappStakingCall =
4891
4919
  * This is a delicate call and great care should be taken when changing these
4892
4920
  * values since it has a significant impact on the reward system.
4893
4921
  **/
4894
- | { name: 'SetStaticTierParams'; params: { params: PalletDappStakingTierParameters } }
4895
- /**
4896
- * Active update `BonusStatus` according to the new MaxBonusSafeMovesPerPeriod from config
4897
- * for all already existing StakerInfo in steps, consuming up to the specified amount of
4898
- * weight.
4899
- *
4900
- * If no weight is specified, max allowed weight is used.
4901
- * In any case the weight_limit is clamped between the minimum & maximum allowed values.
4902
- *
4903
- * TODO: remove this extrinsic once BonusStatus update is done
4904
- **/
4905
- | { name: 'UpdateBonus'; params: { weightLimit?: SpWeightsWeightV2Weight | undefined } };
4922
+ | { name: 'SetStaticTierParams'; params: { params: PalletDappStakingTierParameters } };
4906
4923
 
4907
4924
  export type PalletDappStakingCallLike =
4908
4925
  /**
@@ -5072,18 +5089,7 @@ export type PalletDappStakingCallLike =
5072
5089
  * This is a delicate call and great care should be taken when changing these
5073
5090
  * values since it has a significant impact on the reward system.
5074
5091
  **/
5075
- | { name: 'SetStaticTierParams'; params: { params: PalletDappStakingTierParameters } }
5076
- /**
5077
- * Active update `BonusStatus` according to the new MaxBonusSafeMovesPerPeriod from config
5078
- * for all already existing StakerInfo in steps, consuming up to the specified amount of
5079
- * weight.
5080
- *
5081
- * If no weight is specified, max allowed weight is used.
5082
- * In any case the weight_limit is clamped between the minimum & maximum allowed values.
5083
- *
5084
- * TODO: remove this extrinsic once BonusStatus update is done
5085
- **/
5086
- | { name: 'UpdateBonus'; params: { weightLimit?: SpWeightsWeightV2Weight | undefined } };
5092
+ | { name: 'SetStaticTierParams'; params: { params: PalletDappStakingTierParameters } };
5087
5093
 
5088
5094
  /**
5089
5095
  * Contains a variant per dispatchable extrinsic that this pallet has.
@@ -10221,11 +10227,6 @@ export type AstarPrimitivesDappStakingRankedTier = number;
10221
10227
 
10222
10228
  export type PalletDappStakingCleanupMarker = { eraRewardIndex: number; dappTiersIndex: number; oldestValidEra: number };
10223
10229
 
10224
- export type PalletDappStakingBonusUpdateState =
10225
- | { type: 'NotInProgress' }
10226
- | { type: 'InProgress'; value: [AccountId32, AstarPrimitivesDappStakingSmartContract] }
10227
- | { type: 'Finished' };
10228
-
10229
10230
  /**
10230
10231
  * The `Error` enum of this pallet.
10231
10232
  **/
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dedot/chaintypes",
3
- "version": "0.71.0",
3
+ "version": "0.72.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": "a2c1bc760e57283e0391c5b8966f00e52517491f",
22
+ "gitHead": "cf860568f0e7ec8b51e4469dfdc1f4666ecaa673",
23
23
  "module": "./index.js",
24
24
  "types": "./index.d.ts"
25
25
  }