Skip to content
This repository has been archived by the owner on Oct 22, 2024. It is now read-only.

Commit

Permalink
more renames
Browse files Browse the repository at this point in the history
  • Loading branch information
claravanstaden authored and claravanstaden committed Jan 10, 2024
1 parent aea4428 commit ade368b
Show file tree
Hide file tree
Showing 12 changed files with 58 additions and 58 deletions.
40 changes: 20 additions & 20 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 @@ -30,6 +30,6 @@ bridge-hub-common = { path = "../../../../../../runtimes/bridge-hubs/common", de
# Snowbridge
snowbridge-core = { path = "../../../../../../../../../parachain/primitives/core", default-features = false }
snowbridge-router-primitives = { path = "../../../../../../../../../parachain/primitives/router", default-features = false }
snowbridge-system = { path = "../../../../../../../../../parachain/pallets/system", default-features = false }
snowbridge-system-pallet = { path = "../../../../../../../../../parachain/pallets/system", default-features = false }
snowbridge-inbound-queue-pallet = { path = "../../../../../../../../../parachain/pallets/inbound-queue", default-features = false }
snowbridge-outbound-queue = { path = "../../../../../../../../../parachain/pallets/outbound-queue", default-features = false }
snowbridge-outbound-queue-pallet = { path = "../../../../../../../../../parachain/pallets/outbound-queue", default-features = false }
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ asset-hub-rococo-runtime = { path = "../../../../../runtimes/assets/asset-hub-ro
# Snowbridge
snowbridge-core = { path = "../../../../../../../../parachain/primitives/core", default-features = false }
snowbridge-router-primitives = { path = "../../../../../../../../parachain/primitives/router", default-features = false }
snowbridge-system = { path = "../../../../../../../../parachain/pallets/system", default-features = false }
snowbridge-system-pallet = { path = "../../../../../../../../parachain/pallets/system", default-features = false }
snowbridge-inbound-queue-pallet = { path = "../../../../../../../../parachain/pallets/inbound-queue", default-features = false }
snowbridge-outbound-queue = { path = "../../../../../../../../parachain/pallets/outbound-queue", default-features = false }
snowbridge-outbound-queue-pallet = { path = "../../../../../../../../parachain/pallets/outbound-queue", default-features = false }
snowbridge-rococo-common = { path = "../../../../../../../../parachain/runtime/rococo-common", default-features = false }
Original file line number Diff line number Diff line change
Expand Up @@ -822,7 +822,7 @@ pub mod bridging {
1,
X2(
Parachain(SiblingBridgeHubParaId::get()),
PalletInstance(snowbridge_rococo_common::INBOUND_QUEUE_MESSAGES_PALLET_INDEX)
PalletInstance(snowbridge_rococo_common::INBOUND_QUEUE_PALLET_INDEX)
)
);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -108,12 +108,12 @@ bridge-runtime-common = { path = "../../../../../bridges/bin/runtime-common", de

# Ethereum Bridge (Snowbridge)
snowbridge-beacon-primitives = { path = "../../../../../../parachain/primitives/beacon", default-features = false }
snowbridge-system = { path = "../../../../../../parachain/pallets/system", default-features = false }
snowbridge-system-pallet = { path = "../../../../../../parachain/pallets/system", default-features = false }
snowbridge-system-runtime-api = { path = "../../../../../../parachain/pallets/system/runtime-api", default-features = false }
snowbridge-core = { path = "../../../../../../parachain/primitives/core", default-features = false }
snowbridge-ethereum-client-pallet = { path = "../../../../../../parachain/pallets/ethereum-client", default-features = false }
snowbridge-inbound-queue-pallet = { path = "../../../../../../parachain/pallets/inbound-queue", default-features = false }
snowbridge-outbound-queue = { path = "../../../../../../parachain/pallets/outbound-queue", default-features = false }
snowbridge-outbound-queue-pallet = { path = "../../../../../../parachain/pallets/outbound-queue", default-features = false }
snowbridge-outbound-queue-runtime-api = { path = "../../../../../../parachain/pallets/outbound-queue/runtime-api", default-features = false }
snowbridge-router-primitives = { path = "../../../../../../parachain/primitives/router", default-features = false }
snowbridge-runtime-common = { path = "../../../../../../parachain/runtime/runtime-common", default-features = false }
Expand Down Expand Up @@ -196,12 +196,12 @@ std = [
"snowbridge-ethereum-client-pallet/std",
"snowbridge-inbound-queue-pallet/std",
"snowbridge-outbound-queue-runtime-api/std",
"snowbridge-outbound-queue/std",
"snowbridge-outbound-queue-pallet/std",
"snowbridge-rococo-common/std",
"snowbridge-router-primitives/std",
"snowbridge-runtime-common/std",
"snowbridge-system-runtime-api/std",
"snowbridge-system/std",
"snowbridge-system-pallet/std",
"sp-api/std",
"sp-block-builder/std",
"sp-consensus-aura/std",
Expand Down Expand Up @@ -254,12 +254,12 @@ runtime-benchmarks = [
"snowbridge-core/runtime-benchmarks",
"snowbridge-ethereum-client-pallet/runtime-benchmarks",
"snowbridge-inbound-queue-pallet/runtime-benchmarks",
"snowbridge-outbound-queue/runtime-benchmarks",
"snowbridge-outbound-queue-pallet/runtime-benchmarks",
"snowbridge-rococo-common/runtime-benchmarks",
"snowbridge-router-primitives/runtime-benchmarks",
"snowbridge-runtime-common/runtime-benchmarks",
"snowbridge-runtime-test-common/runtime-benchmarks",
"snowbridge-system/runtime-benchmarks",
"snowbridge-system-pallet/runtime-benchmarks",
"sp-runtime/runtime-benchmarks",
"xcm-builder/runtime-benchmarks",
"xcm-executor/runtime-benchmarks",
Expand Down Expand Up @@ -294,8 +294,8 @@ try-runtime = [
"polkadot-runtime-common/try-runtime",
"snowbridge-ethereum-client-pallet/try-runtime",
"snowbridge-inbound-queue-pallet/try-runtime",
"snowbridge-outbound-queue/try-runtime",
"snowbridge-system/try-runtime",
"snowbridge-outbound-queue-pallet/try-runtime",
"snowbridge-system-pallet/try-runtime",
"sp-runtime/try-runtime",
]

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,6 @@ use snowbridge_router_primitives::outbound::EthereumBlobExporter;
pub type SnowbridgeExporter = EthereumBlobExporter<
UniversalLocation,
EthereumNetwork,
snowbridge_outbound_queue::Pallet<Runtime>,
snowbridge_outbound_queue_pallet::Pallet<Runtime>,
snowbridge_core::AgentIdOf,
>;
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ pub type Migrations = (
InitStorageVersions,
cumulus_pallet_xcmp_queue::migration::v4::MigrationToV4<Runtime>,
// unreleased
snowbridge_system::migration::v0::InitializeOnUpgrade<
snowbridge_system_pallet::migration::v0::InitializeOnUpgrade<
Runtime,
ConstU32<BRIDGE_HUB_ID>,
ConstU32<ASSET_HUB_ID>,
Expand Down Expand Up @@ -502,7 +502,7 @@ parameter_types! {
parameter_types! {
pub const CreateAssetCall: [u8;2] = [53, 0];
pub const CreateAssetDeposit: u128 = (UNITS / 10) + EXISTENTIAL_DEPOSIT;
pub const InboundQueuePalletInstance: u8 = snowbridge_rococo_common::INBOUND_QUEUE_MESSAGES_PALLET_INDEX;
pub const InboundQueuePalletInstance: u8 = snowbridge_rococo_common::INBOUND_QUEUE_PALLET_INDEX;
pub Parameters: PricingParameters<u128> = PricingParameters {
exchange_rate: FixedU128::from_rational(1, 400),
fee_per_gas: gwei(20),
Expand Down Expand Up @@ -541,7 +541,7 @@ pub mod benchmark_helpers {
}
}

impl snowbridge_system::BenchmarkHelper<RuntimeOrigin> for () {
impl snowbridge_system_pallet::BenchmarkHelper<RuntimeOrigin> for () {
fn make_xcm_origin(location: MultiLocation) -> RuntimeOrigin {
RuntimeOrigin::from(pallet_xcm::Origin::Xcm(location))
}
Expand Down Expand Up @@ -575,7 +575,7 @@ impl snowbridge_inbound_queue_pallet::Config for Runtime {
type AssetTransactor = <xcm_config::XcmConfig as xcm_executor::Config>::AssetTransactor;
}

impl snowbridge_outbound_queue::Config for Runtime {
impl snowbridge_outbound_queue_pallet::Config for Runtime {
type RuntimeEvent = RuntimeEvent;
type Hashing = Keccak256;
type MessageQueue = MessageQueue;
Expand All @@ -585,7 +585,7 @@ impl snowbridge_outbound_queue::Config for Runtime {
type GasMeter = snowbridge_core::outbound::ConstantGasMeter;
type Balance = Balance;
type WeightToFee = WeightToFee;
type WeightInfo = weights::snowbridge_outbound_queue::WeightInfo<Runtime>;
type WeightInfo = weights::snowbridge_outbound_queue_pallet::WeightInfo<Runtime>;
type PricingParameters = EthereumSystem;
type Channels = EthereumSystem;
}
Expand Down Expand Up @@ -645,14 +645,14 @@ impl snowbridge_ethereum_client_pallet::Config for Runtime {
type WeightInfo = weights::snowbridge_ethereum_client_pallet::WeightInfo<Runtime>;
}

impl snowbridge_system::Config for Runtime {
impl snowbridge_system_pallet::Config for Runtime {
type RuntimeEvent = RuntimeEvent;
type OutboundQueue = EthereumOutboundQueue;
type SiblingOrigin = EnsureXcm<AllowSiblingsOnly>;
type AgentIdOf = snowbridge_core::AgentIdOf;
type TreasuryAccount = TreasuryAccount;
type Token = Balances;
type WeightInfo = weights::snowbridge_system::WeightInfo<Runtime>;
type WeightInfo = weights::snowbridge_system_pallet::WeightInfo<Runtime>;
#[cfg(feature = "runtime-benchmarks")]
type Helper = ();
type DefaultPricingParameters = Parameters;
Expand Down Expand Up @@ -719,9 +719,9 @@ construct_runtime!(
XcmOverPolkadotBulletin: pallet_xcm_bridge_hub::<Instance2>::{Pallet} = 62,

EthereumInboundQueue: snowbridge_inbound_queue_pallet::{Pallet, Call, Storage, Event<T>} = 80,
EthereumOutboundQueue: snowbridge_outbound_queue::{Pallet, Call, Storage, Event<T>} = 81,
EthereumOutboundQueue: snowbridge_outbound_queue_pallet::{Pallet, Call, Storage, Event<T>} = 81,
EthereumBeaconClient: snowbridge_ethereum_client_pallet::{Pallet, Call, Storage, Event<T>} = 82,
EthereumSystem: snowbridge_system::{Pallet, Call, Storage, Config<T>, Event<T>} = 83,
EthereumSystem: snowbridge_system_pallet::{Pallet, Call, Storage, Config<T>, Event<T>} = 83,

// Message Queue. Importantly, is registered last so that messages are processed after
// the `on_initialize` hooks of bridging pallets.
Expand Down Expand Up @@ -774,8 +774,8 @@ mod benches {
[pallet_bridge_relayers, BridgeRelayersBench::<Runtime>]
// Ethereum Bridge
[snowbridge_inbound_queue_pallet, EthereumInboundQueue]
[snowbridge_outbound_queue, EthereumOutboundQueue]
[snowbridge_system, EthereumSystem]
[snowbridge_outbound_queue_pallet, EthereumOutboundQueue]
[snowbridge_system_pallet, EthereumSystem]
[snowbridge_ethereum_client_pallet, EthereumBeaconClient]
);
}
Expand Down Expand Up @@ -1006,18 +1006,18 @@ impl_runtime_apis! {
}

impl snowbridge_outbound_queue_runtime_api::OutboundQueueApi<Block, Balance> for Runtime {
fn prove_message(leaf_index: u64) -> Option<snowbridge_outbound_queue::MerkleProof> {
snowbridge_outbound_queue::api::prove_message::<Runtime>(leaf_index)
fn prove_message(leaf_index: u64) -> Option<snowbridge_outbound_queue_pallet::MerkleProof> {
snowbridge_outbound_queue_pallet::api::prove_message::<Runtime>(leaf_index)
}

fn calculate_fee(message: Message) -> Option<Balance> {
snowbridge_outbound_queue::api::calculate_fee::<Runtime>(message)
snowbridge_outbound_queue_pallet::api::calculate_fee::<Runtime>(message)
}
}

impl snowbridge_system_runtime_api::ControlApi<Block> for Runtime {
fn agent_id(location: VersionedMultiLocation) -> Option<AgentId> {
snowbridge_system::api::agent_id::<Runtime>(location)
snowbridge_system_pallet::api::agent_id::<Runtime>(location)
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,8 @@ pub mod paritydb_weights;
pub mod rocksdb_weights;
pub mod snowbridge_ethereum_client_pallet;
pub mod snowbridge_inbound_queue_pallet;
pub mod snowbridge_outbound_queue;
pub mod snowbridge_system;
pub mod snowbridge_outbound_queue_pallet;
pub mod snowbridge_system_pallet;
pub mod xcm;

pub use block_weights::constants::BlockExecutionWeight;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ use core::marker::PhantomData;

/// Weight functions for `snowbridge_outbound_queue`.
pub struct WeightInfo<T>(PhantomData<T>);
impl<T: frame_system::Config> snowbridge_outbound_queue::WeightInfo for WeightInfo<T> {
impl<T: frame_system::Config> snowbridge_outbound_queue_pallet::WeightInfo for WeightInfo<T> {
/// Storage: EthereumOutboundQueue MessageLeaves (r:1 w:1)
/// Proof Skipped: EthereumOutboundQueue MessageLeaves (max_values: Some(1), max_size: None, mode: Measured)
/// Storage: EthereumOutboundQueue PendingHighPriorityMessageCount (r:1 w:1)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,12 @@
// pallet
// --chain
// bridge-hub-rococo-dev
// --pallet=snowbridge_system
// --pallet=snowbridge_system_pallet
// --extrinsic=*
// --execution=wasm
// --wasm-execution=compiled
// --output
// parachains/runtimes/bridge-hubs/bridge-hub-rococo/src/weights/snowbridge_system.rs
// parachains/runtimes/bridge-hubs/bridge-hub-rococo/src/weights/snowbridge_system_pallet.rs

#![cfg_attr(rustfmt, rustfmt_skip)]
#![allow(unused_parens)]
Expand All @@ -44,7 +44,7 @@ use core::marker::PhantomData;

/// Weight functions for `snowbridge_system`.
pub struct WeightInfo<T>(PhantomData<T>);
impl<T: frame_system::Config> snowbridge_system::WeightInfo for WeightInfo<T> {
impl<T: frame_system::Config> snowbridge_system_pallet::WeightInfo for WeightInfo<T> {
/// Storage: ParachainInfo ParachainId (r:1 w:0)
/// Proof: ParachainInfo ParachainId (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen)
/// Storage: EthereumOutboundQueue PalletOperatingMode (r:1 w:0)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,7 @@ impl Contains<RuntimeCall> for SafeCallFilter {
) | RuntimeCall::EthereumInboundQueue(
snowbridge_inbound_queue_pallet::Call::set_operating_mode { .. },
) | RuntimeCall::EthereumOutboundQueue(
snowbridge_outbound_queue::Call::set_operating_mode { .. },
snowbridge_outbound_queue_pallet::Call::set_operating_mode { .. },
) | RuntimeCall::EthereumSystem(..)
)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ use sp_std::{marker::PhantomData, prelude::*};
use xcm::v3::{Junction, MultiLocation};

/// The aggregate origin of an inbound message.
/// This is specialized for BridgeHub, as the snowbridge-outbound-queue pallet is also using
/// This is specialized for BridgeHub, as the snowbridge-outbound-queue-pallet is also using
/// the shared MessageQueue pallet.
#[derive(Encode, Decode, Copy, MaxEncodedLen, Clone, Eq, PartialEq, TypeInfo, Debug)]
pub enum AggregateMessageOrigin {
Expand All @@ -41,7 +41,7 @@ pub enum AggregateMessageOrigin {
/// This is used by the HRMP queue.
Sibling(ParaId),
/// The message came from a snowbridge channel.
///
///
/// This is used by Snowbridge inbound queue.
Snowbridge(ChannelId),
}
Expand Down

0 comments on commit ade368b

Please sign in to comment.