Skip to content

Commit

Permalink
fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
vgeddes committed Nov 13, 2023
1 parent 30c4259 commit 695e67a
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 14 deletions.
2 changes: 1 addition & 1 deletion parachain/primitives/core/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }
Expand All @@ -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"]
Expand Down
21 changes: 11 additions & 10 deletions parachain/primitives/core/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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,
)]
Expand Down Expand Up @@ -120,14 +121,14 @@ pub trait ChannelLookup {
fn lookup(channel_id: ChannelId) -> Option<Channel>;
}

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"));
2 changes: 1 addition & 1 deletion polkadot-sdk
Submodule polkadot-sdk updated 1 files
+1 −0 Cargo.lock
8 changes: 6 additions & 2 deletions smoketest/src/helper.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -259,7 +263,7 @@ pub async fn construct_create_channel_call(
bridge_hub_client: &Box<OnlineClient<PolkadotConfig>>,
) -> Result<Vec<u8>, Box<dyn std::error::Error>> {
let call = bridgehub::api::ethereum_control::calls::TransactionApi
.create_channel()
.create_channel(OperatingMode::Normal, 1)
.encode_call_data(&bridge_hub_client.metadata())?;

Ok(call)
Expand Down

0 comments on commit 695e67a

Please sign in to comment.