Skip to content
This repository was archived by the owner on Aug 15, 2025. It is now read-only.

Commit c1107dc

Browse files
claravanstadenclaravanstaden
authored andcommitted
Cargo cleanup and renames (#94)
* renames ethereum client pallet * more renames * renames inbound queue pallet * more renames * taplo * fix imports * fix imports * rename again * remove config crates and move config * missing config import --------- Co-authored-by: claravanstaden <Cats 4 life!>
1 parent 737015f commit c1107dc

21 files changed

Lines changed: 147 additions & 168 deletions

File tree

Cargo.lock

Lines changed: 51 additions & 75 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

cumulus/parachains/common/src/rococo.rs

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -117,3 +117,16 @@ pub mod consensus {
117117
/// Relay chain slot duration, in milliseconds.
118118
pub const RELAY_CHAIN_SLOT_DURATION_MILLIS: u32 = 6000;
119119
}
120+
121+
pub mod snowbridge {
122+
use frame_support::parameter_types;
123+
use xcm::opaque::lts::NetworkId;
124+
125+
/// The pallet index of the Ethereum inbound queue pallet in the bridge hub runtime.
126+
pub const INBOUND_QUEUE_PALLET_INDEX: u8 = 80;
127+
128+
parameter_types! {
129+
/// Network and location for the Ethereum chain.
130+
pub EthereumNetwork: NetworkId = NetworkId::Ethereum { chain_id: 11155111 };
131+
}
132+
}

cumulus/parachains/integration-tests/emulated/chains/parachains/bridges/bridge-hub-rococo/Cargo.toml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,6 @@ bridge-hub-common = { path = "../../../../../../runtimes/bridge-hubs/common", de
3030
# Snowbridge
3131
snowbridge-core = { path = "../../../../../../../../bridges/snowbridge/parachain/primitives/core", default-features = false }
3232
snowbridge-router-primitives = { path = "../../../../../../../../bridges/snowbridge/parachain/primitives/router", default-features = false }
33-
snowbridge-system = { path = "../../../../../../../../bridges/snowbridge/parachain/pallets/system", default-features = false }
34-
snowbridge-inbound-queue = { path = "../../../../../../../../bridges/snowbridge/parachain/pallets/inbound-queue", default-features = false }
35-
snowbridge-outbound-queue = { path = "../../../../../../../../bridges/snowbridge/parachain/pallets/outbound-queue", default-features = false }
33+
snowbridge-pallet-system = { path = "../../../../../../../../bridges/snowbridge/parachain/pallets/system", default-features = false }
34+
snowbridge-pallet-inbound-queue = { path = "../../../../../../../../bridges/snowbridge/parachain/pallets/inbound-queue", default-features = false }
35+
snowbridge-pallet-outbound-queue = { path = "../../../../../../../../bridges/snowbridge/parachain/pallets/outbound-queue", default-features = false }

cumulus/parachains/integration-tests/emulated/tests/bridges/bridge-hub-rococo/Cargo.toml

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,6 @@ asset-hub-rococo-runtime = { path = "../../../../../runtimes/assets/asset-hub-ro
4848
# Snowbridge
4949
snowbridge-core = { path = "../../../../../../../bridges/snowbridge/parachain/primitives/core", default-features = false }
5050
snowbridge-router-primitives = { path = "../../../../../../../bridges/snowbridge/parachain/primitives/router", default-features = false }
51-
snowbridge-system = { path = "../../../../../../../bridges/snowbridge/parachain/pallets/system", default-features = false }
52-
snowbridge-inbound-queue = { path = "../../../../../../../bridges/snowbridge/parachain/pallets/inbound-queue", default-features = false }
53-
snowbridge-outbound-queue = { path = "../../../../../../../bridges/snowbridge/parachain/pallets/outbound-queue", default-features = false }
54-
snowbridge-rococo-common = { path = "../../../../../../../bridges/snowbridge/parachain/runtime/rococo-common", default-features = false }
51+
snowbridge-pallet-system = { path = "../../../../../../../bridges/snowbridge/parachain/pallets/system", default-features = false }
52+
snowbridge-pallet-inbound-queue = { path = "../../../../../../../bridges/snowbridge/parachain/pallets/inbound-queue", default-features = false }
53+
snowbridge-pallet-outbound-queue = { path = "../../../../../../../bridges/snowbridge/parachain/pallets/outbound-queue", default-features = false }

cumulus/parachains/integration-tests/emulated/tests/bridges/bridge-hub-rococo/src/tests/snowbridge.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,11 @@ use emulated_integration_tests_common::xcm_emulator::ConvertLocation;
1818
use frame_support::pallet_prelude::TypeInfo;
1919
use hex_literal::hex;
2020
use snowbridge_core::outbound::OperatingMode;
21-
use snowbridge_rococo_common::EthereumNetwork;
21+
use parachains_common::rococo::snowbridge::EthereumNetwork;
2222
use snowbridge_router_primitives::inbound::{
2323
Command, Destination, GlobalConsensusEthereumConvertsFor, MessageV1, VersionedMessage,
2424
};
25-
use snowbridge_system;
25+
use snowbridge_pallet_system;
2626
use sp_core::H256;
2727

2828
const INITIAL_FUND: u128 = 5_000_000_000 * ROCOCO_ED;
@@ -94,7 +94,7 @@ fn create_agent() {
9494
assert_expected_events!(
9595
BridgeHubRococo,
9696
vec![
97-
RuntimeEvent::EthereumSystem(snowbridge_system::Event::CreateAgent {
97+
RuntimeEvent::EthereumSystem(snowbridge_pallet_system::Event::CreateAgent {
9898
..
9999
}) => {},
100100
]
@@ -168,7 +168,7 @@ fn create_channel() {
168168
assert_expected_events!(
169169
BridgeHubRococo,
170170
vec![
171-
RuntimeEvent::EthereumSystem(snowbridge_system::Event::CreateChannel {
171+
RuntimeEvent::EthereumSystem(snowbridge_pallet_system::Event::CreateChannel {
172172
..
173173
}) => {},
174174
]
@@ -484,7 +484,7 @@ fn send_weth_asset_from_asset_hub_to_ethereum() {
484484
assert_expected_events!(
485485
BridgeHubRococo,
486486
vec![
487-
RuntimeEvent::EthereumOutboundQueue(snowbridge_outbound_queue::Event::MessageQueued {..}) => {},
487+
RuntimeEvent::EthereumOutboundQueue(snowbridge_pallet_outbound_queue::Event::MessageQueued {..}) => {},
488488
]
489489
);
490490
let events = BridgeHubRococo::events();

cumulus/parachains/runtimes/assets/asset-hub-rococo/Cargo.toml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,6 @@ bp-asset-hub-westend = { path = "../../../../../bridges/primitives/chain-asset-h
9191
bp-bridge-hub-rococo = { path = "../../../../../bridges/primitives/chain-bridge-hub-rococo", default-features = false }
9292
bp-bridge-hub-westend = { path = "../../../../../bridges/primitives/chain-bridge-hub-westend", default-features = false }
9393
snowbridge-router-primitives = { path = "../../../../../bridges/snowbridge/parachain/primitives/router", default-features = false }
94-
snowbridge-rococo-common = { path = "../../../../../bridges/snowbridge/parachain/runtime/rococo-common", default-features = false }
9594

9695
[dev-dependencies]
9796
asset-test-utils = { path = "../test-utils" }
@@ -139,7 +138,6 @@ runtime-benchmarks = [
139138
"parachains-common/runtime-benchmarks",
140139
"polkadot-parachain-primitives/runtime-benchmarks",
141140
"polkadot-runtime-common/runtime-benchmarks",
142-
"snowbridge-rococo-common/runtime-benchmarks",
143141
"snowbridge-router-primitives/runtime-benchmarks",
144142
"sp-runtime/runtime-benchmarks",
145143
"xcm-builder/runtime-benchmarks",
@@ -231,7 +229,6 @@ std = [
231229
"primitive-types/std",
232230
"rococo-runtime-constants/std",
233231
"scale-info/std",
234-
"snowbridge-rococo-common/std",
235232
"snowbridge-router-primitives/std",
236233
"sp-api/std",
237234
"sp-block-builder/std",

cumulus/parachains/runtimes/assets/asset-hub-rococo/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ use assets_common::{
3535
};
3636
use cumulus_pallet_parachain_system::RelayNumberStrictlyIncreases;
3737
use cumulus_primitives_core::AggregateMessageOrigin;
38-
use snowbridge_rococo_common::EthereumNetwork;
38+
use parachains_common::rococo::snowbridge::EthereumNetwork;
3939
use sp_api::impl_runtime_apis;
4040
use sp_core::{crypto::KeyTypeId, OpaqueMetadata};
4141
use sp_runtime::{

cumulus/parachains/runtimes/assets/asset-hub-rococo/src/xcm_config.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ use parachains_common::{
3939
};
4040
use polkadot_parachain_primitives::primitives::Sibling;
4141
use polkadot_runtime_common::xcm_sender::ExponentialPrice;
42-
use snowbridge_rococo_common::EthereumNetwork;
42+
use parachains_common::rococo::snowbridge::EthereumNetwork;
4343
use snowbridge_router_primitives::inbound::GlobalConsensusEthereumConvertsFor;
4444
use sp_runtime::traits::{AccountIdConversion, ConvertInto};
4545
use xcm::latest::prelude::*;
@@ -817,7 +817,7 @@ pub mod bridging {
817817
1,
818818
X2(
819819
Parachain(SiblingBridgeHubParaId::get()),
820-
PalletInstance(snowbridge_rococo_common::INBOUND_QUEUE_MESSAGES_PALLET_INDEX)
820+
PalletInstance(parachains_common::rococo::snowbridge::INBOUND_QUEUE_PALLET_INDEX)
821821
)
822822
);
823823

0 commit comments

Comments
 (0)