7 Commits

Author SHA1 Message Date
Przemek Rzad 8599efc46a Add a CI job to make sure relaychain produces blocks (#11) 2024-08-09 19:15:36 +02:00
Przemek Rzad af8901fed9 Add missing features (#10) 2024-08-08 18:40:14 +02:00
Przemek Rzad 1c62506267 Add an automatic PR reminder (#9) 2024-08-08 14:01:08 +02:00
Javier Bullrich ef08431ae0 added macos ci step (#8) 2024-08-08 13:25:27 +02:00
Template Bot 94e47b6e47 Update to stable2407 triggered by workflow_dispatch 2024-08-01 09:48:21 +00:00
Przemek Rzad a41ab75c30 Skip WASM build for tests and docs (#7) 2024-07-23 14:51:57 +02:00
Template Bot a9e0db20dd Update to 1.14.0 triggered by workflow_dispatch 2024-07-18 12:54:18 +00:00
13 changed files with 1322 additions and 992 deletions
@@ -0,0 +1,16 @@
name: Free disk space
description: We've run into out-of-disk error when compiling Rust projects, so we free up some space this way.
runs:
using: "composite"
steps:
- name: Free Disk Space
uses: jlumbroso/free-disk-space@54081f138730dfa15788a46383842cd2f914a1be # 1.3.1
with:
android: true # This alone is a 12 GB save.
# We disable the rest because it caused some problems. (they're enabled by default)
# The Android removal is enough.
dotnet: false
haskell: false
large-packages: false
swap-storage: false
@@ -0,0 +1,12 @@
name: Install macOS dependencies
description: Installs dependencies required to compile the template on macOS
runs:
using: "composite"
steps:
- run: |
curl https://sh.rustup.rs -sSf -y | sh
brew install protobuf
rustup target add wasm32-unknown-unknown --toolchain stable-aarch64-apple-darwin
rustup component add rust-src --toolchain stable-aarch64-apple-darwin
shell: sh
@@ -0,0 +1,15 @@
name: Install Ubuntu dependencies
description: Installs dependencies required to compile the template in Ubuntu
runs:
using: "composite"
steps:
- name: Rust compilation prerequisites (Ubuntu)
if: contains(matrix.os, 'ubuntu')
run: |
sudo apt update
sudo apt install -y \
protobuf-compiler
rustup target add wasm32-unknown-unknown
rustup component add rustfmt clippy rust-src
shell: bash
+43 -36
View File
@@ -12,30 +12,20 @@ concurrency:
cancel-in-progress: true
jobs:
ci:
runs-on: ubuntu-latest
build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, macos-latest]
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Rust compilation prerequisites
run: |
sudo apt update
sudo apt install -y \
protobuf-compiler
rustup target add wasm32-unknown-unknown
rustup component add rustfmt clippy rust-src
# We've run into out-of-disk error when compiling Polkadot in the next step, so we free up some space this way.
- name: Free Disk Space (Ubuntu)
uses: jlumbroso/free-disk-space@54081f138730dfa15788a46383842cd2f914a1be # 1.3.1
with:
android: true # This alone is a 12 GB save.
# We disable the rest because it caused some problems. (they're enabled by default)
# The Android removal is enough.
dotnet: false
haskell: false
large-packages: false
swap-storage: false
- if: contains(matrix.os, 'ubuntu')
uses: ./.github/actions/free-disk-space
- if: contains(matrix.os, 'ubuntu')
uses: ./.github/actions/ubuntu-dependencies
- if: contains(matrix.os, 'macos')
uses: ./.github/actions/macos-dependencies
- name: Build the template
run: cargo build
@@ -48,29 +38,46 @@ jobs:
timeout-minutes: 30
- name: Run the tests
run: cargo test
run: SKIP_WASM_BUILD=1 cargo test
timeout-minutes: 15
- name: Build the docs
run: cargo doc --all-features --workspace --no-deps
run: SKIP_WASM_BUILD=1 cargo doc --workspace --no-deps
timeout-minutes: 15
run-node:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, macos-latest]
steps:
- uses: actions/checkout@v4
- if: contains(matrix.os, 'ubuntu')
uses: ./.github/actions/free-disk-space
- if: contains(matrix.os, 'ubuntu')
uses: ./.github/actions/ubuntu-dependencies
- if: contains(matrix.os, 'macos')
uses: ./.github/actions/macos-dependencies
- name: Build the node individually in release mode
run: cargo build --package solochain-template-node --release
timeout-minutes: 90
- name: Make sure the node is producing blocks
run: |
./target/release/solochain-template-node --dev 2>&1 | tee out.txt &
until curl -s '127.0.0.1:9944'; do sleep 5; done
until cat out.txt | grep -s "Imported #2"; do sleep 5; done
shell: bash
timeout-minutes: 5
build-docker:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
# We've run into out-of-disk error when compiling Polkadot in the next step, so we free up some space this way.
- name: Free Disk Space (Ubuntu)
uses: jlumbroso/free-disk-space@54081f138730dfa15788a46383842cd2f914a1be # 1.3.1
with:
android: true # This alone is a 12 GB save.
# We disable the rest because it caused some problems. (they're enabled by default)
# The Android removal is enough.
dotnet: false
haskell: false
large-packages: false
swap-storage: false
- uses: ./.github/actions/free-disk-space
- name: Build the Dockerfile
run: docker build . -t polkadot-sdk-solochain-template
+24
View File
@@ -0,0 +1,24 @@
name: PR Reminder
permissions:
pull-requests: write
on:
pull_request:
types:
- opened
jobs:
pr-reminder:
runs-on: ubuntu-latest
steps:
- name: Comment a reminder on a new PR
uses: actions/github-script@v6
with:
script: |
github.rest.issues.createComment({
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,
body: 'Hello, this is an automatic reminder that any code changes should be made to [the source](https://github.com/paritytech/polkadot-sdk/tree/master/templates/solochain).'
})
Generated
+1018 -815
View File
File diff suppressed because it is too large Load Diff
+58 -1
View File
@@ -1,7 +1,7 @@
[workspace.package]
license = "MIT-0"
authors = ["Parity Technologies <admin@parity.io>"]
homepage = "https://substrate.io"
homepage = "https://paritytech.github.io/polkadot-sdk/"
repository = "https://github.com/paritytech/polkadot-sdk-solochain-template.git"
edition = "2021"
@@ -14,4 +14,61 @@ members = [
resolver = "2"
[workspace.dependencies]
solochain-template-runtime = { path = "./runtime", default-features = false }
pallet-template = { path = "./pallets/template", default-features = false }
clap = { version = "4.5.3" }
frame-benchmarking-cli = { version = "42.0.0", default-features = false }
frame-system = { version = "37.0.0", default-features = false }
futures = { version = "0.3.30" }
jsonrpsee = { version = "0.23.2" }
pallet-transaction-payment = { version = "37.0.0", default-features = false }
pallet-transaction-payment-rpc = { version = "40.0.0", default-features = false }
sc-basic-authorship = { version = "0.44.0", default-features = false }
sc-cli = { version = "0.46.0", default-features = false }
sc-client-api = { version = "37.0.0", default-features = false }
sc-consensus = { version = "0.43.0", default-features = false }
sc-consensus-aura = { version = "0.44.0", default-features = false }
sc-consensus-grandpa = { version = "0.29.0", default-features = false }
sc-executor = { version = "0.40.0", default-features = false }
sc-network = { version = "0.44.0", default-features = false }
sc-offchain = { version = "39.0.0", default-features = false }
sc-rpc-api = { version = "0.43.0", default-features = false }
sc-service = { version = "0.45.0", default-features = false }
sc-telemetry = { version = "24.0.0", default-features = false }
sc-transaction-pool = { version = "37.0.0", default-features = false }
sc-transaction-pool-api = { version = "37.0.0", default-features = false }
serde_json = { version = "1.0.114", default-features = false }
sp-api = { version = "34.0.0", default-features = false }
sp-block-builder = { version = "34.0.0", default-features = false }
sp-blockchain = { version = "37.0.0", default-features = false }
sp-consensus-aura = { version = "0.40.0", default-features = false }
sp-consensus-grandpa = { version = "21.0.0", default-features = false }
sp-core = { version = "34.0.0", default-features = false }
sp-inherents = { version = "34.0.0", default-features = false }
sp-io = { version = "38.0.0", default-features = false }
sp-keyring = { version = "39.0.0", default-features = false }
sp-runtime = { version = "39.0.0", default-features = false }
sp-timestamp = { version = "34.0.0", default-features = false }
substrate-frame-rpc-system = { version = "38.0.0", default-features = false }
substrate-build-script-utils = { version = "11.0.0", default-features = false }
codec = { version = "3.6.12", default-features = false, package = "parity-scale-codec" }
frame-benchmarking = { version = "37.0.0", default-features = false }
frame-executive = { version = "37.0.0", default-features = false }
frame-support = { version = "37.0.0", default-features = false }
frame-system-benchmarking = { version = "37.0.0", default-features = false }
frame-system-rpc-runtime-api = { version = "34.0.0", default-features = false }
frame-try-runtime = { version = "0.43.0", default-features = false }
pallet-aura = { version = "36.0.0", default-features = false }
pallet-balances = { version = "38.0.0", default-features = false }
pallet-grandpa = { version = "37.0.0", default-features = false }
pallet-sudo = { version = "37.0.0", default-features = false }
pallet-timestamp = { version = "36.0.0", default-features = false }
pallet-transaction-payment-rpc-runtime-api = { version = "37.0.0", default-features = false }
scale-info = { version = "2.11.1", default-features = false }
sp-genesis-builder = { version = "0.15.0", default-features = false }
sp-offchain = { version = "34.0.0", default-features = false }
sp-session = { version = "35.0.0", default-features = false }
sp-storage = { version = "21.0.0", default-features = false }
sp-transaction-pool = { version = "34.0.0", default-features = false }
sp-version = { version = "37.0.0", default-features = false }
substrate-wasm-builder = { version = "24.0.0", default-features = false }
+8 -8
View File
@@ -28,7 +28,7 @@ installation](#alternatives-installations) options.
Use the following command to build the node without launching it:
```sh
cargo build --release
cargo build --package solochain-template-node --release
```
### Embedded Docs
@@ -37,7 +37,7 @@ After you build the project, you can use the following command to explore its
parameters and subcommands:
```sh
./target/release/node-template -h
./target/release/solochain-template-node -h
```
You can generate and view the [Rust
@@ -54,19 +54,19 @@ The following command starts a single-node development chain that doesn't
persist state:
```sh
./target/release/node-template --dev
./target/release/solochain-template-node --dev
```
To purge the development chain's state, run the following command:
```sh
./target/release/node-template purge-chain --dev
./target/release/solochain-template-node purge-chain --dev
```
To start the development chain with detailed logging, run the following command:
```sh
RUST_BACKTRACE=1 ./target/release/node-template -ldebug --dev
RUST_BACKTRACE=1 ./target/release/solochain-template-node -ldebug --dev
```
Development chains:
@@ -75,7 +75,7 @@ Development chains:
- Use the **Alice** and **Bob** accounts as default validator authorities.
- Use the **Alice** account as the default `sudo` account.
- Are preconfigured with a genesis state (`/node/src/chain_spec.rs`) that
includes several prefunded development accounts.
includes several pre-funded development accounts.
To persist chain state between runs, specify a base path by running a command
@@ -86,7 +86,7 @@ similar to the following:
$ mkdir my-chain-state
// Use of that folder to store the chain state
$ ./target/release/node-template --dev --base-path ./my-chain-state/
$ ./target/release/solochain-template-node --dev --base-path ./my-chain-state/
// Check the folder structure created inside the base path after running the chain
$ ls ./my-chain-state
@@ -142,7 +142,7 @@ following:
file that defines a Substrate chain's initial (genesis) state. Chain
specifications are useful for development and testing, and critical when
architecting the launch of a production chain. Take note of the
`development_config` and `testnet_genesis` functions,. These functions are
`development_config` and `testnet_genesis` functions. These functions are
used to define the genesis state for the local development chain
configuration. These functions identify some [well-known
accounts](https://docs.substrate.io/reference/command-line-tools/subkey/) and
+70 -37
View File
@@ -1,6 +1,6 @@
[package]
name = "solochain-template-node"
description = "A solochain node template built with Substrate, part of Polkadot Sdk. (polkadot v1.13.0)"
description = "A solochain node template built with Substrate, part of Polkadot Sdk. (polkadot v1.15.0)"
version = "0.1.0"
license = "Unlicense"
authors.workspace = true
@@ -15,47 +15,80 @@ build = "build.rs"
targets = ["x86_64-unknown-linux-gnu"]
[dependencies]
clap = { version = "4.5.3", features = ["derive"] }
futures = { version = "0.3.30", features = ["thread-pool"] }
clap = { features = ["derive"], workspace = true }
futures = { features = ["thread-pool"], workspace = true }
serde_json = { workspace = true, default-features = true }
jsonrpsee = { version = "0.22", features = ["server"] }
sc-cli = { version = "0.43.0" }
sp-core = { version = "34.0.0" }
sc-executor = { version = "0.39.0" }
sc-network = { version = "0.41.0" }
sc-service = { version = "0.42.0" }
sc-telemetry = { version = "21.0.0" }
sc-transaction-pool = { version = "35.0.0" }
sc-transaction-pool-api = { version = "35.0.0" }
sc-offchain = { version = "36.0.0" }
sc-consensus-aura = { version = "0.41.0" }
sp-consensus-aura = { version = "0.39.0" }
sc-consensus = { version = "0.40.0" }
sc-consensus-grandpa = { version = "0.26.0" }
sp-consensus-grandpa = { version = "20.0.0" }
sc-client-api = { version = "35.0.0" }
sc-rpc-api = { version = "0.40.0" }
sc-basic-authorship = { version = "0.41.0" }
sp-runtime = { version = "38.0.0" }
sp-io = { version = "37.0.0" }
sp-timestamp = { version = "33.0.0" }
sp-inherents = { version = "33.0.0" }
sp-keyring = { version = "38.0.0" }
sp-api = { version = "33.0.0" }
sp-blockchain = { version = "35.0.0" }
sp-block-builder = { version = "33.0.0" }
frame-system = { version = "35.0.0" }
pallet-transaction-payment = { version = "35.0.0", default-features = false }
pallet-transaction-payment-rpc = { version = "37.0.0" }
substrate-frame-rpc-system = { version = "35.0.0" }
frame-benchmarking-cli = { version = "39.0.0" }
solochain-template-runtime = { version = "0.1.0", path = "../runtime" }
jsonrpsee = { features = ["server"], workspace = true }
sc-cli.workspace = true
sc-cli.default-features = true
sp-core.workspace = true
sp-core.default-features = true
sc-executor.workspace = true
sc-executor.default-features = true
sc-network.workspace = true
sc-network.default-features = true
sc-service.workspace = true
sc-service.default-features = true
sc-telemetry.workspace = true
sc-telemetry.default-features = true
sc-transaction-pool.workspace = true
sc-transaction-pool.default-features = true
sc-transaction-pool-api.workspace = true
sc-transaction-pool-api.default-features = true
sc-offchain.workspace = true
sc-offchain.default-features = true
sc-consensus-aura.workspace = true
sc-consensus-aura.default-features = true
sp-consensus-aura.workspace = true
sp-consensus-aura.default-features = true
sc-consensus.workspace = true
sc-consensus.default-features = true
sc-consensus-grandpa.workspace = true
sc-consensus-grandpa.default-features = true
sp-consensus-grandpa.workspace = true
sp-consensus-grandpa.default-features = true
sc-client-api.workspace = true
sc-client-api.default-features = true
sc-rpc-api.workspace = true
sc-rpc-api.default-features = true
sc-basic-authorship.workspace = true
sc-basic-authorship.default-features = true
sp-runtime.workspace = true
sp-runtime.default-features = true
sp-io.workspace = true
sp-io.default-features = true
sp-timestamp.workspace = true
sp-timestamp.default-features = true
sp-inherents.workspace = true
sp-inherents.default-features = true
sp-keyring.workspace = true
sp-keyring.default-features = true
sp-api.workspace = true
sp-api.default-features = true
sp-blockchain.workspace = true
sp-blockchain.default-features = true
sp-block-builder.workspace = true
sp-block-builder.default-features = true
frame-system.workspace = true
frame-system.default-features = true
pallet-transaction-payment.workspace = true
pallet-transaction-payment-rpc.workspace = true
pallet-transaction-payment-rpc.default-features = true
substrate-frame-rpc-system.workspace = true
substrate-frame-rpc-system.default-features = true
frame-benchmarking-cli.workspace = true
frame-benchmarking-cli.default-features = true
solochain-template-runtime.workspace = true
[build-dependencies]
substrate-build-script-utils = { version = "11.0.0" }
substrate-build-script-utils.workspace = true
substrate-build-script-utils.default-features = true
[features]
default = []
default = ["std"]
std = [
"solochain-template-runtime/std",
]
# Dependencies that are only required if runtime benchmarking should be build.
runtime-benchmarks = [
"frame-benchmarking-cli/runtime-benchmarks",
+11 -13
View File
@@ -1,6 +1,6 @@
[package]
name = "pallet-template"
description = "FRAME pallet template for defining custom runtime logic. (polkadot v1.13.0)"
description = "FRAME pallet template for defining custom runtime logic. (polkadot v1.15.0)"
version = "0.1.0"
license = "Unlicense"
authors.workspace = true
@@ -13,22 +13,20 @@ publish = false
targets = ["x86_64-unknown-linux-gnu"]
[dependencies]
codec = { package = "parity-scale-codec", version = "3.6.12", default-features = false, features = [
codec = { features = [
"derive",
] }
scale-info = { version = "2.11.1", default-features = false, features = [
], workspace = true }
scale-info = { features = [
"derive",
] }
# frame deps
frame-benchmarking = { version = "35.0.0", default-features = false, optional = true }
frame-support = { version = "35.0.0", default-features = false }
frame-system = { version = "35.0.0", default-features = false }
], workspace = true }
frame-benchmarking = { optional = true, workspace = true }
frame-support.workspace = true
frame-system.workspace = true
[dev-dependencies]
sp-core = { version = "34.0.0" }
sp-io = { version = "37.0.0" }
sp-runtime = { version = "38.0.0" }
sp-core = { default-features = true, workspace = true }
sp-io = { default-features = true, workspace = true }
sp-runtime = { default-features = true, workspace = true }
[features]
default = ["std"]
+2 -27
View File
@@ -1,10 +1,6 @@
use crate as pallet_template;
use frame_support::{derive_impl, traits::ConstU16};
use sp_core::H256;
use sp_runtime::{
traits::{BlakeTwo256, IdentityLookup},
BuildStorage,
};
use frame_support::derive_impl;
use sp_runtime::BuildStorage;
type Block = frame_system::mocking::MockBlock<Test>;
@@ -19,28 +15,7 @@ frame_support::construct_runtime!(
#[derive_impl(frame_system::config_preludes::TestDefaultConfig)]
impl frame_system::Config for Test {
type BaseCallFilter = frame_support::traits::Everything;
type BlockWeights = ();
type BlockLength = ();
type DbWeight = ();
type RuntimeOrigin = RuntimeOrigin;
type RuntimeCall = RuntimeCall;
type Nonce = u64;
type Hash = H256;
type Hashing = BlakeTwo256;
type AccountId = u64;
type Lookup = IdentityLookup<Self::AccountId>;
type Block = Block;
type RuntimeEvent = RuntimeEvent;
type Version = ();
type PalletInfo = PalletInfo;
type AccountData = ();
type OnNewAccount = ();
type OnKilledAccount = ();
type SystemWeightInfo = ();
type SS58Prefix = ConstU16<42>;
type OnSetCode = ();
type MaxConsumers = frame_support::traits::ConstU32<16>;
}
impl pallet_template::Config for Test {
+34 -48
View File
@@ -1,6 +1,6 @@
[package]
name = "solochain-template-runtime"
description = "A solochain runtime template built with Substrate, part of Polkadot Sdk. (polkadot v1.13.0)"
description = "A solochain runtime template built with Substrate, part of Polkadot Sdk. (polkadot v1.15.0)"
version = "0.1.0"
license = "Unlicense"
authors.workspace = true
@@ -13,57 +13,44 @@ publish = false
targets = ["x86_64-unknown-linux-gnu"]
[dependencies]
codec = { package = "parity-scale-codec", version = "3.6.12", default-features = false, features = [
codec = { features = [
"derive",
] }
scale-info = { version = "2.11.1", default-features = false, features = [
], workspace = true }
scale-info = { features = [
"derive",
"serde",
] }
# frame
frame-support = { version = "35.0.0", default-features = false, features = ["experimental"] }
frame-system = { version = "35.0.0", default-features = false }
frame-try-runtime = { version = "0.41.0", default-features = false, optional = true }
frame-executive = { version = "35.0.0", default-features = false }
# frame pallets
pallet-aura = { version = "34.0.0", default-features = false }
pallet-balances = { version = "36.0.0", default-features = false }
pallet-grandpa = { version = "35.0.0", default-features = false }
pallet-sudo = { version = "35.0.0", default-features = false }
pallet-timestamp = { version = "34.0.0", default-features = false }
pallet-transaction-payment = { version = "35.0.0", default-features = false }
# primitives
sp-api = { version = "33.0.0", default-features = false }
sp-block-builder = { version = "33.0.0", default-features = false }
sp-consensus-aura = { version = "0.39.0", default-features = false, features = ["serde"] }
sp-consensus-grandpa = { version = "20.0.0", default-features = false, features = ["serde"] }
sp-core = { version = "34.0.0", default-features = false, features = ["serde"] }
sp-inherents = { version = "33.0.0", default-features = false }
sp-offchain = { version = "33.0.0", default-features = false }
sp-runtime = { version = "38.0.0", default-features = false, features = ["serde"] }
sp-session = { version = "34.0.0", default-features = false }
sp-std = { version = "14.0.0", default-features = false }
sp-storage = { version = "21.0.0", default-features = false }
sp-transaction-pool = { version = "33.0.0", default-features = false }
sp-version = { version = "36.0.0", default-features = false, features = ["serde"] }
sp-genesis-builder = { version = "0.14.0", default-features = false }
# RPC related
frame-system-rpc-runtime-api = { version = "33.0.0", default-features = false }
pallet-transaction-payment-rpc-runtime-api = { version = "35.0.0", default-features = false }
# Used for runtime benchmarking
frame-benchmarking = { version = "35.0.0", default-features = false, optional = true }
frame-system-benchmarking = { version = "35.0.0", default-features = false, optional = true }
# The pallet in this template.
pallet-template = { path = "../pallets/template", default-features = false, version = "0.1.0" }
], workspace = true }
frame-support = { features = ["experimental"], workspace = true }
frame-system.workspace = true
frame-try-runtime = { optional = true, workspace = true }
frame-executive.workspace = true
pallet-aura.workspace = true
pallet-balances.workspace = true
pallet-grandpa.workspace = true
pallet-sudo.workspace = true
pallet-timestamp.workspace = true
pallet-transaction-payment.workspace = true
sp-api.workspace = true
sp-block-builder.workspace = true
sp-consensus-aura = { features = ["serde"], workspace = true }
sp-consensus-grandpa = { features = ["serde"], workspace = true }
sp-core = { features = ["serde"], workspace = true }
sp-inherents.workspace = true
sp-offchain.workspace = true
sp-runtime = { features = ["serde"], workspace = true }
sp-session.workspace = true
sp-storage.workspace = true
sp-transaction-pool.workspace = true
sp-version = { features = ["serde"], workspace = true }
sp-genesis-builder.workspace = true
frame-system-rpc-runtime-api.workspace = true
pallet-transaction-payment-rpc-runtime-api.workspace = true
frame-benchmarking = { optional = true, workspace = true }
frame-system-benchmarking = { optional = true, workspace = true }
pallet-template.workspace = true
[build-dependencies]
substrate-wasm-builder = { version = "23.0.0", optional = true }
substrate-wasm-builder = { optional = true, workspace = true, default-features = true }
[features]
default = ["std"]
@@ -99,7 +86,6 @@ std = [
"sp-offchain/std",
"sp-runtime/std",
"sp-session/std",
"sp-std/std",
"sp-storage/std",
"sp-transaction-pool/std",
"sp-version/std",
+11 -7
View File
@@ -3,6 +3,8 @@
#[cfg(feature = "std")]
include!(concat!(env!("OUT_DIR"), "/wasm_binary.rs"));
extern crate alloc;
use alloc::{vec, vec::Vec};
use pallet_grandpa::AuthorityId as GrandpaId;
use sp_api::impl_runtime_apis;
use sp_consensus_aura::sr25519::AuthorityId as AuraId;
@@ -13,12 +15,10 @@ use sp_runtime::{
transaction_validity::{TransactionSource, TransactionValidity},
ApplyExtrinsicResult, MultiSignature,
};
use sp_std::prelude::*;
#[cfg(feature = "std")]
use sp_version::NativeVersion;
use sp_version::RuntimeVersion;
use frame_support::genesis_builder_helper::{build_state, get_preset};
pub use frame_support::{
construct_runtime, derive_impl, parameter_types,
traits::{
@@ -33,6 +33,10 @@ pub use frame_support::{
},
StorageValue,
};
use frame_support::{
genesis_builder_helper::{build_state, get_preset},
traits::VariantCountOf,
};
pub use frame_system::Call as SystemCall;
pub use pallet_balances::Call as BalancesCall;
pub use pallet_timestamp::Call as TimestampCall;
@@ -218,10 +222,10 @@ impl pallet_balances::Config for Runtime {
type ExistentialDeposit = ConstU128<EXISTENTIAL_DEPOSIT>;
type AccountStore = System;
type WeightInfo = pallet_balances::weights::SubstrateWeight<Runtime>;
type FreezeIdentifier = ();
type MaxFreezes = ();
type RuntimeHoldReason = ();
type RuntimeFreezeReason = ();
type FreezeIdentifier = RuntimeFreezeReason;
type MaxFreezes = VariantCountOf<RuntimeFreezeReason>;
type RuntimeHoldReason = RuntimeHoldReason;
type RuntimeFreezeReason = RuntimeHoldReason;
}
parameter_types! {
@@ -367,7 +371,7 @@ impl_runtime_apis! {
Runtime::metadata_at_version(version)
}
fn metadata_versions() -> sp_std::vec::Vec<u32> {
fn metadata_versions() -> Vec<u32> {
Runtime::metadata_versions()
}
}