Skip to content

Commit

Permalink
Merge pull request #4 from bkontur/bko-snowbridge-nits
Browse files Browse the repository at this point in the history
Fixes
  • Loading branch information
claravanstaden authored Mar 21, 2024
2 parents 59b3502 + 3cf807a commit 904345c
Show file tree
Hide file tree
Showing 11 changed files with 13 additions and 31 deletions.
6 changes: 2 additions & 4 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 @@ -42,12 +42,12 @@ asset-hub-kusama-runtime = { path = "../../../../../system-parachains/asset-hubs
integration-tests-helpers = { path = "../../../helpers" }
kusama-polkadot-system-emulated-network = { path = "../../../networks/kusama-polkadot-system" }
kusama-system-emulated-network = { path = "../../../networks/kusama-system" }
system-parachains-constants = { path = "../../../../../system-parachains/constants" }

# Snowbridge
snowbridge-beacon-primitives = { version = "0.1.0" }
snowbridge-core = { version = "0.1.0" }
snowbridge-router-primitives = { version = "0.1.0" }
snowbridge-pallet-system = { version = "0.1.0" }
snowbridge-pallet-outbound-queue = { version = "0.1.0" }
snowbridge-pallet-inbound-queue = { version = "0.1.0" }
snowbridge-pallet-inbound-queue-fixtures = { version = "0.9.0" }
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ use bridge_hub_kusama_runtime::{
};
use codec::{Decode, Encode};
use emulated_integration_tests_common::xcm_emulator::ConvertLocation;
use frame_support::{pallet_prelude::TypeInfo, traits::PalletInfoAccess};
use frame_support::pallet_prelude::TypeInfo;
use hex_literal::hex;
use kusama_system_emulated_network::{
penpal_emulated_chain::CustomizableAssetFromSystemAssetHub,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,19 +35,19 @@ cumulus-pallet-xcmp-queue = { version = "0.8.0" }
bp-messages = { version = "0.8.0" }
pallet-bridge-messages = { version = "0.8.0" }

# Runtimes
# Local
bp-bridge-hub-polkadot = { path = "../../../../../system-parachains/bridge-hubs/bridge-hub-polkadot/primitives"}
bridge-hub-polkadot-runtime = { path = "../../../../../system-parachains/bridge-hubs/bridge-hub-polkadot" }
asset-hub-polkadot-runtime = { path = "../../../../../system-parachains/asset-hubs/asset-hub-polkadot" }
integration-tests-helpers = { path = "../../../helpers" }
kusama-polkadot-system-emulated-network = { path = "../../../networks/kusama-polkadot-system" }
polkadot-system-emulated-network = { path = "../../../networks/polkadot-system" }
system-parachains-constants = { path = "../../../../../system-parachains/constants" }

# Snowbridge
snowbridge-beacon-primitives = { version = "0.1.0" }
snowbridge-core = { version = "0.1.0" }
snowbridge-router-primitives = { version = "0.1.0" }
snowbridge-pallet-system = { version = "0.1.0" }
snowbridge-pallet-outbound-queue = { version = "0.1.0" }
snowbridge-pallet-inbound-queue = { version = "0.1.0" }
snowbridge-pallet-inbound-queue-fixtures = { version = "0.9.0" }
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ use bridge_hub_polkadot_runtime::{
};
use codec::{Decode, Encode};
use emulated_integration_tests_common::xcm_emulator::ConvertLocation;
use frame_support::{pallet_prelude::TypeInfo, traits::PalletInfoAccess};
use frame_support::pallet_prelude::TypeInfo;
use hex_literal::hex;
use polkadot_system_emulated_network::{
penpal_emulated_chain::CustomizableAssetFromSystemAssetHub,
Expand Down
3 changes: 0 additions & 3 deletions system-parachains/bridge-hubs/bridge-hub-kusama/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,6 @@ snowbridge-pallet-system = { default-features = false , version = "0.1.0" }
snowbridge-system-runtime-api = { default-features = false , version = "0.1.0" }
snowbridge-core = { default-features = false , version = "0.1.0" }
snowbridge-pallet-ethereum-client = { default-features = false , version = "0.1.0" }
snowbridge-pallet-ethereum-client-fixtures = { default-features = false , version = "0.9.0" }
snowbridge-pallet-inbound-queue = { default-features = false , version = "0.1.0" }
snowbridge-pallet-outbound-queue = { default-features = false , version = "0.1.0" }
snowbridge-outbound-queue-runtime-api = { default-features = false , version = "0.1.0" }
Expand Down Expand Up @@ -187,7 +186,6 @@ std = [
"snowbridge-beacon-primitives/std",
"snowbridge-core/std",
"snowbridge-pallet-ethereum-client/std",
"snowbridge-pallet-ethereum-client-fixtures/std",
"snowbridge-pallet-inbound-queue/std",
"snowbridge-outbound-queue-runtime-api/std",
"snowbridge-pallet-outbound-queue/std",
Expand Down Expand Up @@ -246,7 +244,6 @@ runtime-benchmarks = [
"polkadot-runtime-common/runtime-benchmarks",
"snowbridge-core/runtime-benchmarks",
"snowbridge-pallet-ethereum-client/runtime-benchmarks",
"snowbridge-pallet-ethereum-client-fixtures/runtime-benchmarks",
"snowbridge-pallet-inbound-queue/runtime-benchmarks",
"snowbridge-pallet-outbound-queue/runtime-benchmarks",
"snowbridge-router-primitives/runtime-benchmarks",
Expand Down
9 changes: 2 additions & 7 deletions system-parachains/bridge-hubs/bridge-hub-kusama/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,6 @@ use frame_system::{
use pallet_xcm::{EnsureXcm, IsVoiceOfBody};
pub use sp_consensus_aura::sr25519::AuthorityId as AuraId;
pub use sp_runtime::{MultiAddress, Perbill, Permill};
#[cfg(not(feature = "runtime-benchmarks"))]
use xcm_config::XcmRouter;
use xcm_config::{
FellowshipLocation, GovernanceLocation, TreasuryAccount, XcmOriginToTransactDispatchOrigin,
};
Expand All @@ -95,9 +93,6 @@ use system_parachains_constants::{
// XCM Imports
use xcm::prelude::*;

#[cfg(feature = "runtime-benchmarks")]
use benchmark_helpers::DoNothingRouter;

/// The address format for describing accounts.
pub type Address = MultiAddress<AccountId, ()>;

Expand Down Expand Up @@ -553,9 +548,9 @@ impl snowbridge_pallet_inbound_queue::Config for Runtime {
type Verifier = snowbridge_pallet_ethereum_client::Pallet<Runtime>;
type Token = Balances;
#[cfg(not(feature = "runtime-benchmarks"))]
type XcmSender = XcmRouter;
type XcmSender = xcm_config::XcmRouter;
#[cfg(feature = "runtime-benchmarks")]
type XcmSender = DoNothingRouter;
type XcmSender = benchmark_helpers::DoNothingRouter;
type ChannelLookup = EthereumSystem;
type GatewayAddress = EthereumGatewayAddress;
#[cfg(feature = "runtime-benchmarks")]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@

use bp_polkadot_core::Signature;
use bridge_hub_kusama_runtime::{
bridge_to_ethereum_config::EthereumNetwork,
bridge_to_polkadot_config::RefundBridgeHubPolkadotMessages,
xcm_config::{XcmConfig, XcmFeeManagerFromComponentsBridgeHub},
BridgeRejectObsoleteHeadersAndMessages, Executive, MessageQueueServiceWeight, Runtime,
Expand Down Expand Up @@ -48,7 +49,6 @@ use sp_runtime::{
traits::Header,
AccountId32, FixedU128, Saturating,
};
use system_parachains_constants::kusama::snowbridge::EthereumNetwork;
use xcm::{latest::prelude::*, v3::Error};
use xcm_builder::HandleFee;
use xcm_executor::{
Expand Down
3 changes: 0 additions & 3 deletions system-parachains/bridge-hubs/bridge-hub-polkadot/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,6 @@ snowbridge-pallet-system = { default-features = false , version = "0.1.0" }
snowbridge-system-runtime-api = { default-features = false , version = "0.1.0" }
snowbridge-core = { default-features = false , version = "0.1.0" }
snowbridge-pallet-ethereum-client = { default-features = false , version = "0.1.0" }
snowbridge-pallet-ethereum-client-fixtures = { default-features = false , version = "0.9.0" }
snowbridge-pallet-inbound-queue = { default-features = false , version = "0.1.0" }
snowbridge-pallet-outbound-queue = { default-features = false , version = "0.1.0" }
snowbridge-outbound-queue-runtime-api = { default-features = false , version = "0.1.0" }
Expand Down Expand Up @@ -187,7 +186,6 @@ std = [
"snowbridge-beacon-primitives/std",
"snowbridge-core/std",
"snowbridge-pallet-ethereum-client/std",
"snowbridge-pallet-ethereum-client-fixtures/std",
"snowbridge-pallet-inbound-queue/std",
"snowbridge-outbound-queue-runtime-api/std",
"snowbridge-pallet-outbound-queue/std",
Expand Down Expand Up @@ -246,7 +244,6 @@ runtime-benchmarks = [
"polkadot-runtime-common/runtime-benchmarks",
"snowbridge-core/runtime-benchmarks",
"snowbridge-pallet-ethereum-client/runtime-benchmarks",
"snowbridge-pallet-ethereum-client-fixtures/runtime-benchmarks",
"snowbridge-pallet-inbound-queue/runtime-benchmarks",
"snowbridge-pallet-outbound-queue/runtime-benchmarks",
"snowbridge-router-primitives/runtime-benchmarks",
Expand Down
9 changes: 2 additions & 7 deletions system-parachains/bridge-hubs/bridge-hub-polkadot/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,6 @@ use frame_system::{
use pallet_xcm::{EnsureXcm, IsVoiceOfBody};
pub use sp_consensus_aura::sr25519::AuthorityId as AuraId;
pub use sp_runtime::{MultiAddress, Perbill, Permill};
#[cfg(not(feature = "runtime-benchmarks"))]
use xcm_config::XcmRouter;
use xcm_config::{
FellowshipLocation, GovernanceLocation, TreasuryAccount, XcmOriginToTransactDispatchOrigin,
};
Expand All @@ -96,9 +94,6 @@ use system_parachains_constants::{
// XCM Imports
use xcm::prelude::*;

#[cfg(feature = "runtime-benchmarks")]
use benchmark_helpers::DoNothingRouter;

/// The address format for describing accounts.
pub type Address = MultiAddress<AccountId, ()>;

Expand Down Expand Up @@ -554,9 +549,9 @@ impl snowbridge_pallet_inbound_queue::Config for Runtime {
type Verifier = snowbridge_pallet_ethereum_client::Pallet<Runtime>;
type Token = Balances;
#[cfg(not(feature = "runtime-benchmarks"))]
type XcmSender = XcmRouter;
type XcmSender = xcm_config::XcmRouter;
#[cfg(feature = "runtime-benchmarks")]
type XcmSender = DoNothingRouter;
type XcmSender = benchmark_helpers::DoNothingRouter;
type ChannelLookup = EthereumSystem;
type GatewayAddress = EthereumGatewayAddress;
#[cfg(feature = "runtime-benchmarks")]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@

use bp_polkadot_core::Signature;
use bridge_hub_polkadot_runtime::{
bridge_to_ethereum_config::EthereumNetwork,
bridge_to_kusama_config::RefundBridgeHubKusamaMessages,
xcm_config::{XcmConfig, XcmFeeManagerFromComponentsBridgeHub},
BridgeRejectObsoleteHeadersAndMessages, Executive, MessageQueueServiceWeight, Runtime,
Expand Down Expand Up @@ -48,7 +49,6 @@ use sp_runtime::{
traits::Header,
AccountId32, FixedU128, Saturating,
};
use system_parachains_constants::polkadot::snowbridge::EthereumNetwork;
use xcm::{latest::prelude::*, v3::Error};
use xcm_builder::HandleFee;
use xcm_executor::{
Expand Down

0 comments on commit 904345c

Please sign in to comment.