diff --git a/parachain/primitives/core/Cargo.toml b/parachain/primitives/core/Cargo.toml index fdc62d4653..f2cbaa2a7b 100644 --- a/parachain/primitives/core/Cargo.toml +++ b/parachain/primitives/core/Cargo.toml @@ -8,6 +8,7 @@ edition = "2021" serde = { version = "1.0.188", optional = true, features = [ "derive", "alloc" ], default-features = false } codec = { package = "parity-scale-codec", version = "3.6.1", default-features = false } scale-info = { version = "2.9.0", default-features = false, features = [ "derive" ] } +hex-literal = { version = "0.4.1" } polkadot-parachain-primitives = { path = "../../../polkadot-sdk/polkadot/parachain", default-features = false } xcm = { package = "staging-xcm", path = "../../../polkadot-sdk/polkadot/xcm", default-features = false } @@ -26,7 +27,6 @@ ethabi = { git = "https://github.com/Snowfork/ethabi-decode.git", package = "eth [dev-dependencies] hex = { version = "0.4.3" } -hex-literal = { version = "0.4.1" } [features] default = ["std"] diff --git a/parachain/primitives/core/src/lib.rs b/parachain/primitives/core/src/lib.rs index 427b72a35e..e8faaa71ea 100644 --- a/parachain/primitives/core/src/lib.rs +++ b/parachain/primitives/core/src/lib.rs @@ -20,6 +20,7 @@ pub use ringbuffer::{RingBufferMap, RingBufferMapImpl}; use codec::{Decode, Encode, MaxEncodedLen}; use frame_support::traits::Contains; +use hex_literal::hex; use scale_info::TypeInfo; use sp_core::H256; use sp_io::hashing::keccak_256; @@ -53,7 +54,7 @@ pub const GWEI: u128 = 1_000_000_000; pub const METH: u128 = 1_000_000_000_000_000; pub const ETH: u128 = 1_000_000_000_000_000_000; -/// Identifier for a messaging channel +/// Identifier for a message channel #[derive( Clone, Copy, Encode, Decode, PartialEq, Eq, Default, RuntimeDebug, MaxEncodedLen, TypeInfo, )] @@ -120,14 +121,14 @@ pub trait ChannelLookup { fn lookup(channel_id: ChannelId) -> Option; } -pub const PRIMARY_GOVERNANCE_CHANNEL: ChannelId = ChannelId::new([ - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, -]); +/// Channel for high-priority governance commands +pub const PRIMARY_GOVERNANCE_CHANNEL: ChannelId = + ChannelId::new(hex!("0000000000000000000000000000000000000000000000000000000000000001")); -pub const SECONDARY_GOVERNANCE_CHANNEL: ChannelId = ChannelId::new([ - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, -]); +/// Channel for lower-priority governance commands +pub const SECONDARY_GOVERNANCE_CHANNEL: ChannelId = + ChannelId::new(hex!("0000000000000000000000000000000000000000000000000000000000000002")); -pub const BRIDGE_HUB_AGENT_ID: AgentId = H256([ - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, -]); +/// Agent ID for BridgeHub +pub const BRIDGE_HUB_AGENT_ID: AgentId = + H256(hex!("0000000000000000000000000000000000000000000000000000000000000001")); diff --git a/polkadot-sdk b/polkadot-sdk index e7e815dafb..42c1258679 160000 --- a/polkadot-sdk +++ b/polkadot-sdk @@ -1 +1 @@ -Subproject commit e7e815dafbdae2fdca01d72e4b3bf59dcee1b82d +Subproject commit 42c125867975a22dc51eeec8001a56eba9d511e8 diff --git a/smoketest/src/helper.rs b/smoketest/src/helper.rs index 9ea5f6116d..a678638f24 100644 --- a/smoketest/src/helper.rs +++ b/smoketest/src/helper.rs @@ -5,7 +5,11 @@ use crate::{ bridgehub::{ self, api::{ - runtime_types::bridge_hub_rococo_runtime::RuntimeCall as BHRuntimeCall, utility, + runtime_types::{ + bridge_hub_rococo_runtime::RuntimeCall as BHRuntimeCall, + snowbridge_core::outbound::v1::OperatingMode, + }, + utility, }, }, relaychain, @@ -259,7 +263,7 @@ pub async fn construct_create_channel_call( bridge_hub_client: &Box>, ) -> Result, Box> { let call = bridgehub::api::ethereum_control::calls::TransactionApi - .create_channel() + .create_channel(OperatingMode::Normal, 1) .encode_call_data(&bridge_hub_client.metadata())?; Ok(call)