File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -197,11 +197,15 @@ impl Contains<RuntimeCall> for BaseCallFilter {
197197 ) {
198198 // always allow core calls
199199 true
200- } else if let RuntimeCall :: PolkadotXcm ( _ ) = call {
201- // For security reasons, disallow usage of the xcm package by users. Sudo and
200+ } else if let RuntimeCall :: PolkadotXcm ( polkadot_xcm_call ) = call {
201+ // For security reasons, disallow most usage of the xcm package by users. Sudo and
202202 // governance are still able to call these (sudo is explicitly white-listed, while
203203 // governance bypasses this call filter).
204- false
204+
205+ // We do allow PolkadotXcm.send - it's needed for e.g. wormhole interactions on
206+ // moonbeam/moonriver. We could probably also allow other functions, but this way
207+ // we don't need to worry about security implications of these functions
208+ matches ! ( polkadot_xcm_call, pallet_xcm:: Call :: <Runtime >:: send { .. } )
205209 } else if let RuntimeCall :: EVM ( _) = call {
206210 // disable non-root EVM access
207211 false
Original file line number Diff line number Diff line change @@ -196,11 +196,15 @@ impl Contains<RuntimeCall> for BaseCallFilter {
196196 ) {
197197 // always allow core calls
198198 true
199- } else if let RuntimeCall :: PolkadotXcm ( _ ) = call {
200- // For security reasons, disallow usage of the xcm package by users. Sudo and
199+ } else if let RuntimeCall :: PolkadotXcm ( polkadot_xcm_call ) = call {
200+ // For security reasons, disallow most usage of the xcm package by users. Sudo and
201201 // governance are still able to call these (sudo is explicitly white-listed, while
202202 // governance bypasses this call filter).
203- false
203+
204+ // We do allow PolkadotXcm.send - it's needed for e.g. wormhole interactions on
205+ // moonbeam/moonriver. We could probably also allow other functions, but this way
206+ // we don't need to worry about security implications of these functions
207+ matches ! ( polkadot_xcm_call, pallet_xcm:: Call :: <Runtime >:: send { .. } )
204208 } else if let RuntimeCall :: EVM ( _) = call {
205209 // disable non-root EVM access
206210 false
You can’t perform that action at this time.
0 commit comments