Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
svyatonik committed Nov 7, 2023
1 parent b75b51c commit 0ad007f
Show file tree
Hide file tree
Showing 17 changed files with 115 additions and 3 deletions.
8 changes: 8 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions relay/kusama/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ offchain-primitives = { package = "sp-offchain", default-features = false , vers
sp-std = { package = "sp-std", default-features = false , version = "12.0.0" }
sp-application-crypto = { default-features = false , version = "27.0.0" }
sp-arithmetic = { default-features = false , version = "20.0.0" }
sp-genesis-builder = { default-features = false , version = "0.4.0" }
sp-io = { default-features = false , version = "27.0.0" }
sp-mmr-primitives = { default-features = false , version = "23.0.0" }
sp-runtime = { default-features = false , version = "28.0.0" }
Expand Down Expand Up @@ -215,6 +216,7 @@ std = [
"sp-application-crypto/std",
"sp-arithmetic/std",
"sp-core/std",
"sp-genesis-builder/std",
"sp-io/std",
"sp-mmr-primitives/std",
"sp-npos-elections/std",
Expand Down
14 changes: 13 additions & 1 deletion relay/kusama/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,9 @@ use frame_election_provider_support::{
SequentialPhragmen,
};
use frame_support::{
construct_runtime, parameter_types,
construct_runtime,
genesis_builder_helper::{build_config, create_default_config},
parameter_types,
traits::{
fungible::HoldConsideration, ConstU32, Contains, EitherOf, EitherOfDiverse, InstanceFilter,
KeyOwnerProofSystem, LinearStoragePrice, PrivilegeCmp, ProcessMessage, ProcessMessageError,
Expand Down Expand Up @@ -2354,6 +2356,16 @@ sp_api::impl_runtime_apis! {
}
}

impl sp_genesis_builder::GenesisBuilder<Block> for Runtime {
fn create_default_config() -> Vec<u8> {
create_default_config::<RuntimeGenesisConfig>()
}

fn build_config(config: Vec<u8>) -> sp_genesis_builder::Result {
build_config::<RuntimeGenesisConfig>(config)
}
}

#[cfg(feature = "try-runtime")]
impl frame_try_runtime::TryRuntime<Block> for Runtime {
fn on_runtime_upgrade(checks: frame_try_runtime::UpgradeCheckSelect) -> (Weight, Weight) {
Expand Down
2 changes: 2 additions & 0 deletions relay/polkadot/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ offchain-primitives = { package = "sp-offchain", default-features = false , vers
tx-pool-api = { package = "sp-transaction-pool", default-features = false , version = "23.0.0" }
sp-arithmetic = { default-features = false , version = "20.0.0" }
sp-api = { default-features = false , version = "23.0.0" }
sp-genesis-builder = { default-features = false , version = "0.4.0" }
sp-std = { default-features = false , version = "12.0.0" }
sp-io = { default-features = false , version = "27.0.0" }
sp-mmr-primitives = { default-features = false , version = "23.0.0" }
Expand Down Expand Up @@ -198,6 +199,7 @@ std = [
"sp-api/std",
"sp-arithmetic/std",
"sp-core/std",
"sp-genesis-builder/std",
"sp-io/std",
"sp-mmr-primitives/std",
"sp-npos-elections/std",
Expand Down
14 changes: 13 additions & 1 deletion relay/polkadot/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,9 @@ use frame_election_provider_support::{
bounds::ElectionBoundsBuilder, generate_solution_type, onchain, SequentialPhragmen,
};
use frame_support::{
construct_runtime, parameter_types,
construct_runtime,
genesis_builder_helper::{build_config, create_default_config},
parameter_types,
traits::{
fungible::HoldConsideration, ConstU32, Contains, EitherOf, EitherOfDiverse, InstanceFilter,
KeyOwnerProofSystem, LinearStoragePrice, PrivilegeCmp, ProcessMessage, ProcessMessageError,
Expand Down Expand Up @@ -2150,6 +2152,16 @@ sp_api::impl_runtime_apis! {
}
}

impl sp_genesis_builder::GenesisBuilder<Block> for Runtime {
fn create_default_config() -> Vec<u8> {
create_default_config::<RuntimeGenesisConfig>()
}

fn build_config(config: Vec<u8>) -> sp_genesis_builder::Result {
build_config::<RuntimeGenesisConfig>(config)
}
}

#[cfg(feature = "try-runtime")]
impl frame_try_runtime::TryRuntime<Block> for Runtime {
fn on_runtime_upgrade(checks: frame_try_runtime::UpgradeCheckSelect) -> (Weight, Weight) {
Expand Down
2 changes: 2 additions & 0 deletions system-parachains/asset-hubs/asset-hub-kusama/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ sp-api = { default-features = false, version = "23.0.0" }
sp-block-builder = { default-features = false, version = "23.0.0" }
sp-consensus-aura = { default-features = false, version = "0.29.0" }
sp-core = { default-features = false, version = "25.0.0" }
sp-genesis-builder = { default-features = false , version = "0.4.0" }
sp-inherents = { default-features = false, version = "23.0.0" }
sp-offchain = { default-features = false, version = "23.0.0" }
sp-runtime = { default-features = false, version = "28.0.0" }
Expand Down Expand Up @@ -210,6 +211,7 @@ std = [
"sp-block-builder/std",
"sp-consensus-aura/std",
"sp-core/std",
"sp-genesis-builder/std",
"sp-inherents/std",
"sp-offchain/std",
"sp-runtime/std",
Expand Down
11 changes: 11 additions & 0 deletions system-parachains/asset-hubs/asset-hub-kusama/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ use codec::{Decode, Encode, MaxEncodedLen};
use frame_support::{
construct_runtime,
dispatch::DispatchClass,
genesis_builder_helper::{build_config, create_default_config},
ord_parameter_types, parameter_types,
traits::{
AsEnsureOriginWithArg, ConstBool, ConstU128, ConstU32, ConstU64, ConstU8, EitherOfDiverse,
Expand Down Expand Up @@ -1189,6 +1190,16 @@ impl_runtime_apis! {
}
}

impl sp_genesis_builder::GenesisBuilder<Block> for Runtime {
fn create_default_config() -> Vec<u8> {
create_default_config::<RuntimeGenesisConfig>()
}

fn build_config(config: Vec<u8>) -> sp_genesis_builder::Result {
build_config::<RuntimeGenesisConfig>(config)
}
}

#[cfg(feature = "try-runtime")]
impl frame_try_runtime::TryRuntime<Block> for Runtime {
fn on_runtime_upgrade(checks: frame_try_runtime::UpgradeCheckSelect) -> (Weight, Weight) {
Expand Down
2 changes: 2 additions & 0 deletions system-parachains/asset-hubs/asset-hub-polkadot/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ sp-api = { default-features = false, version = "23.0.0" }
sp-block-builder = { default-features = false, version = "23.0.0" }
sp-consensus-aura = { default-features = false, version = "0.29.0" }
sp-core = { default-features = false, version = "25.0.0" }
sp-genesis-builder = { default-features = false , version = "0.4.0" }
sp-inherents = { default-features = false, version = "23.0.0" }
sp-offchain = { default-features = false, version = "23.0.0" }
sp-runtime = { default-features = false, version = "28.0.0" }
Expand Down Expand Up @@ -191,6 +192,7 @@ std = [
"sp-block-builder/std",
"sp-consensus-aura/std",
"sp-core/std",
"sp-genesis-builder/std",
"sp-inherents/std",
"sp-offchain/std",
"sp-runtime/std",
Expand Down
11 changes: 11 additions & 0 deletions system-parachains/asset-hubs/asset-hub-polkadot/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@ use codec::{Decode, Encode, MaxEncodedLen};
use frame_support::{
construct_runtime,
dispatch::DispatchClass,
genesis_builder_helper::{build_config, create_default_config},
parameter_types,
traits::{
AsEnsureOriginWithArg, ConstBool, ConstU32, ConstU64, ConstU8, EitherOfDiverse,
Expand Down Expand Up @@ -1066,6 +1067,16 @@ impl_runtime_apis! {
}
}

impl sp_genesis_builder::GenesisBuilder<Block> for Runtime {
fn create_default_config() -> Vec<u8> {
create_default_config::<RuntimeGenesisConfig>()
}

fn build_config(config: Vec<u8>) -> sp_genesis_builder::Result {
build_config::<RuntimeGenesisConfig>(config)
}
}

#[cfg(feature = "try-runtime")]
impl frame_try_runtime::TryRuntime<Block> for Runtime {
fn on_runtime_upgrade(checks: frame_try_runtime::UpgradeCheckSelect) -> (Weight, Weight) {
Expand Down
2 changes: 2 additions & 0 deletions system-parachains/bridge-hubs/bridge-hub-kusama/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ sp-api = { default-features = false, version = "23.0.0" }
sp-block-builder = { default-features = false, version = "23.0.0" }
sp-consensus-aura = { default-features = false, version = "0.29.0" }
sp-core = { default-features = false, version = "25.0.0" }
sp-genesis-builder = { default-features = false , version = "0.4.0" }
sp-inherents = { default-features = false, version = "23.0.0" }
sp-io = { default-features = false, version = "27.0.0" }
sp-offchain = { default-features = false, version = "23.0.0" }
Expand Down Expand Up @@ -121,6 +122,7 @@ std = [
"sp-block-builder/std",
"sp-consensus-aura/std",
"sp-core/std",
"sp-genesis-builder/std",
"sp-inherents/std",
"sp-io/std",
"sp-offchain/std",
Expand Down
11 changes: 11 additions & 0 deletions system-parachains/bridge-hubs/bridge-hub-kusama/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ use sp_version::RuntimeVersion;
use frame_support::{
construct_runtime,
dispatch::DispatchClass,
genesis_builder_helper::{build_config, create_default_config},
parameter_types,
traits::{ConstBool, ConstU32, ConstU64, ConstU8, EitherOfDiverse, Everything},
weights::{ConstantMultiplier, Weight},
Expand Down Expand Up @@ -640,6 +641,16 @@ impl_runtime_apis! {
}
}

impl sp_genesis_builder::GenesisBuilder<Block> for Runtime {
fn create_default_config() -> Vec<u8> {
create_default_config::<RuntimeGenesisConfig>()
}

fn build_config(config: Vec<u8>) -> sp_genesis_builder::Result {
build_config::<RuntimeGenesisConfig>(config)
}
}

#[cfg(feature = "try-runtime")]
impl frame_try_runtime::TryRuntime<Block> for Runtime {
fn on_runtime_upgrade(checks: frame_try_runtime::UpgradeCheckSelect) -> (Weight, Weight) {
Expand Down
2 changes: 2 additions & 0 deletions system-parachains/bridge-hubs/bridge-hub-polkadot/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ sp-api = { default-features = false, version = "23.0.0" }
sp-block-builder = { default-features = false, version = "23.0.0" }
sp-consensus-aura = { default-features = false, version = "0.29.0" }
sp-core = { default-features = false, version = "25.0.0" }
sp-genesis-builder = { default-features = false , version = "0.4.0" }
sp-inherents = { default-features = false, version = "23.0.0" }
sp-io = { default-features = false, version = "27.0.0" }
sp-offchain = { default-features = false, version = "23.0.0" }
Expand Down Expand Up @@ -121,6 +122,7 @@ std = [
"sp-block-builder/std",
"sp-consensus-aura/std",
"sp-core/std",
"sp-genesis-builder/std",
"sp-inherents/std",
"sp-io/std",
"sp-offchain/std",
Expand Down
11 changes: 11 additions & 0 deletions system-parachains/bridge-hubs/bridge-hub-polkadot/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ use sp_version::RuntimeVersion;
use frame_support::{
construct_runtime,
dispatch::DispatchClass,
genesis_builder_helper::{build_config, create_default_config},
parameter_types,
traits::{ConstBool, ConstU32, ConstU64, ConstU8, EitherOfDiverse, Everything},
weights::{ConstantMultiplier, Weight},
Expand Down Expand Up @@ -615,6 +616,16 @@ impl_runtime_apis! {
}
}

impl sp_genesis_builder::GenesisBuilder<Block> for Runtime {
fn create_default_config() -> Vec<u8> {
create_default_config::<RuntimeGenesisConfig>()
}

fn build_config(config: Vec<u8>) -> sp_genesis_builder::Result {
build_config::<RuntimeGenesisConfig>(config)
}
}

#[cfg(feature = "try-runtime")]
impl frame_try_runtime::TryRuntime<Block> for Runtime {
fn on_runtime_upgrade(checks: frame_try_runtime::UpgradeCheckSelect) -> (Weight, Weight) {
Expand Down
2 changes: 2 additions & 0 deletions system-parachains/collectives/collectives-polkadot/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ sp-arithmetic = { default-features = false , version = "20.0.0" }
sp-block-builder = { default-features = false, version = "23.0.0" }
sp-consensus-aura = { default-features = false, version = "0.29.0" }
sp-core = { default-features = false, version = "25.0.0" }
sp-genesis-builder = { default-features = false , version = "0.4.0" }
sp-inherents = { default-features = false, version = "23.0.0" }
sp-offchain = { default-features = false, version = "23.0.0" }
sp-runtime = { default-features = false, version = "28.0.0" }
Expand Down Expand Up @@ -198,6 +199,7 @@ std = [
"sp-block-builder/std",
"sp-consensus-aura/std",
"sp-core/std",
"sp-genesis-builder/std",
"sp-inherents/std",
"sp-io/std",
"sp-offchain/std",
Expand Down
10 changes: 10 additions & 0 deletions system-parachains/collectives/collectives-polkadot/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -886,6 +886,16 @@ impl_runtime_apis! {
}
}

impl sp_genesis_builder::GenesisBuilder<Block> for Runtime {
fn create_default_config() -> Vec<u8> {
create_default_config::<RuntimeGenesisConfig>()
}

fn build_config(config: Vec<u8>) -> sp_genesis_builder::Result {
build_config::<RuntimeGenesisConfig>(config)
}
}

#[cfg(feature = "try-runtime")]
impl frame_try_runtime::TryRuntime<Block> for Runtime {
fn on_runtime_upgrade(checks: frame_try_runtime::UpgradeCheckSelect) -> (Weight, Weight) {
Expand Down
2 changes: 2 additions & 0 deletions system-parachains/gluttons/glutton-kusama/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ pallet-sudo = { default-features = false, optional = true, version = "25.0.0" }
sp-api = { default-features = false, version = "23.0.0" }
sp-block-builder = { default-features = false, version = "23.0.0" }
sp-core = { default-features = false, version = "25.0.0" }
sp-genesis-builder = { default-features = false , version = "0.4.0" }
sp-inherents = { default-features = false, version = "23.0.0" }
sp-offchain = { default-features = false, version = "23.0.0" }
sp-runtime = { default-features = false, version = "28.0.0" }
Expand Down Expand Up @@ -83,6 +84,7 @@ std = [
"sp-api/std",
"sp-block-builder/std",
"sp-core/std",
"sp-genesis-builder/std",
"sp-inherents/std",
"sp-offchain/std",
"sp-runtime/std",
Expand Down
12 changes: 11 additions & 1 deletion system-parachains/gluttons/glutton-kusama/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -347,12 +347,22 @@ impl_runtime_apis! {
}
}

impl frame_system_rpc_runtime_api::AccountNonceApi<Block, AccountId, Nonce> for Runtime {
impl frame_system_rpc_runtime_api::AccountNonceApi<Block, AccountId, Nonce> for Runtime {
fn account_nonce(account: AccountId) -> Nonce {
System::account_nonce(account)
}
}

impl sp_genesis_builder::GenesisBuilder<Block> for Runtime {
fn create_default_config() -> Vec<u8> {
create_default_config::<RuntimeGenesisConfig>()
}

fn build_config(config: Vec<u8>) -> sp_genesis_builder::Result {
build_config::<RuntimeGenesisConfig>(config)
}
}

#[cfg(feature = "runtime-benchmarks")]
impl frame_benchmarking::Benchmark<Block> for Runtime {
fn benchmark_metadata(extra: bool) -> (
Expand Down

0 comments on commit 0ad007f

Please sign in to comment.