mirror of
https://github.com/pezkuwichain/pez-minimal-template.git
synced 2026-05-30 05:21:06 +00:00
Compare commits
30 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 0c51346d98 | |||
| 10de7b33cb | |||
| a62d6d31eb | |||
| 3f74c0485e | |||
| 2d91027ab6 | |||
| b6770d6a5f | |||
| 419eb3efda | |||
| d31ced7974 | |||
| 331e79d33f | |||
| 7f8d3d018c | |||
| 1f38756e28 | |||
| b56b85e852 | |||
| 7b2ebf016f | |||
| 33067c2c1f | |||
| a5e12feede | |||
| 4c84ccd239 | |||
| 106c604993 | |||
| 670c29ab86 | |||
| 4b900d3081 | |||
| 722657deda | |||
| 5718deb606 | |||
| 8ad0586c25 | |||
| a150b7ee98 | |||
| 78fbe0b4c3 | |||
| 85e9f2d04b | |||
| 888d8eb81a | |||
| ce9fbe59b7 | |||
| 91e66fc7ea | |||
| 9b47a47b3a | |||
| 6b4829dd6c |
+50
-38
@@ -6,6 +6,7 @@ on:
|
|||||||
branches:
|
branches:
|
||||||
- main
|
- main
|
||||||
- master
|
- master
|
||||||
|
- rzadp/test-produce-blocks
|
||||||
|
|
||||||
concurrency:
|
concurrency:
|
||||||
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
|
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
|
||||||
@@ -13,11 +14,15 @@ concurrency:
|
|||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
ci:
|
ci:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ${{ matrix.os }}
|
||||||
|
strategy:
|
||||||
|
matrix:
|
||||||
|
os: [ubuntu-latest, macos-latest]
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v4
|
||||||
|
|
||||||
- name: Rust compilation prerequisites
|
- name: Rust compilation prerequisites (Ubuntu)
|
||||||
|
if: contains(matrix.os, 'ubuntu')
|
||||||
run: |
|
run: |
|
||||||
sudo apt update
|
sudo apt update
|
||||||
sudo apt install -y \
|
sudo apt install -y \
|
||||||
@@ -25,43 +30,17 @@ jobs:
|
|||||||
rustup target add wasm32-unknown-unknown
|
rustup target add wasm32-unknown-unknown
|
||||||
rustup component add rustfmt clippy rust-src
|
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: Install Cargo (MacOS)
|
||||||
- name: Free Disk Space (Ubuntu)
|
if: contains(matrix.os, 'macos')
|
||||||
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
|
|
||||||
|
|
||||||
- name: Build the template
|
|
||||||
run: cargo build
|
|
||||||
timeout-minutes: 90
|
|
||||||
|
|
||||||
- name: Run clippy
|
|
||||||
run: |
|
run: |
|
||||||
SKIP_WASM_BUILD=1 cargo clippy --all-targets --locked --workspace --quiet
|
curl https://sh.rustup.rs -sSf -y | sh
|
||||||
SKIP_WASM_BUILD=1 cargo clippy --all-targets --all-features --locked --workspace --quiet
|
brew install protobuf
|
||||||
timeout-minutes: 30
|
rustup target add wasm32-unknown-unknown --toolchain stable-aarch64-apple-darwin
|
||||||
|
rustup component add rust-src --toolchain stable-aarch64-apple-darwin
|
||||||
- name: Run the tests
|
|
||||||
run: cargo test
|
|
||||||
timeout-minutes: 15
|
|
||||||
|
|
||||||
- name: Build the docs
|
|
||||||
run: cargo doc --all-features --workspace --no-deps
|
|
||||||
timeout-minutes: 15
|
|
||||||
|
|
||||||
build-docker:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v3
|
|
||||||
|
|
||||||
# We've run into out-of-disk error when compiling Polkadot in the next step, so we free up some space this way.
|
# 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)
|
- name: Free Disk Space (Ubuntu)
|
||||||
|
if: contains(matrix.os, 'ubuntu')
|
||||||
uses: jlumbroso/free-disk-space@54081f138730dfa15788a46383842cd2f914a1be # 1.3.1
|
uses: jlumbroso/free-disk-space@54081f138730dfa15788a46383842cd2f914a1be # 1.3.1
|
||||||
with:
|
with:
|
||||||
android: true # This alone is a 12 GB save.
|
android: true # This alone is a 12 GB save.
|
||||||
@@ -72,6 +51,39 @@ jobs:
|
|||||||
large-packages: false
|
large-packages: false
|
||||||
swap-storage: false
|
swap-storage: false
|
||||||
|
|
||||||
- name: Build the Dockerfile
|
# This is mentioned as example in the README:
|
||||||
run: docker build . -t polkadot-sdk-minimal-template
|
- name: Build the node individually in release mode
|
||||||
|
run: |
|
||||||
|
# Save some space from debug builds
|
||||||
|
rm -rf ./target
|
||||||
|
cargo build --package minimal-template-node --release
|
||||||
timeout-minutes: 90
|
timeout-minutes: 90
|
||||||
|
|
||||||
|
- name: Make sure the node is producing blocks
|
||||||
|
run: |
|
||||||
|
./target/release/minimal-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@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
|
||||||
|
|
||||||
|
# - name: Build the Dockerfile
|
||||||
|
# run: docker build . -t polkadot-sdk-minimal-template
|
||||||
|
# timeout-minutes: 90
|
||||||
|
|||||||
@@ -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/minimal).'
|
||||||
|
})
|
||||||
@@ -0,0 +1,65 @@
|
|||||||
|
name: Release
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
contents: write
|
||||||
|
packages: write
|
||||||
|
|
||||||
|
on:
|
||||||
|
release:
|
||||||
|
types: [released]
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
release-docker:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: Set up Docker Buildx
|
||||||
|
uses: docker/setup-buildx-action@v3
|
||||||
|
|
||||||
|
- name: Login to GitHub Container Registry
|
||||||
|
uses: docker/login-action@v3
|
||||||
|
with:
|
||||||
|
registry: ghcr.io
|
||||||
|
username: ${{ github.actor }}
|
||||||
|
password: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
|
||||||
|
# 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
|
||||||
|
|
||||||
|
- name: Build and push
|
||||||
|
uses: docker/build-push-action@v6
|
||||||
|
with:
|
||||||
|
push: true
|
||||||
|
tags: ghcr.io/${{ github.repository }}:${{ github.ref_name }}
|
||||||
|
|
||||||
|
release-binaries:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- 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 rust-src
|
||||||
|
|
||||||
|
- name: Build the template
|
||||||
|
run: cargo build --locked --release
|
||||||
|
timeout-minutes: 90
|
||||||
|
|
||||||
|
- name: Upload the binaries
|
||||||
|
uses: softprops/action-gh-release@v2
|
||||||
|
with:
|
||||||
|
files: |
|
||||||
|
target/release/minimal-template-node
|
||||||
|
target/release/wbuild/minimal-template-runtime/minimal_template_runtime.compact.compressed.wasm
|
||||||
Generated
+10557
File diff suppressed because it is too large
Load Diff
+35
-25
@@ -1,7 +1,7 @@
|
|||||||
[workspace.package]
|
[workspace.package]
|
||||||
license = "MIT-0"
|
license = "MIT-0"
|
||||||
authors = ["Parity Technologies <admin@parity.io>"]
|
authors = ["Parity Technologies <admin@parity.io>"]
|
||||||
homepage = "https://substrate.io"
|
homepage = "https://paritytech.github.io/polkadot-sdk/"
|
||||||
repository = "https://github.com/paritytech/polkadot-sdk-minimal-template.git"
|
repository = "https://github.com/paritytech/polkadot-sdk-minimal-template.git"
|
||||||
edition = "2021"
|
edition = "2021"
|
||||||
|
|
||||||
@@ -14,33 +14,43 @@ members = [
|
|||||||
resolver = "2"
|
resolver = "2"
|
||||||
|
|
||||||
[workspace.dependencies]
|
[workspace.dependencies]
|
||||||
|
minimal-template-runtime = { path = "./runtime", default-features = false }
|
||||||
|
pallet-minimal-template = { path = "./pallets/template", default-features = false }
|
||||||
clap = { version = "4.5.3" }
|
clap = { version = "4.5.3" }
|
||||||
docify = { version = "0.2.8" }
|
docify = { version = "0.2.8" }
|
||||||
frame = { path = "substrate/frame", default-features = false, package = "polkadot-sdk-frame", version = "0.5.0" }
|
frame = { version = "0.6.0", default-features = false, package = "polkadot-sdk-frame" }
|
||||||
futures = { version = "0.3.30" }
|
futures = { version = "0.3.30" }
|
||||||
futures-timer = { version = "3.0.2" }
|
futures-timer = { version = "3.0.2" }
|
||||||
jsonrpsee = { version = "0.23.2" }
|
jsonrpsee = { version = "0.23.2" }
|
||||||
minimal-template-runtime = { path = "templates/minimal/runtime", version = "0.1.0" }
|
sc-basic-authorship = { version = "0.44.0", default-features = false }
|
||||||
sc-basic-authorship = { path = "substrate/client/basic-authorship", default-features = false, version = "0.42.0" }
|
sc-cli = { version = "0.46.0", default-features = false }
|
||||||
sc-cli = { path = "substrate/client/cli", default-features = false, version = "0.44.0" }
|
sc-client-api = { version = "37.0.0", default-features = false }
|
||||||
sc-client-api = { path = "substrate/client/api", default-features = false, version = "35.1.0" }
|
sc-consensus = { version = "0.43.0", default-features = false }
|
||||||
sc-consensus = { path = "substrate/client/consensus/common", default-features = false, version = "0.41.0" }
|
sc-consensus-manual-seal = { version = "0.45.0", default-features = false }
|
||||||
sc-consensus-manual-seal = { path = "substrate/client/consensus/manual-seal", default-features = false, version = "0.43.0" }
|
sc-executor = { version = "0.40.0", default-features = false }
|
||||||
sc-executor = { path = "substrate/client/executor", default-features = false, version = "0.39.0" }
|
sc-network = { version = "0.44.0", default-features = false }
|
||||||
sc-network = { path = "substrate/client/network", default-features = false, version = "0.42.0" }
|
sc-offchain = { version = "39.0.0", default-features = false }
|
||||||
sc-offchain = { path = "substrate/client/offchain", default-features = false, version = "37.0.0" }
|
sc-rpc-api = { version = "0.43.0", default-features = false }
|
||||||
sc-rpc-api = { path = "substrate/client/rpc-api", default-features = false, version = "0.41.0" }
|
sc-service = { version = "0.45.0", default-features = false }
|
||||||
sc-service = { path = "substrate/client/service", default-features = false, version = "0.43.0" }
|
sc-telemetry = { version = "24.0.0", default-features = false }
|
||||||
sc-telemetry = { path = "substrate/client/telemetry", default-features = false, version = "22.0.0" }
|
sc-transaction-pool = { version = "37.0.0", default-features = false }
|
||||||
sc-transaction-pool = { path = "substrate/client/transaction-pool", default-features = false, version = "35.0.0" }
|
sc-transaction-pool-api = { version = "37.0.0", default-features = false }
|
||||||
sc-transaction-pool-api = { path = "substrate/client/transaction-pool/api", default-features = false, version = "35.0.0" }
|
|
||||||
serde_json = { version = "1.0.114", default-features = false }
|
serde_json = { version = "1.0.114", default-features = false }
|
||||||
sp-api = { path = "substrate/primitives/api", default-features = false, version = "33.0.0" }
|
sp-api = { version = "34.0.0", default-features = false }
|
||||||
sp-block-builder = { path = "substrate/primitives/block-builder", default-features = false, version = "33.0.0" }
|
sp-block-builder = { version = "34.0.0", default-features = false }
|
||||||
sp-blockchain = { path = "substrate/primitives/blockchain", default-features = false, version = "35.1.0" }
|
sp-blockchain = { version = "37.0.0", default-features = false }
|
||||||
sp-io = { path = "substrate/primitives/io", default-features = false, version = "37.0.0" }
|
sp-io = { version = "38.0.0", default-features = false }
|
||||||
sp-keyring = { path = "substrate/primitives/keyring", default-features = false, version = "38.0.0" }
|
sp-keyring = { version = "39.0.0", default-features = false }
|
||||||
sp-runtime = { path = "substrate/primitives/runtime", default-features = false, version = "38.0.0" }
|
sp-runtime = { version = "39.0.0", default-features = false }
|
||||||
sp-timestamp = { path = "substrate/primitives/timestamp", default-features = false, version = "33.0.0" }
|
sp-timestamp = { version = "34.0.0", default-features = false }
|
||||||
substrate-frame-rpc-system = { path = "substrate/utils/frame/rpc/system", default-features = false, version = "36.0.0" }
|
substrate-frame-rpc-system = { version = "38.0.0", default-features = false }
|
||||||
substrate-build-script-utils = { path = "substrate/utils/build-script-utils", default-features = false, version = "11.0.0" }
|
substrate-build-script-utils = { version = "11.0.0", default-features = false }
|
||||||
|
codec = { version = "3.6.12", default-features = false, package = "parity-scale-codec" }
|
||||||
|
pallet-balances = { version = "38.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 = { version = "37.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 }
|
||||||
|
substrate-wasm-builder = { version = "24.0.0", default-features = false }
|
||||||
|
|||||||
@@ -14,7 +14,7 @@
|
|||||||
* 🤏 This template is a minimal (in terms of complexity and the number of components)
|
* 🤏 This template is a minimal (in terms of complexity and the number of components)
|
||||||
template for building a blockchain node.
|
template for building a blockchain node.
|
||||||
|
|
||||||
* 🔧 Its runtime is configured of a single custom pallet as a starting point, and a handful of ready-made pallets
|
* 🔧 Its runtime is configured with a single custom pallet as a starting point, and a handful of ready-made pallets
|
||||||
such as a [Balances pallet](https://paritytech.github.io/polkadot-sdk/master/pallet_balances/index.html).
|
such as a [Balances pallet](https://paritytech.github.io/polkadot-sdk/master/pallet_balances/index.html).
|
||||||
|
|
||||||
* 👤 The template has no consensus configured - it is best for experimenting with a single node network.
|
* 👤 The template has no consensus configured - it is best for experimenting with a single node network.
|
||||||
@@ -42,7 +42,7 @@ packages required to compile this template - please take note of the Rust compil
|
|||||||
🔨 Use the following command to build the node without launching it:
|
🔨 Use the following command to build the node without launching it:
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
cargo build --release
|
cargo build --package minimal-template-node --release
|
||||||
```
|
```
|
||||||
|
|
||||||
🐳 Alternatively, build the docker image:
|
🐳 Alternatively, build the docker image:
|
||||||
@@ -65,8 +65,8 @@ docker run --rm polkadot-sdk-minimal-template --dev
|
|||||||
Development chains:
|
Development chains:
|
||||||
|
|
||||||
* 🧹 Do not persist the state.
|
* 🧹 Do not persist the state.
|
||||||
* 💰 Are preconfigured with a genesis state that includes several prefunded development accounts.
|
* 💰 Are pre-configured with a genesis state that includes several pre-funded development accounts.
|
||||||
* 🧑⚖️ Development accounts are used as `sudo` accounts.
|
* 🧑⚖️ One development account (`ALICE`) is used as `sudo` accounts.
|
||||||
|
|
||||||
### Connect with the Polkadot-JS Apps Front-End
|
### Connect with the Polkadot-JS Apps Front-End
|
||||||
|
|
||||||
|
|||||||
+50
-25
@@ -1,6 +1,6 @@
|
|||||||
[package]
|
[package]
|
||||||
name = "minimal-template-node"
|
name = "minimal-template-node"
|
||||||
description = "A minimal Substrate-based Substrate node, ready for hacking. (polkadot v1.14.0)"
|
description = "A minimal Substrate-based Substrate node, ready for hacking. (polkadot v1.15.0)"
|
||||||
version = "0.1.0"
|
version = "0.1.0"
|
||||||
license = "Unlicense"
|
license = "Unlicense"
|
||||||
authors.workspace = true
|
authors.workspace = true
|
||||||
@@ -20,32 +20,57 @@ futures = { features = ["thread-pool"], workspace = true }
|
|||||||
futures-timer = { workspace = true }
|
futures-timer = { workspace = true }
|
||||||
jsonrpsee = { features = ["server"], workspace = true }
|
jsonrpsee = { features = ["server"], workspace = true }
|
||||||
serde_json = { workspace = true, default-features = true }
|
serde_json = { workspace = true, default-features = true }
|
||||||
sc-cli = { version = "0.44.0", workspace = true, default-features = true }
|
sc-cli.workspace = true
|
||||||
sc-executor = { version = "0.39.0", workspace = true, default-features = true }
|
sc-cli.default-features = true
|
||||||
sc-network = { version = "0.42.0", workspace = true, default-features = true }
|
sc-executor.workspace = true
|
||||||
sc-service = { version = "0.43.0", workspace = true, default-features = true }
|
sc-executor.default-features = true
|
||||||
sc-telemetry = { version = "22.0.0", workspace = true, default-features = true }
|
sc-network.workspace = true
|
||||||
sc-transaction-pool = { version = "35.0.0", workspace = true, default-features = true }
|
sc-network.default-features = true
|
||||||
sc-transaction-pool-api = { version = "35.0.0", workspace = true, default-features = true }
|
sc-service.workspace = true
|
||||||
sc-consensus = { version = "0.41.0", workspace = true, default-features = true }
|
sc-service.default-features = true
|
||||||
sc-consensus-manual-seal = { version = "0.43.0", workspace = true, default-features = true }
|
sc-telemetry.workspace = true
|
||||||
sc-rpc-api = { version = "0.41.0", workspace = true, default-features = true }
|
sc-telemetry.default-features = true
|
||||||
sc-basic-authorship = { version = "0.42.0", workspace = true, default-features = true }
|
sc-transaction-pool.workspace = true
|
||||||
sc-offchain = { version = "37.0.0", workspace = true, default-features = true }
|
sc-transaction-pool.default-features = true
|
||||||
sc-client-api = { version = "35.1.0", workspace = true, default-features = true }
|
sc-transaction-pool-api.workspace = true
|
||||||
sp-timestamp = { version = "33.0.0", workspace = true, default-features = true }
|
sc-transaction-pool-api.default-features = true
|
||||||
sp-keyring = { version = "38.0.0", workspace = true, default-features = true }
|
sc-consensus.workspace = true
|
||||||
sp-api = { version = "33.0.0", workspace = true, default-features = true }
|
sc-consensus.default-features = true
|
||||||
sp-blockchain = { version = "35.1.0", workspace = true, default-features = true }
|
sc-consensus-manual-seal.workspace = true
|
||||||
sp-block-builder = { version = "33.0.0", workspace = true, default-features = true }
|
sc-consensus-manual-seal.default-features = true
|
||||||
sp-io = { version = "37.0.0", workspace = true, default-features = true }
|
sc-rpc-api.workspace = true
|
||||||
sp-runtime = { version = "38.0.0", workspace = true, default-features = true }
|
sc-rpc-api.default-features = true
|
||||||
substrate-frame-rpc-system = { version = "36.0.0", workspace = true, default-features = true }
|
sc-basic-authorship.workspace = true
|
||||||
|
sc-basic-authorship.default-features = true
|
||||||
|
sc-offchain.workspace = true
|
||||||
|
sc-offchain.default-features = true
|
||||||
|
sc-client-api.workspace = true
|
||||||
|
sc-client-api.default-features = true
|
||||||
|
sp-timestamp.workspace = true
|
||||||
|
sp-timestamp.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
|
||||||
|
sp-io.workspace = true
|
||||||
|
sp-io.default-features = true
|
||||||
|
sp-runtime.workspace = true
|
||||||
|
sp-runtime.default-features = true
|
||||||
|
substrate-frame-rpc-system.workspace = true
|
||||||
|
substrate-frame-rpc-system.default-features = true
|
||||||
frame = { features = ["experimental", "runtime"], workspace = true, default-features = true }
|
frame = { features = ["experimental", "runtime"], workspace = true, default-features = true }
|
||||||
minimal-template-runtime = { version = "0.1.0", workspace = true }
|
minimal-template-runtime.workspace = true
|
||||||
|
|
||||||
[build-dependencies]
|
[build-dependencies]
|
||||||
substrate-build-script-utils = { version = "11.0.0", workspace = true, default-features = true }
|
substrate-build-script-utils.workspace = true
|
||||||
|
substrate-build-script-utils.default-features = true
|
||||||
|
|
||||||
[features]
|
[features]
|
||||||
default = []
|
default = ["std"]
|
||||||
|
std = [
|
||||||
|
"minimal-template-runtime/std",
|
||||||
|
]
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
[package]
|
[package]
|
||||||
name = "pallet-minimal-template"
|
name = "pallet-minimal-template"
|
||||||
description = "A minimal pallet built with FRAME, part of Polkadot Sdk. (polkadot v1.14.0)"
|
description = "A minimal pallet built with FRAME, part of Polkadot Sdk. (polkadot v1.15.0)"
|
||||||
version = "0.1.0"
|
version = "0.1.0"
|
||||||
license = "Unlicense"
|
license = "Unlicense"
|
||||||
authors.workspace = true
|
authors.workspace = true
|
||||||
|
|||||||
@@ -1,4 +1,7 @@
|
|||||||
//! A shell pallet built with [`frame`].
|
//! A shell pallet built with [`frame`].
|
||||||
|
//!
|
||||||
|
//! To get started with this pallet, try implementing the guide in
|
||||||
|
//! <https://paritytech.github.io/polkadot-sdk/master/polkadot_sdk_docs/guides/your_first_pallet/index.html>
|
||||||
|
|
||||||
#![cfg_attr(not(feature = "std"), no_std)]
|
#![cfg_attr(not(feature = "std"), no_std)]
|
||||||
|
|
||||||
|
|||||||
+10
-10
@@ -1,6 +1,6 @@
|
|||||||
[package]
|
[package]
|
||||||
name = "minimal-template-runtime"
|
name = "minimal-template-runtime"
|
||||||
description = "A solochain runtime template built with Substrate, part of Polkadot Sdk. (polkadot v1.14.0)"
|
description = "A solochain runtime template built with Substrate, part of Polkadot Sdk. (polkadot v1.15.0)"
|
||||||
version = "0.1.0"
|
version = "0.1.0"
|
||||||
license = "Unlicense"
|
license = "Unlicense"
|
||||||
authors.workspace = true
|
authors.workspace = true
|
||||||
@@ -13,17 +13,17 @@ publish = false
|
|||||||
codec = { workspace = true }
|
codec = { workspace = true }
|
||||||
scale-info = { workspace = true }
|
scale-info = { workspace = true }
|
||||||
frame = { features = ["experimental", "runtime"], workspace = true }
|
frame = { features = ["experimental", "runtime"], workspace = true }
|
||||||
pallet-balances = { version = "37.0.0", workspace = true }
|
pallet-balances.workspace = true
|
||||||
pallet-sudo = { version = "36.0.0", workspace = true }
|
pallet-sudo.workspace = true
|
||||||
pallet-timestamp = { version = "35.0.0", workspace = true }
|
pallet-timestamp.workspace = true
|
||||||
pallet-transaction-payment = { version = "36.0.0", workspace = true }
|
pallet-transaction-payment.workspace = true
|
||||||
pallet-transaction-payment-rpc-runtime-api = { version = "36.0.0", workspace = true }
|
pallet-transaction-payment-rpc-runtime-api.workspace = true
|
||||||
sp-genesis-builder = { version = "0.14.0", workspace = true }
|
sp-genesis-builder.workspace = true
|
||||||
sp-runtime = { version = "38.0.0", features = ["serde"], workspace = true }
|
sp-runtime = { features = ["serde"], workspace = true }
|
||||||
pallet-minimal-template = { version = "0.1.0", workspace = true }
|
pallet-minimal-template.workspace = true
|
||||||
|
|
||||||
[build-dependencies]
|
[build-dependencies]
|
||||||
substrate-wasm-builder = { version = "23.0.0", optional = true, workspace = true, default-features = true }
|
substrate-wasm-builder = { optional = true, workspace = true, default-features = true }
|
||||||
|
|
||||||
[features]
|
[features]
|
||||||
default = ["std"]
|
default = ["std"]
|
||||||
|
|||||||
@@ -23,6 +23,9 @@
|
|||||||
#[cfg(feature = "std")]
|
#[cfg(feature = "std")]
|
||||||
include!(concat!(env!("OUT_DIR"), "/wasm_binary.rs"));
|
include!(concat!(env!("OUT_DIR"), "/wasm_binary.rs"));
|
||||||
|
|
||||||
|
extern crate alloc;
|
||||||
|
|
||||||
|
use alloc::{vec, vec::Vec};
|
||||||
use frame::{
|
use frame::{
|
||||||
deps::frame_support::{
|
deps::frame_support::{
|
||||||
genesis_builder_helper::{build_state, get_preset},
|
genesis_builder_helper::{build_state, get_preset},
|
||||||
|
|||||||
Reference in New Issue
Block a user