Skip to content

Commit

Permalink
stop forbidding calls to polkadotXcm pallet
Browse files Browse the repository at this point in the history
  • Loading branch information
Agusrodri committed Sep 6, 2023
1 parent 5e7f4c8 commit 76adce8
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 19 deletions.
5 changes: 0 additions & 5 deletions container-chains/templates/frontier/runtime/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -567,11 +567,6 @@ impl Contains<RuntimeCall> for NormalFilter {
// Note: It is also assumed that EVM calls are only allowed through `Origin::Root` so
// this can be seen as an additional security
RuntimeCall::EVM(_) => false,
// Only allow force_default_xcm_version
RuntimeCall::PolkadotXcm(method) => match method {
pallet_xcm::Call::force_default_xcm_version { .. } => true,
_ => false,
},
_ => true,
}
}
Expand Down
11 changes: 2 additions & 9 deletions container-chains/templates/simple/runtime/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -445,15 +445,8 @@ impl Contains<RuntimeCall> for MaintenanceFilter {
/// This can change in the future
pub struct NormalFilter;
impl Contains<RuntimeCall> for NormalFilter {
fn contains(c: &RuntimeCall) -> bool {
match c {
// Only allow force_default_xcm_version
RuntimeCall::PolkadotXcm(method) => match method {
pallet_xcm::Call::force_default_xcm_version { .. } => true,
_ => false,
},
_ => true,
}
fn contains(_c: &RuntimeCall) -> bool {
true
}
}

Expand Down
5 changes: 0 additions & 5 deletions runtime/dancebox/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -775,11 +775,6 @@ impl Contains<RuntimeCall> for NormalFilter {
pallet_proxy::Call::kill_pure { .. } => false,
_ => true,
},
// Only allow force_default_xcm_version
RuntimeCall::PolkadotXcm(method) => match method {
pallet_xcm::Call::force_default_xcm_version { .. } => true,
_ => false,
},
_ => true,
}
}
Expand Down

0 comments on commit 76adce8

Please sign in to comment.