mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-05-31 07:31:02 +00:00
Statemine primitives (#1625)
* Statemine primitives * ref issue in TODO * fix TODO
This commit is contained in:
committed by
Bastian Köcher
parent
2c0b6b73e0
commit
3e00c5c022
@@ -93,7 +93,6 @@ impl CliChain for Millau {
|
||||
const RUNTIME_VERSION: Option<RuntimeVersion> = Some(millau_runtime::VERSION);
|
||||
|
||||
type KeyPair = sp_core::sr25519::Pair;
|
||||
type MessagePayload = Vec<u8>;
|
||||
|
||||
fn ss58_format() -> u16 {
|
||||
millau_runtime::SS58Prefix::get() as u16
|
||||
|
||||
@@ -30,6 +30,7 @@ pub mod westend_parachains_to_millau;
|
||||
mod millau;
|
||||
mod rialto;
|
||||
mod rialto_parachain;
|
||||
mod statemine;
|
||||
mod westend;
|
||||
|
||||
#[cfg(test)]
|
||||
|
||||
@@ -76,7 +76,6 @@ impl CliChain for Rialto {
|
||||
const RUNTIME_VERSION: Option<RuntimeVersion> = Some(rialto_runtime::VERSION);
|
||||
|
||||
type KeyPair = sp_core::sr25519::Pair;
|
||||
type MessagePayload = Vec<u8>;
|
||||
|
||||
fn ss58_format() -> u16 {
|
||||
rialto_runtime::SS58Prefix::get() as u16
|
||||
|
||||
@@ -79,7 +79,6 @@ impl CliChain for RialtoParachain {
|
||||
const RUNTIME_VERSION: Option<RuntimeVersion> = Some(rialto_parachain_runtime::VERSION);
|
||||
|
||||
type KeyPair = sp_core::sr25519::Pair;
|
||||
type MessagePayload = Vec<u8>;
|
||||
|
||||
fn ss58_format() -> u16 {
|
||||
rialto_parachain_runtime::SS58Prefix::get() as u16
|
||||
|
||||
@@ -0,0 +1,34 @@
|
||||
// Copyright 2019-2021 Parity Technologies (UK) Ltd.
|
||||
// This file is part of Parity Bridges Common.
|
||||
|
||||
// Parity Bridges Common is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
|
||||
// Parity Bridges Common is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with Parity Bridges Common. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
//! Statemine chain specification for CLI.
|
||||
|
||||
use crate::cli::CliChain;
|
||||
use relay_statemine_client::Statemine;
|
||||
use sp_version::RuntimeVersion;
|
||||
|
||||
impl CliChain for Statemine {
|
||||
const RUNTIME_VERSION: Option<RuntimeVersion> = Some(bp_statemine::VERSION);
|
||||
|
||||
type KeyPair = sp_core::sr25519::Pair;
|
||||
|
||||
fn ss58_format() -> u16 {
|
||||
sp_core::crypto::Ss58AddressFormat::from(
|
||||
sp_core::crypto::Ss58AddressFormatRegistry::KusamaAccount,
|
||||
)
|
||||
.into()
|
||||
}
|
||||
}
|
||||
@@ -24,7 +24,6 @@ impl CliChain for Westend {
|
||||
const RUNTIME_VERSION: Option<RuntimeVersion> = None;
|
||||
|
||||
type KeyPair = sp_core::sr25519::Pair;
|
||||
type MessagePayload = Vec<u8>;
|
||||
|
||||
fn ss58_format() -> u16 {
|
||||
sp_core::crypto::Ss58AddressFormat::from(
|
||||
@@ -38,7 +37,6 @@ impl CliChain for Westmint {
|
||||
const RUNTIME_VERSION: Option<RuntimeVersion> = None;
|
||||
|
||||
type KeyPair = sp_core::sr25519::Pair;
|
||||
type MessagePayload = Vec<u8>;
|
||||
|
||||
fn ss58_format() -> u16 {
|
||||
sp_core::crypto::Ss58AddressFormat::from(
|
||||
|
||||
@@ -172,11 +172,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;
|
||||
|
||||
/// Bridge Message Payload type.
|
||||
///
|
||||
/// TODO [#854] This should be removed in favor of target-specifc types.
|
||||
type MessagePayload;
|
||||
|
||||
/// Numeric value of SS58 format.
|
||||
fn ss58_format() -> u16;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user