Skip to content

Commit

Permalink
Merge branch 'master' into stableswap-invariants
Browse files Browse the repository at this point in the history
  • Loading branch information
enthusiastmartin authored Jul 31, 2023
2 parents 7d783ab + 6173a8b commit ca7d4c4
Show file tree
Hide file tree
Showing 6 changed files with 23 additions and 6 deletions.
4 changes: 2 additions & 2 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion integration-tests/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "runtime-integration-tests"
version = "1.8.1"
version = "1.8.2"
description = "Integration tests"
authors = ["GalacticCouncil"]
edition = "2021"
Expand Down
18 changes: 17 additions & 1 deletion integration-tests/src/call_filter.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ use frame_support::{
assert_ok,
sp_runtime::{FixedU128, Permill},
traits::Contains,
weights::Weight,
};
use polkadot_xcm::latest::prelude::*;
use polkadot_xcm::VersionedXcm;
Expand Down Expand Up @@ -206,7 +207,7 @@ fn transfer_should_not_work_when_transfering_omnipool_assets_to_omnipool_account
}

#[test]
fn calling_pallet_xcm_extrinsic_should_be_filtered_by_call_filter() {
fn calling_pallet_xcm_send_extrinsic_should_not_be_filtered_by_call_filter() {
TestNet::reset();

Hydra::execute_with(|| {
Expand All @@ -216,6 +217,21 @@ fn calling_pallet_xcm_extrinsic_should_be_filtered_by_call_filter() {
message: Box::new(VersionedXcm::from(Xcm(vec![]))),
});

assert!(hydradx_runtime::CallFilter::contains(&call));
});
}

#[test]
fn calling_pallet_xcm_extrinsic_should_be_filtered_by_call_filter() {
TestNet::reset();

Hydra::execute_with(|| {
// the values here don't need to make sense, all we need is a valid Call
let call = hydradx_runtime::RuntimeCall::PolkadotXcm(pallet_xcm::Call::execute {
message: Box::new(VersionedXcm::from(Xcm(vec![]))),
max_weight: Weight::zero(),
});

assert!(!hydradx_runtime::CallFilter::contains(&call));
});
}
Expand Down
2 changes: 1 addition & 1 deletion runtime/hydradx/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "hydradx-runtime"
version = "169.0.0"
version = "170.0.0"
authors = ["GalacticCouncil"]
edition = "2021"
license = "Apache 2.0"
Expand Down
2 changes: 1 addition & 1 deletion runtime/hydradx/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ pub const VERSION: RuntimeVersion = RuntimeVersion {
spec_name: create_runtime_str!("hydradx"),
impl_name: create_runtime_str!("hydradx"),
authoring_version: 1,
spec_version: 169,
spec_version: 170,
impl_version: 0,
apis: RUNTIME_API_VERSIONS,
transaction_version: 1,
Expand Down
1 change: 1 addition & 0 deletions runtime/hydradx/src/system.rs
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@ impl Contains<RuntimeCall> for CallFilter {
}

match call {
RuntimeCall::PolkadotXcm(pallet_xcm::Call::send { .. }) => true,
RuntimeCall::PolkadotXcm(_) => false,
RuntimeCall::OrmlXcm(_) => false,
_ => true,
Expand Down

0 comments on commit ca7d4c4

Please sign in to comment.