Skip to content

Commit

Permalink
fix matching
Browse files Browse the repository at this point in the history
  • Loading branch information
camfairchild committed Nov 6, 2024
1 parent a78f33c commit 10dfecb
Showing 1 changed file with 12 additions and 4 deletions.
16 changes: 12 additions & 4 deletions runtime/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -643,7 +643,7 @@ pub enum ProxyType {
Transfer,
SmallTransfer,
RootWeights,
SetCode,
SudoUncheckedSetCode,
}
// Transfers below SMALL_TRANSFER_LIMIT are considered small transfers
pub const SMALL_TRANSFER_LIMIT: Balance = 500_000_000; // 0.5 TAO
Expand Down Expand Up @@ -716,9 +716,17 @@ impl InstanceFilter<RuntimeCall> for ProxyType {
c,
RuntimeCall::SubtensorModule(pallet_subtensor::Call::set_root_weights { .. })
),
ProxyType::SetCode => {
matches!(c, RuntimeCall::System(frame_system::Call::set_code { .. }))
}
ProxyType::SudoUncheckedSetCode => match c {
RuntimeCall::Sudo(pallet_sudo::Call::sudo_unchecked_weight { call, weight: _ }) => {
let inner_call: RuntimeCall = *call.clone();

matches!(
inner_call,
RuntimeCall::System(frame_system::Call::set_code { .. })
)
}
_ => false,
},
}
}
fn is_superset(&self, o: &Self) -> bool {
Expand Down

0 comments on commit 10dfecb

Please sign in to comment.