Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
70 changes: 0 additions & 70 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 0 additions & 3 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -308,7 +308,6 @@ polkadot-service = { git = "https://github.com/paritytech/polkadot-sdk", branch
orml-xtokens = { git = "https://github.com/AstarNetwork/open-runtime-module-library", branch = "stable2506", default-features = false }
orml-traits = { git = "https://github.com/AstarNetwork/open-runtime-module-library", branch = "stable2506", default-features = false }
orml-xcm-support = { git = "https://github.com/AstarNetwork/open-runtime-module-library", branch = "stable2506", default-features = false }
orml-oracle = { git = "https://github.com/AstarNetwork/open-runtime-module-library", branch = "stable2506", default-features = false }

# Astar pallets & modules
# (wasm)
Expand All @@ -320,8 +319,6 @@ pallet-inflation = { path = "./pallets/inflation", default-features = false }
pallet-dynamic-evm-base-fee = { path = "./pallets/dynamic-evm-base-fee", default-features = false }
pallet-unified-accounts = { path = "./pallets/unified-accounts", default-features = false }
astar-xcm-benchmarks = { path = "./pallets/astar-xcm-benchmarks", default-features = false }
pallet-static-price-provider = { path = "./pallets/static-price-provider", default-features = false }
pallet-price-aggregator = { path = "./pallets/price-aggregator", default-features = false }
pallet-collective-proxy = { path = "./pallets/collective-proxy", default-features = false }
vesting-mbm = { path = "./pallets/vesting-mbm", default-features = false }
democracy-mbm = { path = "./pallets/democracy-mbm", default-features = false }
Expand Down
3 changes: 1 addition & 2 deletions pallets/dapp-staking/src/benchmarking/utils.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
use super::{Pallet as DappStaking, *};

use astar_primitives::{
dapp_staking::{FIXED_NUMBER_OF_TIER_SLOTS, FIXED_TIER_SLOTS_ARGS},
dapp_staking::FIXED_NUMBER_OF_TIER_SLOTS,
Balance,
};

Expand Down Expand Up @@ -196,7 +196,6 @@ pub(super) fn init_tier_settings<T: Config>() {
},
])
.unwrap(),
slot_number_args: FIXED_TIER_SLOTS_ARGS,
tier_rank_multipliers: BoundedVec::try_from(vec![0, 24_000, 46_700, 0]).unwrap(),
};

Expand Down
13 changes: 2 additions & 11 deletions pallets/dapp-staking/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,6 @@ use astar_primitives::{
dapp_staking::{
AccountCheck, CycleConfiguration, DAppId, EraNumber, Observer as DAppStakingObserver,
PeriodNumber, Rank, RankedTier, SmartContractHandle, StakingRewardHandler, TierId,
FIXED_TIER_SLOTS_ARGS,
},
Balance, BlockNumber,
};
Expand Down Expand Up @@ -95,7 +94,7 @@ pub mod pallet {
use super::*;

/// The current storage version.
pub const STORAGE_VERSION: StorageVersion = StorageVersion::new(11);
pub const STORAGE_VERSION: StorageVersion = StorageVersion::new(12);

#[pallet::pallet]
#[pallet::storage_version(STORAGE_VERSION)]
Expand Down Expand Up @@ -167,11 +166,6 @@ pub mod pallet {
#[pallet::constant]
type MaxNumberOfContracts: Get<u32>;

/// Legacy bound for backward compatibility with pre-v11 DAppTierRewards.
// TODO: Can be removed to use MaxNumberOfContracts only after period 4 periods post-revamp-upgrade.
#[pallet::constant]
type MaxNumberOfContractsLegacy: Get<u32>;

/// Maximum number of unlocking chunks that can exist per account at a time.
#[pallet::constant]
type MaxUnlockingChunks: Get<u32>;
Expand Down Expand Up @@ -513,7 +507,6 @@ pub mod pallet {
pub reward_portion: Vec<Permill>,
pub slot_distribution: Vec<Permill>,
pub tier_thresholds: Vec<TierThreshold>,
pub slot_number_args: (u64, u64),
pub slots_per_tier: Vec<u16>,
pub safeguard: Option<bool>,
pub tier_rank_multipliers: Vec<u32>,
Expand Down Expand Up @@ -551,7 +544,6 @@ pub mod pallet {
required_percentage: Perbill::zero(),
},
],
slot_number_args: FIXED_TIER_SLOTS_ARGS,
slots_per_tier: vec![100; num_tiers as usize],
safeguard: None,
tier_rank_multipliers: vec![0u32, 24_000, 46_700, 0],
Expand All @@ -577,7 +569,6 @@ pub mod pallet {
self.tier_thresholds.clone(),
)
.expect("Invalid number of tier thresholds provided."),
slot_number_args: self.slot_number_args,
tier_rank_multipliers: BoundedVec::<u32, T::NumberOfTiers>::try_from(
self.tier_rank_multipliers.clone(),
)
Expand Down Expand Up @@ -1973,7 +1964,7 @@ pub mod pallet {
// Prepare and return tier & rewards info.
// In case rewards creation fails, we just write the default value. This should never happen though.
(
DAppTierRewards::<T::MaxNumberOfContractsLegacy, T::NumberOfTiers>::new(
DAppTierRewards::<T::MaxNumberOfContracts, T::NumberOfTiers>::new(
dapp_tiers,
tier_rewards,
period,
Expand Down
Loading
Loading