Skip to content

Commit

Permalink
Fixes snowbridge integration test (#3570)
Browse files Browse the repository at this point in the history
Fixes the snowbridge test by using the new Penpal config.

---------

Co-authored-by: claravanstaden <Cats 4 life!>
  • Loading branch information
claravanstaden authored Mar 6, 2024
1 parent 48ef581 commit d3d9a1d
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 2 deletions.
1 change: 1 addition & 0 deletions Cargo.lock

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

Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@
mod genesis;
pub use genesis::{genesis, ED, PARA_ID_A, PARA_ID_B};
pub use penpal_runtime::xcm_config::{
LocalTeleportableToAssetHub, LocalTeleportableToAssetHubV3, XcmConfig,
CustomizableAssetFromSystemAssetHub, LocalTeleportableToAssetHub,
LocalTeleportableToAssetHubV3, XcmConfig,
};

// Substrate
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ emulated-integration-tests-common = { path = "../../../common", default-features
rococo-westend-system-emulated-network = { path = "../../../networks/rococo-westend-system" }
rococo-system-emulated-network = { path = "../../../networks/rococo-system" }
asset-hub-rococo-runtime = { path = "../../../../../runtimes/assets/asset-hub-rococo", default-features = false }
penpal-emulated-chain = { path = "../../../chains/parachains/testing/penpal", default-features = false }

# Snowbridge
snowbridge-core = { path = "../../../../../../../bridges/snowbridge/primitives/core", default-features = false }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ use codec::{Decode, Encode};
use emulated_integration_tests_common::xcm_emulator::ConvertLocation;
use frame_support::pallet_prelude::TypeInfo;
use hex_literal::hex;
use penpal_emulated_chain::CustomizableAssetFromSystemAssetHub;
use rococo_westend_system_emulated_network::BridgeHubRococoParaSender as BridgeHubRococoSender;
use snowbridge_core::outbound::OperatingMode;
use snowbridge_pallet_inbound_queue_fixtures::{
Expand Down Expand Up @@ -253,6 +254,16 @@ fn send_token_from_ethereum_to_penpal() {
(PenpalASender::get(), INITIAL_FUND),
]);

PenpalA::execute_with(|| {
assert_ok!(<PenpalA as Chain>::System::set_storage(
<PenpalA as Chain>::RuntimeOrigin::root(),
vec![(
CustomizableAssetFromSystemAssetHub::key().to_vec(),
Location::new(2, [GlobalConsensus(Ethereum { chain_id: CHAIN_ID })]).encode(),
)],
));
});

// The Weth asset location, identified by the contract address on Ethereum
let weth_asset_location: Location =
(Parent, Parent, EthereumNetwork::get(), AccountKey20 { network: None, key: WETH }).into();
Expand Down
2 changes: 1 addition & 1 deletion substrate/frame/support/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -95,9 +95,9 @@ std = [
"sp-staking/std",
"sp-state-machine/std",
"sp-std/std",
"sp-timestamp/std",
"sp-tracing/std",
"sp-weights/std",
"sp-timestamp/std"
]
runtime-benchmarks = [
"frame-system/runtime-benchmarks",
Expand Down

0 comments on commit d3d9a1d

Please sign in to comment.