mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-05-31 02:51:01 +00:00
Adds Snowbridge to Rococo runtime (#2522)
# Description Adds Snowbridge to the Rococo bridge hub runtime. Includes config changes required in Rococo asset hub. --------- Co-authored-by: Alistair Singh <alistair.singh7@gmail.com> Co-authored-by: ron <yrong1997@gmail.com> Co-authored-by: Vincent Geddes <vincent.geddes@hey.com> Co-authored-by: claravanstaden <Cats 4 life!>
This commit is contained in:
@@ -118,10 +118,13 @@ tokio = { version = "1.32.0", features = ["macros", "parking_lot", "time"] }
|
||||
wait-timeout = "0.2"
|
||||
|
||||
[features]
|
||||
default = []
|
||||
default = [
|
||||
"beacon-spec-mainnet",
|
||||
]
|
||||
runtime-benchmarks = [
|
||||
"asset-hub-rococo-runtime/runtime-benchmarks",
|
||||
"asset-hub-westend-runtime/runtime-benchmarks",
|
||||
"beacon-spec-mainnet",
|
||||
"bridge-hub-rococo-runtime/runtime-benchmarks",
|
||||
"bridge-hub-westend-runtime/runtime-benchmarks",
|
||||
"collectives-westend-runtime/runtime-benchmarks",
|
||||
@@ -161,3 +164,6 @@ try-runtime = [
|
||||
"shell-runtime/try-runtime",
|
||||
"sp-runtime/try-runtime",
|
||||
]
|
||||
beacon-spec-mainnet = [
|
||||
"bridge-hub-rococo-runtime/beacon-spec-mainnet",
|
||||
]
|
||||
|
||||
@@ -231,6 +231,10 @@ pub mod rococo {
|
||||
"bridgeWestendMessages": {
|
||||
"owner": bridges_pallet_owner.clone(),
|
||||
},
|
||||
"ethereumSystem": {
|
||||
"paraId": id,
|
||||
"assetHubParaId": 1000
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
@@ -262,6 +262,7 @@ fn load_spec(id: &str) -> std::result::Result<Box<dyn ChainSpec>, String> {
|
||||
/// (H/T to Phala for the idea)
|
||||
/// E.g. "penpal-kusama-2004" yields ("penpal-kusama", Some(2004))
|
||||
fn extract_parachain_id(id: &str) -> (&str, &str, Option<ParaId>) {
|
||||
const ROCOCO_TEST_PARA_PREFIX: &str = "penpal-rococo-";
|
||||
const KUSAMA_TEST_PARA_PREFIX: &str = "penpal-kusama-";
|
||||
const POLKADOT_TEST_PARA_PREFIX: &str = "penpal-polkadot-";
|
||||
|
||||
@@ -273,7 +274,10 @@ fn extract_parachain_id(id: &str) -> (&str, &str, Option<ParaId>) {
|
||||
const GLUTTON_WESTEND_PARA_LOCAL_PREFIX: &str = "glutton-westend-local-";
|
||||
const GLUTTON_WESTEND_PARA_GENESIS_PREFIX: &str = "glutton-westend-genesis-";
|
||||
|
||||
let (norm_id, orig_id, para) = if let Some(suffix) = id.strip_prefix(KUSAMA_TEST_PARA_PREFIX) {
|
||||
let (norm_id, orig_id, para) = if let Some(suffix) = id.strip_prefix(ROCOCO_TEST_PARA_PREFIX) {
|
||||
let para_id: u32 = suffix.parse().expect("Invalid parachain-id suffix");
|
||||
(&id[..ROCOCO_TEST_PARA_PREFIX.len() - 1], id, Some(para_id))
|
||||
} else if let Some(suffix) = id.strip_prefix(KUSAMA_TEST_PARA_PREFIX) {
|
||||
let para_id: u32 = suffix.parse().expect("Invalid parachain-id suffix");
|
||||
(&id[..KUSAMA_TEST_PARA_PREFIX.len() - 1], id, Some(para_id))
|
||||
} else if let Some(suffix) = id.strip_prefix(POLKADOT_TEST_PARA_PREFIX) {
|
||||
|
||||
Reference in New Issue
Block a user