Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add rococo runtime common crate #1031

Merged
merged 1 commit into from
Dec 1, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions parachain/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,5 @@ members = [
"pallets/control",
"pallets/control/runtime-api",
"runtime/runtime-common",
"runtime/rococo-common",
]
21 changes: 21 additions & 0 deletions parachain/runtime/rococo-common/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
[package]
name = "snowbridge-rococo-common"
version = "0.0.1"
authors = [ "Snowfork <contact@snowfork.com>" ]
edition = "2021"

[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",
"xcm/std",
]
runtime-benchmarks = []
14 changes: 14 additions & 0 deletions parachain/runtime/rococo-common/src/lib.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
// SPDX-License-Identifier: Apache-2.0
// SPDX-FileCopyrightText: 2023 Snowfork <hello@snowfork.com>
//! # Rococo Common
//!
//! Config used for the Rococo asset hub and bridge hub runtimes.
#![cfg_attr(not(feature = "std"), no_std)]

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

parameter_types! {
// Network and location for the Ethereum chain.
pub EthereumNetwork: NetworkId = NetworkId::Ethereum { chain_id: 15 };
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll make a follow up PR to change this to chain ID 5, for Goerli.

}
Loading