Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

change dot ed value and the order of zlk banned call #399

Merged
merged 1 commit into from
Nov 10, 2021
Merged
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
10 changes: 5 additions & 5 deletions runtime/asgard/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1113,18 +1113,18 @@ impl orml_currencies::Config for Runtime {
orml_traits::parameter_type_with_key! {
pub ExistentialDeposits: |currency_id: CurrencyId| -> Balance {
match currency_id {
&CurrencyId::Native(TokenSymbol::ASG) => 10 * MILLIBNC,
&CurrencyId::Native(TokenSymbol::ASG) => 10 * MILLIBNC, // 0.01 BNC
&CurrencyId::Stable(TokenSymbol::KUSD) => 10 * MILLICENTS,
&CurrencyId::Token(TokenSymbol::KSM) => 10 * MILLICENTS,
&CurrencyId::Token(TokenSymbol::KSM) => 10 * MILLICENTS, // 0.0001 KSM
&CurrencyId::Token(TokenSymbol::KAR) => 10 * MILLICENTS,
&CurrencyId::Token(TokenSymbol::DOT) => 10 * MILLICENTS,
&CurrencyId::Token(TokenSymbol::DOT) => 100_000_000, // DOT has a decimals of 10e10, 0.01 DOT
&CurrencyId::Token(TokenSymbol::ZLK) => 1_000_000_000_000, // ZLK has a decimals of 10e18
&CurrencyId::VSToken(TokenSymbol::KSM) => 10 * MILLICENTS,
&CurrencyId::VSToken(TokenSymbol::DOT) => 10 * MILLICENTS,
&CurrencyId::VSToken(TokenSymbol::DOT) => 100_000_000,
&CurrencyId::VSBond(TokenSymbol::ASG, ..) => 10 * MILLICENTS,
&CurrencyId::VSBond(TokenSymbol::KSM, ..) => 10 * MILLICENTS,
&CurrencyId::VSBond(TokenSymbol::BNC, ..) => 10 * MILLICENTS,
&CurrencyId::VSBond(TokenSymbol::DOT, ..) => 10 * MILLICENTS,
&CurrencyId::VSBond(TokenSymbol::DOT, ..) => 100_000_000,
&CurrencyId::LPToken(..) => 10 * MILLICENTS,
_ => Balance::max_value() // unsupported
}
Expand Down
24 changes: 12 additions & 12 deletions runtime/bifrost/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -184,6 +184,13 @@ parameter_types! {
pub struct CallFilter;
impl Contains<Call> for CallFilter {
fn contains(call: &Call) -> bool {
let is_core_call =
matches!(call, Call::System(_) | Call::Timestamp(_) | Call::ParachainSystem(_));
if is_core_call {
// always allow core call
return true;
}

// temporarily ban ZLK transfer and PhragmenElection
let is_temporarily_banned = matches!(
call,
Expand All @@ -210,13 +217,6 @@ impl Contains<Call> for CallFilter {
return false;
}

let is_core_call =
matches!(call, Call::System(_) | Call::Timestamp(_) | Call::ParachainSystem(_));
if is_core_call {
// always allow core call
return true;
}

let is_switched_off =
bifrost_call_switchgear::SwitchOffTransactionFilter::<Runtime>::contains(call);
if is_switched_off {
Expand Down Expand Up @@ -1121,17 +1121,17 @@ impl orml_currencies::Config for Runtime {
orml_traits::parameter_type_with_key! {
pub ExistentialDeposits: |currency_id: CurrencyId| -> Balance {
match currency_id {
&CurrencyId::Native(TokenSymbol::BNC) => 10 * MILLIBNC,
&CurrencyId::Native(TokenSymbol::BNC) => 10 * MILLIBNC, // 0.01 BNC
&CurrencyId::Stable(TokenSymbol::KUSD) => 10 * MILLICENTS,
&CurrencyId::Token(TokenSymbol::KSM) => 10 * MILLICENTS,
&CurrencyId::Token(TokenSymbol::KSM) => 10 * MILLICENTS, // 0.0001 KSM
&CurrencyId::Token(TokenSymbol::KAR) => 10 * MILLICENTS,
&CurrencyId::Token(TokenSymbol::DOT) => 10 * MILLICENTS,
&CurrencyId::Token(TokenSymbol::DOT) => 100_000_000, // DOT has a decimals of 10e10, 0.01 DOT
&CurrencyId::Token(TokenSymbol::ZLK) => 1_000_000_000_000, // ZLK has a decimals of 10e18
&CurrencyId::VSToken(TokenSymbol::KSM) => 10 * MILLICENTS,
&CurrencyId::VSToken(TokenSymbol::DOT) => 10 * MILLICENTS,
&CurrencyId::VSToken(TokenSymbol::DOT) => 100_000_000,
&CurrencyId::VSBond(TokenSymbol::BNC, ..) => 10 * MILLICENTS,
&CurrencyId::VSBond(TokenSymbol::KSM, ..) => 10 * MILLICENTS,
&CurrencyId::VSBond(TokenSymbol::DOT, ..) => 10 * MILLICENTS,
&CurrencyId::VSBond(TokenSymbol::DOT, ..) => 100_000_000,
&CurrencyId::LPToken(..) => 10 * MILLICENTS,
_ => Balance::max_value() // unsupported
}
Expand Down