-
Notifications
You must be signed in to change notification settings - Fork 707
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Statemine primitives * ref issue in TODO * fix TODO
- Loading branch information
Showing
21 changed files
with
305 additions
and
77 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
[package] | ||
name = "bp-statemine" | ||
description = "Primitives of Statemine runtime." | ||
version = "0.1.0" | ||
authors = ["Parity Technologies <[email protected]>"] | ||
edition = "2021" | ||
license = "GPL-3.0-or-later WITH Classpath-exception-2.0" | ||
|
||
[dependencies] | ||
|
||
# Bridge Dependencies | ||
|
||
bp-polkadot-core = { path = "../polkadot-core", default-features = false } | ||
|
||
# Substrate Based Dependencies | ||
|
||
sp-version = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } | ||
|
||
[features] | ||
default = ["std"] | ||
std = [ | ||
"bp-polkadot-core/std", | ||
"sp-version/std", | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
// 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/>. | ||
|
||
#![cfg_attr(not(feature = "std"), no_std)] | ||
// RuntimeApi generated functions | ||
#![allow(clippy::too_many_arguments)] | ||
|
||
pub use bp_polkadot_core::*; | ||
|
||
use sp_version::RuntimeVersion; | ||
|
||
/// Statemine Chain. | ||
pub type Statemine = PolkadotLike; | ||
|
||
/// Known Statemine runtime version. | ||
pub const VERSION: RuntimeVersion = RuntimeVersion { | ||
spec_name: sp_version::create_runtime_str!("statemine"), | ||
impl_name: sp_version::create_runtime_str!("statemine"), | ||
authoring_version: 1, | ||
spec_version: 9300, | ||
impl_version: 0, | ||
apis: sp_version::create_apis_vec![[]], | ||
transaction_version: 8, | ||
state_version: 1, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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() | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
[package] | ||
name = "relay-statemine-client" | ||
version = "0.1.0" | ||
authors = ["Parity Technologies <[email protected]>"] | ||
edition = "2021" | ||
license = "GPL-3.0-or-later WITH Classpath-exception-2.0" | ||
|
||
[dependencies] | ||
codec = { package = "parity-scale-codec", version = "3.1.5" } | ||
relay-substrate-client = { path = "../client-substrate" } | ||
relay-utils = { path = "../utils" } | ||
scale-info = { version = "2.1.1", features = ["derive"] } | ||
|
||
# Bridge dependencies | ||
|
||
bp-polkadot-core = { path = "../../primitives/polkadot-core" } | ||
bp-statemine = { path = "../../primitives/chain-statemine" } | ||
|
||
# Substrate Dependencies | ||
|
||
frame-support = { git = "https://github.com/paritytech/substrate", branch = "master" } | ||
frame-system = { git = "https://github.com/paritytech/substrate", branch = "master" } | ||
sp-core = { git = "https://github.com/paritytech/substrate", branch = "master" } | ||
sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "master" } |
Oops, something went wrong.