mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-05-30 11:41:02 +00:00
Make Proxy NonTransfer filter explicit (#1303)
* Make kusama proxy explicit * Make polkadot explicit * Make westend explicit * bump spec
This commit is contained in:
@@ -800,9 +800,50 @@ impl InstanceFilter<Call> for ProxyType {
|
|||||||
fn filter(&self, c: &Call) -> bool {
|
fn filter(&self, c: &Call) -> bool {
|
||||||
match self {
|
match self {
|
||||||
ProxyType::Any => true,
|
ProxyType::Any => true,
|
||||||
ProxyType::NonTransfer => !matches!(c,
|
ProxyType::NonTransfer => matches!(c,
|
||||||
Call::Balances(..) | Call::Vesting(vesting::Call::vested_transfer(..))
|
Call::System(..) |
|
||||||
| Call::Indices(indices::Call::transfer(..))
|
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,
|
ProxyType::Governance => matches!(c,
|
||||||
Call::Democracy(..) | Call::Council(..) | Call::TechnicalCommittee(..)
|
Call::Democracy(..) | Call::Council(..) | Call::TechnicalCommittee(..)
|
||||||
|
|||||||
@@ -784,9 +784,43 @@ impl InstanceFilter<Call> for ProxyType {
|
|||||||
fn filter(&self, c: &Call) -> bool {
|
fn filter(&self, c: &Call) -> bool {
|
||||||
match self {
|
match self {
|
||||||
ProxyType::Any => true,
|
ProxyType::Any => true,
|
||||||
ProxyType::NonTransfer => !matches!(c,
|
ProxyType::NonTransfer => matches!(c,
|
||||||
Call::Balances(..) | Call::Vesting(vesting::Call::vested_transfer(..))
|
Call::System(..) |
|
||||||
| Call::Indices(indices::Call::transfer(..))
|
Call::Scheduler(..) |
|
||||||
|
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::Parachains(..) |
|
||||||
|
Call::Attestations(..) |
|
||||||
|
Call::Slots(..) |
|
||||||
|
Call::Registrar(..) |
|
||||||
|
Call::Claims(..) |
|
||||||
|
Call::Vesting(vesting::Call::vest(..)) |
|
||||||
|
Call::Vesting(vesting::Call::vest_other(..)) |
|
||||||
|
// Specifically omitting Vesting `vested_transfer`, and `force_vested_transfer`
|
||||||
|
Call::Utility(..) |
|
||||||
|
// Specifically omitting Sudo pallet
|
||||||
|
Call::Identity(..) |
|
||||||
|
Call::Proxy(..) |
|
||||||
|
Call::Multisig(..)
|
||||||
),
|
),
|
||||||
ProxyType::Governance => matches!(c,
|
ProxyType::Governance => matches!(c,
|
||||||
Call::Democracy(..) | Call::Council(..) | Call::TechnicalCommittee(..)
|
Call::Democracy(..) | Call::Council(..) | Call::TechnicalCommittee(..)
|
||||||
|
|||||||
@@ -587,8 +587,42 @@ impl InstanceFilter<Call> for ProxyType {
|
|||||||
fn filter(&self, c: &Call) -> bool {
|
fn filter(&self, c: &Call) -> bool {
|
||||||
match self {
|
match self {
|
||||||
ProxyType::Any => true,
|
ProxyType::Any => true,
|
||||||
ProxyType::NonTransfer => !matches!(c,
|
ProxyType::NonTransfer => matches!(c,
|
||||||
Call::Balances(..) | Call::Indices(indices::Call::transfer(..))
|
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::Parachains(..) |
|
||||||
|
Call::Attestations(..) |
|
||||||
|
Call::Registrar(..) |
|
||||||
|
Call::Utility(..) |
|
||||||
|
Call::Identity(..) |
|
||||||
|
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(..) |
|
||||||
|
// Specifically omitting Sudo pallet
|
||||||
|
Call::Proxy(..) |
|
||||||
|
Call::Multisig(..)
|
||||||
),
|
),
|
||||||
ProxyType::Staking => matches!(c,
|
ProxyType::Staking => matches!(c,
|
||||||
Call::Staking(..) | Call::Utility(utility::Call::batch(..))
|
Call::Staking(..) | Call::Utility(utility::Call::batch(..))
|
||||||
|
|||||||
Reference in New Issue
Block a user