Skip to content

Commit

Permalink
Merge pull request #272 from galacticcouncil/vesting-disable
Browse files Browse the repository at this point in the history
fix: restricted vesting calls
  • Loading branch information
mrq1911 authored Dec 3, 2021
2 parents dd0e434 + 884e911 commit 24fd7e2
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 9 deletions.
2 changes: 1 addition & 1 deletion Cargo.lock

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

2 changes: 1 addition & 1 deletion runtime/basilisk/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "basilisk-runtime"
version = "22.0.0"
version = "24.0.0"
authors = ["GalacticCouncil"]
edition = "2018"
homepage = "https://github.com/galacticcouncil/Basilisk-node"
Expand Down
10 changes: 6 additions & 4 deletions runtime/basilisk/src/benchmarking/vesting.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
use crate::{AccountId, AssetId, Balance, NativeAssetId, Runtime};
use crate::{BlockNumber, Currencies, MaxVestingSchedules, MinVestedTransfer, System, Vesting};
use crate::{BlockNumber, Currencies, MaxVestingSchedules, System, Vesting};

use super::BSX;

Expand All @@ -17,6 +17,8 @@ use orml_traits::MultiCurrency;
use orml_traits::MultiCurrencyExtended;
use orml_vesting::VestingSchedule;

use primitives::constants::currency::NATIVE_EXISTENTIAL_DEPOSIT;

use sp_runtime::traits::{SaturatedConversion, StaticLookup};

pub type Schedule = VestingSchedule<BlockNumber, Balance>;
Expand Down Expand Up @@ -49,7 +51,7 @@ runtime_benchmarks! {
start: 0,
period: 2,
period_count: 3,
per_period: MinVestedTransfer::get(),
per_period: NATIVE_EXISTENTIAL_DEPOSIT,
};

let from: AccountId = get_vesting_account();
Expand All @@ -72,7 +74,7 @@ runtime_benchmarks! {
start: 0,
period: 2,
period_count: 3,
per_period: MinVestedTransfer::get(),
per_period: NATIVE_EXISTENTIAL_DEPOSIT,
};

let from: AccountId = get_vesting_account();
Expand Down Expand Up @@ -101,7 +103,7 @@ runtime_benchmarks! {
start: 0,
period: 2,
period_count: 3,
per_period: MinVestedTransfer::get(),
per_period: NATIVE_EXISTENTIAL_DEPOSIT,
};

let to: AccountId = account("to", 0, SEED);
Expand Down
3 changes: 2 additions & 1 deletion runtime/basilisk/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ pub const VERSION: RuntimeVersion = RuntimeVersion {
spec_name: create_runtime_str!("basilisk"),
impl_name: create_runtime_str!("basilisk"),
authoring_version: 1,
spec_version: 23,
spec_version: 24,
impl_version: 0,
apis: RUNTIME_API_VERSIONS,
transaction_version: 1,
Expand All @@ -129,6 +129,7 @@ impl Contains<Call> for BaseFilter {
Call::XYK(_) => false,
Call::NFT(_) => false,
Call::Exchange(_) => false,
Call::Vesting(_) => false,
_ => true,
}
}
Expand Down
4 changes: 2 additions & 2 deletions runtime/common/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -225,6 +225,6 @@ parameter_types! {

// pallet vesting
parameter_types! {
pub MinVestedTransfer: Balance = 100_000 * UNITS;
pub const MaxVestingSchedules: u32 = 100;
pub MinVestedTransfer: Balance = 100_000;
pub const MaxVestingSchedules: u32 = 15;
}

0 comments on commit 24fd7e2

Please sign in to comment.