Make Proxy NonTransfer filter explicit (#1303)

* Make kusama proxy explicit

* Make polkadot explicit

* Make westend explicit

* bump spec
This commit is contained in:
Shawn Tabrizi
2020-06-23 13:14:38 +02:00
committed by GitHub
parent 26f975511f
commit 3f53deb10e
3 changed files with 117 additions and 8 deletions
+44 -3
View File
@@ -800,9 +800,50 @@ impl InstanceFilter<Call> for ProxyType {
fn filter(&self, c: &Call) -> bool {
match self {
ProxyType::Any => true,
ProxyType::NonTransfer => !matches!(c,
Call::Balances(..) | Call::Vesting(vesting::Call::vested_transfer(..))
| Call::Indices(indices::Call::transfer(..))
ProxyType::NonTransfer => matches!(c,
Call::System(..) |
Call::Babe(..) |
Call::Timestamp(..) |
Call::Indices(indices::Call::claim(..)) |
Call::Indices(indices::Call::free(..)) |
Call::Indices(indices::Call::freeze(..)) |
// Specifically omitting Indices `transfer`, `force_transfer`
// Specifically omitting the entire Balances pallet
Call::Authorship(..) |
Call::Staking(..) |
Call::Offences(..) |
Call::Session(..) |
Call::FinalityTracker(..) |
Call::Grandpa(..) |
Call::ImOnline(..) |
Call::AuthorityDiscovery(..) |
Call::Democracy(..) |
Call::Council(..) |
Call::TechnicalCommittee(..) |
Call::ElectionsPhragmen(..) |
Call::TechnicalMembership(..) |
Call::Treasury(..) |
Call::Claims(..) |
Call::Parachains(..) |
Call::Attestations(..) |
Call::Slots(..) |
Call::Registrar(..) |
Call::Utility(..) |
Call::Identity(..) |
Call::Society(..) |
Call::Recovery(recovery::Call::as_recovered(..)) |
Call::Recovery(recovery::Call::vouch_recovery(..)) |
Call::Recovery(recovery::Call::claim_recovery(..)) |
Call::Recovery(recovery::Call::close_recovery(..)) |
Call::Recovery(recovery::Call::remove_recovery(..)) |
Call::Recovery(recovery::Call::cancel_recovered(..)) |
// Specifically omitting Recovery `create_recovery`, `initiate_recovery`
Call::Vesting(vesting::Call::vest(..)) |
Call::Vesting(vesting::Call::vest_other(..)) |
// Specifically omitting Vesting `vested_transfer`, and `force_vested_transfer`
Call::Scheduler(..) |
Call::Proxy(..) |
Call::Multisig(..)
),
ProxyType::Governance => matches!(c,
Call::Democracy(..) | Call::Council(..) | Call::TechnicalCommittee(..)