Fix bridge hub rococo/wococo weights (#1712)

* Fix bridge hub rococo/wococo weights

* Remove SS58Prefix
This commit is contained in:
Serban Iorga
2022-12-12 16:14:31 +02:00
committed by Bastian Köcher
parent d63a75697c
commit e85b3fd998
16 changed files with 154 additions and 90 deletions
@@ -56,8 +56,4 @@ impl CliChain for Millau {
const RUNTIME_VERSION: Option<RuntimeVersion> = Some(millau_runtime::VERSION);
type KeyPair = sp_core::sr25519::Pair;
fn ss58_format() -> u16 {
millau_runtime::SS58Prefix::get() as u16
}
}
@@ -48,8 +48,4 @@ impl CliChain for Rialto {
const RUNTIME_VERSION: Option<RuntimeVersion> = Some(rialto_runtime::VERSION);
type KeyPair = sp_core::sr25519::Pair;
fn ss58_format() -> u16 {
rialto_runtime::SS58Prefix::get() as u16
}
}
@@ -50,8 +50,4 @@ impl CliChain for RialtoParachain {
const RUNTIME_VERSION: Option<RuntimeVersion> = Some(rialto_parachain_runtime::VERSION);
type KeyPair = sp_core::sr25519::Pair;
fn ss58_format() -> u16 {
rialto_parachain_runtime::SS58Prefix::get() as u16
}
}
@@ -25,18 +25,10 @@ impl CliChain for Rococo {
const RUNTIME_VERSION: Option<RuntimeVersion> = None;
type KeyPair = sp_core::sr25519::Pair;
fn ss58_format() -> u16 {
bp_rococo::SS58Prefix::get() as u16
}
}
impl CliChain for BridgeHubRococo {
const RUNTIME_VERSION: Option<RuntimeVersion> = None;
type KeyPair = sp_core::sr25519::Pair;
fn ss58_format() -> u16 {
relay_bridge_hub_rococo_client::runtime::SS58Prefix::get()
}
}
@@ -24,24 +24,10 @@ impl CliChain for Westend {
const RUNTIME_VERSION: Option<RuntimeVersion> = None;
type KeyPair = sp_core::sr25519::Pair;
fn ss58_format() -> u16 {
sp_core::crypto::Ss58AddressFormat::from(
sp_core::crypto::Ss58AddressFormatRegistry::SubstrateAccount,
)
.into()
}
}
impl CliChain for Westmint {
const RUNTIME_VERSION: Option<RuntimeVersion> = None;
type KeyPair = sp_core::sr25519::Pair;
fn ss58_format() -> u16 {
sp_core::crypto::Ss58AddressFormat::from(
sp_core::crypto::Ss58AddressFormatRegistry::SubstrateAccount,
)
.into()
}
}
@@ -25,18 +25,10 @@ impl CliChain for Wococo {
const RUNTIME_VERSION: Option<RuntimeVersion> = None;
type KeyPair = sp_core::sr25519::Pair;
fn ss58_format() -> u16 {
bp_wococo::SS58Prefix::get() as u16
}
}
impl CliChain for BridgeHubWococo {
const RUNTIME_VERSION: Option<RuntimeVersion> = None;
type KeyPair = sp_core::sr25519::Pair;
fn ss58_format() -> u16 {
relay_bridge_hub_wococo_client::runtime::SS58Prefix::get()
}
}
@@ -167,9 +167,6 @@ pub trait CliChain: relay_substrate_client::Chain {
///
/// In case of chains supporting multiple cryptos, pick one used by the CLI.
type KeyPair: sp_core::crypto::Pair;
/// Numeric value of SS58 format.
fn ss58_format() -> u16;
}
/// Lane id.
@@ -22,7 +22,6 @@ use bp_polkadot_core::PolkadotLike;
use codec::{Decode, Encode};
use scale_info::TypeInfo;
pub use bp_bridge_hub_rococo::SS58Prefix;
use bp_messages::UnrewardedRelayersState;
use bp_polkadot_core::parachains::{ParaHash, ParaHeadsProof, ParaId};
use bp_runtime::Chain;
@@ -16,8 +16,6 @@
//! Types that are specific to the BridgeHubWococo runtime.
pub use bp_bridge_hub_wococo::SS58Prefix;
// We reuse everything from rococo runtime wrapper
pub type Call = relay_bridge_hub_rococo_client::runtime::Call;
pub type UncheckedExtrinsic = bp_bridge_hub_wococo::UncheckedExtrinsic<Call>;