Skip to content

Commit

Permalink
feat(pallets/subspace): update parameters of proposals
Browse files Browse the repository at this point in the history
  • Loading branch information
aripiprazole committed May 3, 2024
1 parent aa7df07 commit 5c49ff6
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions pallets/subspace/src/global.rs
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ impl<T: Config> Pallet<T> {
pub fn check_global_params(params: &GlobalParams<T>) -> DispatchResult {
// checks if params are valid
let old_params = Self::global_params();
let floor_founder_share = FloorFounderShare::<T>::get() as u16;

// check if the name already exists
ensure!(params.max_name_length > 0, Error::<T>::InvalidMaxNameLength);
Expand Down Expand Up @@ -91,6 +92,12 @@ impl<T: Config> Pallet<T> {
Error::<T>::InvalidUnitEmission
);

// Make sure of floor founder share
ensure!(
floor_founder_share >= params.founder_share,
Error::<T>::InvalidFounderShare
);

// Make sure that the burn rate is below 100%
ensure!(params.burn_rate <= 100, Error::<T>::InvalidBurnRate);

Expand Down

0 comments on commit 5c49ff6

Please sign in to comment.