Skip to content

Commit

Permalink
Merge pull request #503 from Setheum-Labs/blend1
Browse files Browse the repository at this point in the history
Blend1 - support DustRemovalWhitelist
  • Loading branch information
balqaasem authored Aug 30, 2021
2 parents 8e650e5 + 813d384 commit 236268e
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 4 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 lib-serml/serp/serp-treasury/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "serp-treasury"
version = "0.8.0"
version = "0.9.0"
authors = ["Setheum Labs"]
edition = "2018"

Expand Down
3 changes: 1 addition & 2 deletions runtime/common/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,7 @@ pub use precompile::{
};
pub use primitives::currency::{
TokenInfo,
DNAR, DRAM, SETR, SETUSD, SETEUR, SETGBP, SETCHF, SEKJ, SGDJ, SETSAR, RENBTC,
USD, EUR, GBP, CHF, SAR, KWD, JOD, BHD, KYD, OMR, GIP,
DNAR, DRAM, SETR, SETUSD, SETEUR, SETGBP, SETCHF, SETSAR, RENBTC,
};

pub type TimeStampedPrice = orml_oracle::TimestampedValue<Price, primitives::Moment>;
Expand Down
9 changes: 9 additions & 0 deletions runtime/newrome/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1100,6 +1100,13 @@ parameter_type_with_key! {
};
}

pub struct DustRemovalWhitelist;
impl Contains<AccountId> for DustRemovalWhitelist {
fn contains(a: &AccountId) -> bool {
get_all_module_accounts().contains(a)
}
}

parameter_types! {
pub TreasuryAccount: AccountId = TreasuryPalletId::get().into_account();
}
Expand All @@ -1112,6 +1119,8 @@ impl orml_tokens::Config for Runtime {
type WeightInfo = weights::orml_tokens::WeightInfo<Runtime>;
type ExistentialDeposits = ExistentialDeposits;
type OnDust = orml_tokens::TransferDust<Runtime, TreasuryAccount>;
type MaxLocks = MaxLocks;
type DustRemovalWhitelist = DustRemovalWhitelist;
}

parameter_types! {
Expand Down
9 changes: 9 additions & 0 deletions runtime/setheum/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1097,6 +1097,13 @@ parameter_type_with_key! {
};
}

pub struct DustRemovalWhitelist;
impl Contains<AccountId> for DustRemovalWhitelist {
fn contains(a: &AccountId) -> bool {
get_all_module_accounts().contains(a)
}
}

parameter_types! {
pub TreasuryAccount: AccountId = TreasuryPalletId::get().into_account();
}
Expand All @@ -1109,6 +1116,8 @@ impl orml_tokens::Config for Runtime {
type WeightInfo = weights::orml_tokens::WeightInfo<Runtime>;
type ExistentialDeposits = ExistentialDeposits;
type OnDust = orml_tokens::TransferDust<Runtime, TreasuryAccount>;
type MaxLocks = MaxLocks;
type DustRemovalWhitelist = DustRemovalWhitelist;
}

parameter_types! {
Expand Down

0 comments on commit 236268e

Please sign in to comment.