substrate icon indicating copy to clipboard operation
substrate copied to clipboard

Add a dust removal whitelist to `pallet-balances`

Open maltekliemann opened this issue 2 years ago • 3 comments

A whitelisted account is an account whose dust will not be collected even if it's balances is below the existential deposit or zero. orml_tokens implements whitelisted accounts using a DustRemovalWhitelist config parameter which implements frame_support::traits::Contains<Self::AccountId>; an account is whitelisted if DustRemovalWhitelist::contains(&account) is true.

This type of feature seems like a good fit for pallet-balances, as well. For example, accounts holding some type of collateral should be whitelisted. Unless, of course, I'm completely overlooking some other feature which allows us to do this already.

I'd be willing to write the PR myself, if that helps.

maltekliemann avatar Jan 25 '23 12:01 maltekliemann