Skip to content

Commit

Permalink
Add kusama and polkadot runtime config crates (#1092)
Browse files Browse the repository at this point in the history
* adds kusama and polkadot runtime config crates

* typo

---------

Co-authored-by: claravanstaden <Cats 4 life!>
  • Loading branch information
claravanstaden authored Jan 9, 2024
1 parent 902f8ab commit 011cb7f
Show file tree
Hide file tree
Showing 4 changed files with 84 additions and 0 deletions.
26 changes: 26 additions & 0 deletions parachain/runtime/kusama-common/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
[package]
name = "snowbridge-kusama-common"
description = "Snowbridge Kusama Common"
version = "0.0.1"
authors = ["Snowfork <[email protected]>"]
edition = "2021"
license = "Apache-2.0"

[dependencies]
log = { version = "0.4.20", default-features = false }

frame-support = { path = "../../../polkadot-sdk/substrate/frame/support", default-features = false }
xcm = { package = "staging-xcm", path = "../../../polkadot-sdk/polkadot/xcm", default-features = false }

[dev-dependencies]

[features]
default = ["std"]
std = [
"frame-support/std",
"log/std",
"xcm/std",
]
runtime-benchmarks = [
"frame-support/runtime-benchmarks",
]
16 changes: 16 additions & 0 deletions parachain/runtime/kusama-common/src/lib.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
// SPDX-License-Identifier: Apache-2.0
// SPDX-FileCopyrightText: 2023 Snowfork <[email protected]>
//! # Kusama Common
//!
//! Config used for the Kusama asset hub and bridge hub runtimes.
#![cfg_attr(not(feature = "std"), no_std)]

use frame_support::parameter_types;
use xcm::opaque::lts::NetworkId;

pub const INBOUND_QUEUE_MESSAGES_PALLET_INDEX: u8 = 80;

parameter_types! {
// Network and location for the Ethereum chain.
pub EthereumNetwork: NetworkId = NetworkId::Ethereum { chain_id: 1 };
}
26 changes: 26 additions & 0 deletions parachain/runtime/polkadot-common/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
[package]
name = "snowbridge-polkadot-common"
description = "Snowbridge Polkadot Common"
version = "0.0.1"
authors = ["Snowfork <[email protected]>"]
edition = "2021"
license = "Apache-2.0"

[dependencies]
log = { version = "0.4.20", default-features = false }

frame-support = { path = "../../../polkadot-sdk/substrate/frame/support", default-features = false }
xcm = { package = "staging-xcm", path = "../../../polkadot-sdk/polkadot/xcm", default-features = false }

[dev-dependencies]

[features]
default = ["std"]
std = [
"frame-support/std",
"log/std",
"xcm/std",
]
runtime-benchmarks = [
"frame-support/runtime-benchmarks",
]
16 changes: 16 additions & 0 deletions parachain/runtime/polkadot-common/src/lib.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
// SPDX-License-Identifier: Apache-2.0
// SPDX-FileCopyrightText: 2023 Snowfork <[email protected]>
//! # Polkadot Common
//!
//! Config used for the Polkadot asset hub and bridge hub runtimes.
#![cfg_attr(not(feature = "std"), no_std)]

use frame_support::parameter_types;
use xcm::opaque::lts::NetworkId;

pub const INBOUND_QUEUE_MESSAGES_PALLET_INDEX: u8 = 80;

parameter_types! {
// Network and location for the Ethereum chain.
pub EthereumNetwork: NetworkId = NetworkId::Ethereum { chain_id: 1 };
}

0 comments on commit 011cb7f

Please sign in to comment.