4 Commits

Author SHA1 Message Date
pezkuwichain 2ebd8bda97 chore: migrate git dependencies to Gitea mirror (git.pezkuwichain.io) 2026-04-21 18:52:58 +03:00
pezkuwichain 2094b221cc sync: pezkuwi-sdk templates/minimal ile senkronize edildi
- node/src/* guncelendi
- runtime/src/lib.rs guncelendi (pezsp_keyring import fix)
- pezpallets/template/src/* guncelendi
2025-12-25 11:24:40 +03:00
pezkuwichain 57c7bf64e5 Merge master into development: Pezkuwi SDK rebrand 2025-12-25 10:14:34 +03:00
pezkuwichain 01258776ab Refactor project structure: replace template pallet with pezpallets
- Remove template pallet (pallets/template/)
- Add new pezpallets module
- Update Cargo.toml and Cargo.lock with new dependencies
- Update node and runtime configurations
- Update README documentation
2025-12-25 05:33:37 +03:00
12 changed files with 203 additions and 172 deletions
+32 -32
View File
@@ -1,8 +1,8 @@
[workspace.package] [workspace.package]
license = "MIT-0" license = "MIT-0"
authors = ["Pezkuwi <admin@pezkuwichain.io>"] authors = ["Pezkuwi <admin@pezkuwichain.io>"]
homepage = "https://github.com/pezkuwichain/" homepage = "https://git.pezkuwichain.io/pezkuwichain/"
repository = "https://github.com/pezkuwichain/pezkuwi-sdk-minimal-template.git" repository = "https://git.pezkuwichain.io/pezkuwichain/pezkuwi-sdk-minimal-template.git"
edition = "2021" edition = "2021"
[workspace] [workspace]
@@ -22,7 +22,7 @@ docify = { version = "0.2.9" }
futures = { version = "0.3.31" } futures = { version = "0.3.31" }
futures-timer = { version = "3.0.2" } futures-timer = { version = "3.0.2" }
jsonrpsee = { version = "0.24.3" } jsonrpsee = { version = "0.24.3" }
pezkuwi-sdk = { git = "https://github.com/pezkuwichain/pezkuwi-sdk.git", branch = "main", default-features = false } pezkuwi-sdk = { git = "https://git.pezkuwichain.io/pezkuwichain/pezkuwi-sdk.git", branch = "main", default-features = false }
codec = { version = "3.7.5", default-features = false, package = "parity-scale-codec" } codec = { version = "3.7.5", default-features = false, package = "parity-scale-codec" }
scale-info = { version = "2.11.6", default-features = false } scale-info = { version = "2.11.6", default-features = false }
serde_json = { version = "1.0.132", default-features = false } serde_json = { version = "1.0.132", default-features = false }
@@ -38,32 +38,32 @@ lto = true
[patch.crates-io] [patch.crates-io]
# Map rebranded Pezkuwi packages from the forked Pezkuwi SDK repository # Map rebranded Pezkuwi packages from the forked Pezkuwi SDK repository
pezkuwi-sdk = { git = "https://github.com/pezkuwichain/pezkuwi-sdk.git", branch = "main" } pezkuwi-sdk = { git = "https://git.pezkuwichain.io/pezkuwichain/pezkuwi-sdk.git", branch = "main" }
pezframe-support = { git = "https://github.com/pezkuwichain/pezkuwi-sdk.git", branch = "main" } pezframe-support = { git = "https://git.pezkuwichain.io/pezkuwichain/pezkuwi-sdk.git", branch = "main" }
pezframe-system = { git = "https://github.com/pezkuwichain/pezkuwi-sdk.git", branch = "main" } pezframe-system = { git = "https://git.pezkuwichain.io/pezkuwichain/pezkuwi-sdk.git", branch = "main" }
pezpallet-balances = { git = "https://github.com/pezkuwichain/pezkuwi-sdk.git", branch = "main" } pezpallet-balances = { git = "https://git.pezkuwichain.io/pezkuwichain/pezkuwi-sdk.git", branch = "main" }
pezpallet-sudo = { git = "https://github.com/pezkuwichain/pezkuwi-sdk.git", branch = "main" } pezpallet-sudo = { git = "https://git.pezkuwichain.io/pezkuwichain/pezkuwi-sdk.git", branch = "main" }
pezpallet-timestamp = { git = "https://github.com/pezkuwichain/pezkuwi-sdk.git", branch = "main" } pezpallet-timestamp = { git = "https://git.pezkuwichain.io/pezkuwichain/pezkuwi-sdk.git", branch = "main" }
pezpallet-transaction-payment = { git = "https://github.com/pezkuwichain/pezkuwi-sdk.git", branch = "main" } pezpallet-transaction-payment = { git = "https://git.pezkuwichain.io/pezkuwichain/pezkuwi-sdk.git", branch = "main" }
pezpallet-transaction-payment-rpc-runtime-api = { git = "https://github.com/pezkuwichain/pezkuwi-sdk.git", branch = "main" } pezpallet-transaction-payment-rpc-runtime-api = { git = "https://git.pezkuwichain.io/pezkuwichain/pezkuwi-sdk.git", branch = "main" }
pezsp-api = { git = "https://github.com/pezkuwichain/pezkuwi-sdk.git", branch = "main" } pezsp-api = { git = "https://git.pezkuwichain.io/pezkuwichain/pezkuwi-sdk.git", branch = "main" }
pezsp-keyring = { git = "https://github.com/pezkuwichain/pezkuwi-sdk.git", branch = "main" } pezsp-keyring = { git = "https://git.pezkuwichain.io/pezkuwichain/pezkuwi-sdk.git", branch = "main" }
pezsp-weights = { git = "https://github.com/pezkuwichain/pezkuwi-sdk.git", branch = "main" } pezsp-weights = { git = "https://git.pezkuwichain.io/pezkuwichain/pezkuwi-sdk.git", branch = "main" }
pezsp-io = { git = "https://github.com/pezkuwichain/pezkuwi-sdk.git", branch = "main" } pezsp-io = { git = "https://git.pezkuwichain.io/pezkuwichain/pezkuwi-sdk.git", branch = "main" }
pezsp-runtime = { git = "https://github.com/pezkuwichain/pezkuwi-sdk.git", branch = "main" } pezsp-runtime = { git = "https://git.pezkuwichain.io/pezkuwichain/pezkuwi-sdk.git", branch = "main" }
pezsp-genesis-builder = { git = "https://github.com/pezkuwichain/pezkuwi-sdk.git", branch = "main" } pezsp-genesis-builder = { git = "https://git.pezkuwichain.io/pezkuwichain/pezkuwi-sdk.git", branch = "main" }
pezsp-timestamp = { git = "https://github.com/pezkuwichain/pezkuwi-sdk.git", branch = "main" } pezsp-timestamp = { git = "https://git.pezkuwichain.io/pezkuwichain/pezkuwi-sdk.git", branch = "main" }
pezsp-block-builder = { git = "https://github.com/pezkuwichain/pezkuwi-sdk.git", branch = "main" } pezsp-block-builder = { git = "https://git.pezkuwichain.io/pezkuwichain/pezkuwi-sdk.git", branch = "main" }
pezsp-blockchain = { git = "https://github.com/pezkuwichain/pezkuwi-sdk.git", branch = "main" } pezsp-blockchain = { git = "https://git.pezkuwichain.io/pezkuwichain/pezkuwi-sdk.git", branch = "main" }
pezsc-cli = { git = "https://github.com/pezkuwichain/pezkuwi-sdk.git", branch = "main" } pezsc-cli = { git = "https://git.pezkuwichain.io/pezkuwichain/pezkuwi-sdk.git", branch = "main" }
pezsc-service = { git = "https://github.com/pezkuwichain/pezkuwi-sdk.git", branch = "main" } pezsc-service = { git = "https://git.pezkuwichain.io/pezkuwichain/pezkuwi-sdk.git", branch = "main" }
pezsc-client-api = { git = "https://github.com/pezkuwichain/pezkuwi-sdk.git", branch = "main" } pezsc-client-api = { git = "https://git.pezkuwichain.io/pezkuwichain/pezkuwi-sdk.git", branch = "main" }
pezsc-executor = { git = "https://github.com/pezkuwichain/pezkuwi-sdk.git", branch = "main" } pezsc-executor = { git = "https://git.pezkuwichain.io/pezkuwichain/pezkuwi-sdk.git", branch = "main" }
pezsc-telemetry = { git = "https://github.com/pezkuwichain/pezkuwi-sdk.git", branch = "main" } pezsc-telemetry = { git = "https://git.pezkuwichain.io/pezkuwichain/pezkuwi-sdk.git", branch = "main" }
pezsc-transaction-pool-api = { git = "https://github.com/pezkuwichain/pezkuwi-sdk.git", branch = "main" } pezsc-transaction-pool-api = { git = "https://git.pezkuwichain.io/pezkuwichain/pezkuwi-sdk.git", branch = "main" }
pezsc-transaction-pool = { git = "https://github.com/pezkuwichain/pezkuwi-sdk.git", branch = "main" } pezsc-transaction-pool = { git = "https://git.pezkuwichain.io/pezkuwichain/pezkuwi-sdk.git", branch = "main" }
pezsc-consensus = { git = "https://github.com/pezkuwichain/pezkuwi-sdk.git", branch = "main" } pezsc-consensus = { git = "https://git.pezkuwichain.io/pezkuwichain/pezkuwi-sdk.git", branch = "main" }
pezsc-consensus-manual-seal = { git = "https://github.com/pezkuwichain/pezkuwi-sdk.git", branch = "main" } pezsc-consensus-manual-seal = { git = "https://git.pezkuwichain.io/pezkuwichain/pezkuwi-sdk.git", branch = "main" }
pezsc-network = { git = "https://github.com/pezkuwichain/pezkuwi-sdk.git", branch = "main" } pezsc-network = { git = "https://git.pezkuwichain.io/pezkuwichain/pezkuwi-sdk.git", branch = "main" }
pezsc-offchain = { git = "https://github.com/pezkuwichain/pezkuwi-sdk.git", branch = "main" } pezsc-offchain = { git = "https://git.pezkuwichain.io/pezkuwichain/pezkuwi-sdk.git", branch = "main" }
pezsc-basic-authorship = { git = "https://github.com/pezkuwichain/pezkuwi-sdk.git", branch = "main" } pezsc-basic-authorship = { git = "https://git.pezkuwichain.io/pezkuwichain/pezkuwi-sdk.git", branch = "main" }
+48 -48
View File
@@ -1,13 +1,13 @@
<div align="center"> <div align="center">
# Polkadot SDK's Minimal Template # Pezkuwi SDK's Minimal Template
<img height="70px" alt="Polkadot SDK Logo" src="https://github.com/paritytech/polkadot-sdk/raw/master/docs/images/Polkadot_Logo_Horizontal_Pink_White.png#gh-dark-mode-only"/> <img height="70px" alt="Pezkuwi SDK Logo" src="https://github.com/pezkuwichain/pezkuwi-sdk/blob/main/docs/images/Pezkuwi_Logo_Horizontal_Pink_Black.png"/>
<img height="70px" alt="Polkadot SDK Logo" src="https://github.com/paritytech/polkadot-sdk/raw/master/docs/images/Polkadot_Logo_Horizontal_Pink_Black.png#gh-light-mode-only"/> <img height="70px" alt="Pezkuwi SDK Logo" src="https://github.com/pezkuwichain/pezkuwi-sdk/blob/main/docs/images/Pezkuwi_Logo_Horizontal_Pink_Black.png"/>
> This is a minimal template for creating a blockchain based on Polkadot SDK. > This is a minimal template for creating a blockchain based on Pezkuwi SDK.
> >
> This template is automatically updated after releases in the main [Polkadot SDK monorepo](https://github.com/paritytech/polkadot-sdk). > This template is automatically updated after releases in the main [Pezkuwi SDK monorepo](https://github.com/pezkuwichain/pezkuwi-sdk).
</div> </div>
@@ -23,9 +23,9 @@
- [Omni Node](#omni-node) - [Omni Node](#omni-node)
- [Minimal Template Node](#minimal-template-node) - [Minimal Template Node](#minimal-template-node)
- [Zombienet with Omni Node](#zombienet-with-omni-node) - [Zombienet with Omni Node](#pezkuwi-zombienet-with-omni-node)
- [Zombienet with Minimal Template Node](#zombienet-with-minimal-template-node) - [Zombienet with Minimal Template Node](#pezkuwi-zombienet-with-minimal-template-node)
- [Connect with the Polkadot-JS Apps Front-End](#connect-with-the-polkadot-js-apps-front-end) - [Connect with the Pezkuwi-JS Apps Front-End](#connect-with-the-pezkuwi-js-apps-front-end)
- [Takeaways](#takeaways) - [Takeaways](#takeaways)
- [Contributing](#contributing) - [Contributing](#contributing)
@@ -37,18 +37,18 @@
- 🤏 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 with a single custom pallet as a starting point, and a handful of ready-made pallets - 🔧 Its runtime is configured with a single custom pezpallet as a starting point, and a handful of ready-made pezpallets
such as a [Balances pallet](https://paritytech.github.io/polkadot-sdk/master/pallet_balances/index.html). such as a [Balances pezpallet](https://pezkuwichain.github.io/pezkuwi-sdk/master/pezpallet_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.
## Template Structure ## Template Structure
A Polkadot SDK based project such as this one consists of: A Pezkuwi SDK based project such as this one consists of:
- 🧮 the [Runtime](./runtime/README.md) - the core logic of the blockchain. - 🧮 the [Runtime](./runtime/README.md) - the core logic of the blockchain.
- 🎨 the [Pallets](./pallets/README.md) - from which the runtime is constructed. - 🎨 the [Pezpallets](./pezpallets/README.md) - from which the runtime is constructed.
- 💿 a [Node](./node/README.md) - the binary application (which is not part of the cargo default-members list and is not - 💿 a [Node](./node/README.md) - the binary application (which is not part of the cargo default-members list and is not
compiled unless building the entire workspace). compiled unless building the entire workspace).
@@ -65,7 +65,7 @@ packages required to compile this template - please take note of the Rust compil
Fetch minimal template code. Fetch minimal template code.
```sh ```sh
git clone https://github.com/paritytech/polkadot-sdk-minimal-template.git minimal-template git clone https://github.com/pezkuwichain/pezkuwi-sdk-minimal-template.git minimal-template
cd minimal-template cd minimal-template
``` ```
@@ -74,13 +74,13 @@ cd minimal-template
### Omni Node ### Omni Node
[Omni Node](https://paritytech.github.io/polkadot-sdk/master/polkadot_sdk_docs/reference_docs/omni_node/index.html) can [Omni Node](https://pezkuwichain.github.io/pezkuwi-sdk/master/pezkuwi_sdk_docs/reference_docs/omni_node/index.html) can
be used to run the minimal template's runtime. `polkadot-omni-node` binary crate usage is described at a high-level be used to run the minimal template's runtime. `pezkuwi-omni-node` binary crate usage is described at a high-level
[on crates.io](https://crates.io/crates/polkadot-omni-node). [on crates.io](https://crates.io/crates/pezkuwi-omni-node).
#### Install `polkadot-omni-node` #### Install `pezkuwi-omni-node`
Please see installation section on [crates.io/omni-node](https://crates.io/crates/polkadot-omni-node). Please see installation section on [crates.io/omni-node](https://crates.io/crates/pezkuwi-omni-node).
#### Build `minimal-template-runtime` #### Build `minimal-template-runtime`
@@ -88,9 +88,9 @@ Please see installation section on [crates.io/omni-node](https://crates.io/crate
cargo build -p minimal-template-runtime --release cargo build -p minimal-template-runtime --release
``` ```
#### Install `staging-chain-spec-builder` #### Install `pezstaging-chain-spec-builder`
Please see the installation section at [`crates.io/staging-chain-spec-builder`](https://crates.io/crates/staging-chain-spec-builder). Please see the installation section at [`crates.io/pezstaging-chain-spec-builder`](https://crates.io/crates/pezstaging-chain-spec-builder).
#### Use chain-spec-builder to generate the chain_spec.json file #### Use chain-spec-builder to generate the chain_spec.json file
@@ -110,7 +110,7 @@ Start Omni Node in development mode (sets up block production and finalization b
sealing a new block every 3 seconds), with a minimal template runtime chain spec. sealing a new block every 3 seconds), with a minimal template runtime chain spec.
```sh ```sh
polkadot-omni-node --chain <path/to/chain_spec.json> --dev pezkuwi-omni-node --chain <path/to/chain_spec.json> --dev
``` ```
### Minimal Template Node ### Minimal Template Node
@@ -125,7 +125,7 @@ cargo build --workspace --release
and has as entry point the node binary: and has as entry point the node binary:
```sh ```sh
docker build . -t polkadot-sdk-minimal-template docker build . -t pezkuwi-sdk-minimal-template
``` ```
#### Start the `minimal-template-node` #### Start the `minimal-template-node`
@@ -138,23 +138,23 @@ depend on a specific runtime, but asks for the chain spec at startup.
```sh ```sh
<target/release/path/to/minimal-template-node> --tmp --consensus manual-seal-3000 <target/release/path/to/minimal-template-node> --tmp --consensus manual-seal-3000
# or via docker # or via docker
docker run --rm polkadot-sdk-minimal-template docker run --rm pezkuwi-sdk-minimal-template
``` ```
### Zombienet with Omni Node ### Zombienet with Omni Node
#### Install `zombienet` #### Install `pezkuwi-zombienet`
We can install `zombienet` as described [here](https://paritytech.github.io/zombienet/install.html#installation), We can install `pezkuwi-zombienet` as described [here](https://github.com/pezkuwichain/pezkuwi-zombienet-sdk/install.html#installation),
and `zombienet-omni-node.toml` contains the network specification we want to start. and `pezkuwi-zombienet-omni-node.toml` contains the network specification we want to start.
#### Update `zombienet-omni-node.toml` with a valid chain spec path #### Update `pezkuwi-zombienet-omni-node.toml` with a valid chain spec path
To simplify the process of starting the minimal template with ZombieNet and Omni Node, we've included a To simplify the process of starting the minimal template with ZombieNet and Omni Node, we've included a
pre-configured development chain spec (dev_chain_spec.json) in the minimal template. The zombienet-omni-node.toml pre-configured development chain spec (dev_chain_spec.json) in the minimal template. The pezkuwi-zombienet-omni-node.toml
file in this template points to it, but you can update it to a new path for the chain spec generated on your machine. file in this template points to it, but you can update it to a new path for the chain spec generated on your machine.
To generate a chain spec refer to [staging-chain-spec-builder](https://crates.io/crates/staging-chain-spec-builder) To generate a chain spec refer to [pezstaging-chain-spec-builder](https://crates.io/crates/pezstaging-chain-spec-builder)
Then make the changes in the network specification like so: Then make the changes in the network specification like so:
@@ -169,28 +169,28 @@ default_args = ["--dev"]
#### Start the network #### Start the network
```sh ```sh
zombienet --provider native spawn zombienet-omni-node.toml pezkuwi-zombienet --provider native spawn pezkuwi-zombienet-omni-node.toml
``` ```
### Zombienet with `minimal-template-node` ### Zombienet with `minimal-template-node`
For this one we just need to have `zombienet` installed and run: For this one we just need to have `pezkuwi-zombienet` installed and run:
```sh ```sh
zombienet --provider native spawn zombienet-multi-node.toml pezkuwi-zombienet --provider native spawn pezkuwi-zombienet-multi-node.toml
``` ```
### Connect with the Polkadot-JS Apps Front-End ### Connect with the Pezkuwi-JS Apps Front-End
- 🌐 You can interact with your local node using the - 🌐 You can interact with your local node using the
hosted version of the [Polkadot/Substrate hosted version of the [Pezkuwi/Bizinikiwi
Portal](https://polkadot.js.org/apps/#/explorer?rpc=ws://localhost:9944). Portal](https://pezkuwi.js.org/apps/#/explorer?rpc=ws://localhost:9944).
- 🪐 A hosted version is also - 🪐 A hosted version is also
available on [IPFS](https://dotapps.io/). available on [IPFS](https://hezapps.io/).
- 🧑‍🔧 You can also find the source code and instructions for hosting your own instance in the - 🧑‍🔧 You can also find the source code and instructions for hosting your own instance in the
[`polkadot-js/apps`](https://github.com/polkadot-js/apps) repository. [`pezkuwi-js/apps`](https://github.com/pezkuwi-js/apps) repository.
### Takeaways ### Takeaways
@@ -203,22 +203,22 @@ Previously minimal template's development chains:
## Contributing ## Contributing
- 🔄 This template is automatically updated after releases in the main [Polkadot SDK monorepo](https://github.com/paritytech/polkadot-sdk). - 🔄 This template is automatically updated after releases in the main [Pezkuwi SDK monorepo](https://github.com/pezkuwichain/pezkuwi-sdk).
- ➡️ Any pull requests should be directed to this [source](https://github.com/paritytech/polkadot-sdk/tree/master/templates/minimal). - ➡️ Any pull requests should be directed to this [source](https://github.com/pezkuwichain/pezkuwi-sdk/tree/master/templates/minimal).
- 😇 Please refer to the monorepo's - 😇 Please refer to the monorepo's
[contribution guidelines](https://github.com/paritytech/polkadot-sdk/blob/master/docs/contributor/CONTRIBUTING.md) and [contribution guidelines](https://github.com/pezkuwichain/pezkuwi-sdk/blob/master/docs/contributor/CONTRIBUTING.md) and
[Code of Conduct](https://github.com/paritytech/polkadot-sdk/blob/master/docs/contributor/CODE_OF_CONDUCT.md). [Code of Conduct](https://github.com/pezkuwichain/pezkuwi-sdk/blob/master/docs/contributor/CODE_OF_CONDUCT.md).
## Getting Help ## Getting Help
- 🧑‍🏫 To learn about Polkadot in general, [docs.Polkadot.com](https://docs.polkadot.com/) website is a good starting point. - 🧑‍🏫 To learn about Pezkuwi in general, [docs.Pezkuwi.com](https://docs.pezkuwichain.io/) website is a good starting point.
- 🧑‍🔧 For technical introduction, [here](https://github.com/paritytech/polkadot-sdk#-documentation) are - 🧑‍🔧 For technical introduction, [here](https://github.com/pezkuwichain/pezkuwi-sdk#-documentation) are
the Polkadot SDK documentation resources. the Pezkuwi SDK documentation resources.
- 👥 Additionally, there are [GitHub issues](https://github.com/paritytech/polkadot-sdk/issues) and - 👥 Additionally, there are [GitHub issues](https://github.com/pezkuwichain/pezkuwi-sdk/issues) and
[Substrate StackExchange](https://substrate.stackexchange.com/). [Bizinikiwi StackExchange](https://bizinikiwi.stackexchange.com/).
- 👥You can also reach out on the [Official Polkdot discord server](https://polkadot-discord.w3f.tools/) - 👥You can also reach out on the [Official Pezkuwichain discord server](https://pezkuwi-discord.w3f.tools/)
- 🧑Reach out on [Telegram](https://t.me/substratedevs) for more questions and discussions - 🧑Reach out on [Telegram](https://t.me/bizinikiwidevs) for more questions and discussions
+5 -5
View File
@@ -1,6 +1,6 @@
// This file is part of pezkuwi-sdk. // This file is part of Bizinikiwi.
// Copyright (C) Pezkuwi Foundation. and Kurdistan Blockchain Technologies Institute (KBTI) 2024. // Copyright (C) Parity Technologies (UK) Ltd.
// SPDX-License-Identifier: Apache-2.0 // SPDX-License-Identifier: Apache-2.0
// Licensed under the Apache License, Version 2.0 (the "License"); // Licensed under the Apache License, Version 2.0 (the "License");
@@ -21,13 +21,13 @@ use pezkuwi_sdk::{
*, *,
}; };
/// This is a specialization of the general bizinikiwi ChainSpec type. /// This is a specialization of the general Bizinikiwi ChainSpec type.
pub type ChainSpec = pezsc_service::GenericChainSpec; pub type ChainSpec = pezsc_service::GenericChainSpec;
fn props() -> Properties { fn props() -> Properties {
let mut properties = Properties::new(); let mut properties = Properties::new();
properties.insert("tokenDecimals".to_string(), 0.into()); properties.insert("tokenDecimals".to_string(), 0.into());
properties.insert("tokenSymbol".to_string(), "PEZ".into()); properties.insert("tokenSymbol".to_string(), "MINI".into());
properties properties
} }
@@ -36,7 +36,7 @@ pub fn development_chain_spec() -> Result<ChainSpec, String> {
.with_name("Development") .with_name("Development")
.with_id("dev") .with_id("dev")
.with_chain_type(ChainType::Development) .with_chain_type(ChainType::Development)
.with_genesis_config_preset_name(pezsp_genesis_builder::DEV_RUNTIME_PRESET) .with_genesis_config_preset_name(pezkuwi_sdk::pezsp_genesis_builder::DEV_RUNTIME_PRESET)
.with_properties(props()) .with_properties(props())
.build()) .build())
} }
+13 -4
View File
@@ -1,7 +1,8 @@
// This file is part of pezkuwi-sdk. // This file is part of Bizinikiwi.
// Copyright (C) Pezkuwi Foundation. and Kurdistan Blockchain Technologies Institute (KBTI) 2024. // Copyright (C) Parity Technologies (UK) Ltd.
// SPDX-License-Identifier: Apache-2.0 // SPDX-License-Identifier: Apache-2.0
// Licensed under the Apache License, Version 2.0 (the "License"); // Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License. // you may not use this file except in compliance with the License.
// You may obtain a copy of the License at // You may obtain a copy of the License at
@@ -14,7 +15,7 @@
// See the License for the specific language governing permissions and // See the License for the specific language governing permissions and
// limitations under the License. // limitations under the License.
use pezkuwi_sdk::{pezsc_cli::RunCmd, *}; use pezkuwi_sdk::*;
#[derive(Debug, Clone)] #[derive(Debug, Clone)]
pub enum Consensus { pub enum Consensus {
@@ -48,7 +49,7 @@ pub struct Cli {
pub consensus: Consensus, pub consensus: Consensus,
#[clap(flatten)] #[clap(flatten)]
pub run: RunCmd, pub run: pezsc_cli::RunCmd,
} }
#[derive(Debug, clap::Subcommand)] #[derive(Debug, clap::Subcommand)]
@@ -58,8 +59,16 @@ pub enum Subcommand {
Key(pezsc_cli::KeySubcommand), Key(pezsc_cli::KeySubcommand),
/// Build a chain specification. /// Build a chain specification.
/// DEPRECATED: `build-spec` command will be removed after 1/04/2026. Use `export-chain-spec`
/// command instead.
#[deprecated(
note = "build-spec command will be removed after 1/04/2026. Use export-chain-spec command instead"
)]
BuildSpec(pezsc_cli::BuildSpecCmd), BuildSpec(pezsc_cli::BuildSpecCmd),
/// Export the chain specification.
ExportChainSpec(pezsc_cli::ExportChainSpecCmd),
/// Validate blocks. /// Validate blocks.
CheckBlock(pezsc_cli::CheckBlockCmd), CheckBlock(pezsc_cli::CheckBlockCmd),
+20 -9
View File
@@ -1,6 +1,6 @@
// This file is part of pezkuwi-sdk. // This file is part of Bizinikiwi.
// Copyright (C) Pezkuwi Foundation. and Kurdistan Blockchain Technologies Institute (KBTI) 2024. // Copyright (C) Parity Technologies (UK) Ltd.
// SPDX-License-Identifier: Apache-2.0 // SPDX-License-Identifier: Apache-2.0
// Licensed under the Apache License, Version 2.0 (the "License"); // Licensed under the Apache License, Version 2.0 (the "License");
@@ -50,8 +50,9 @@ impl BizinikiwiCli for Cli {
fn load_spec(&self, id: &str) -> Result<Box<dyn pezsc_service::ChainSpec>, String> { fn load_spec(&self, id: &str) -> Result<Box<dyn pezsc_service::ChainSpec>, String> {
Ok(match id { Ok(match id {
"dev" => Box::new(chain_spec::development_chain_spec()?), "dev" => Box::new(chain_spec::development_chain_spec()?),
path => path => {
Box::new(chain_spec::ChainSpec::from_json_file(std::path::PathBuf::from(path))?), Box::new(chain_spec::ChainSpec::from_json_file(std::path::PathBuf::from(path))?)
},
}) })
} }
} }
@@ -62,6 +63,7 @@ pub fn run() -> pezsc_cli::Result<()> {
match &cli.subcommand { match &cli.subcommand {
Some(Subcommand::Key(cmd)) => cmd.run(&cli), Some(Subcommand::Key(cmd)) => cmd.run(&cli),
#[allow(deprecated)]
Some(Subcommand::BuildSpec(cmd)) => { Some(Subcommand::BuildSpec(cmd)) => {
let runner = cli.create_runner(cmd)?; let runner = cli.create_runner(cmd)?;
runner.sync_run(|config| cmd.run(config.chain_spec, config.network)) runner.sync_run(|config| cmd.run(config.chain_spec, config.network))
@@ -74,6 +76,10 @@ pub fn run() -> pezsc_cli::Result<()> {
Ok((cmd.run(client, import_queue), task_manager)) Ok((cmd.run(client, import_queue), task_manager))
}) })
}, },
Some(Subcommand::ExportChainSpec(cmd)) => {
let chain_spec = cli.load_spec(&cmd.chain)?;
cmd.run(chain_spec)
},
Some(Subcommand::ExportBlocks(cmd)) => { Some(Subcommand::ExportBlocks(cmd)) => {
let runner = cli.create_runner(cmd)?; let runner = cli.create_runner(cmd)?;
runner.async_run(|config| { runner.async_run(|config| {
@@ -117,13 +123,18 @@ pub fn run() -> pezsc_cli::Result<()> {
None => { None => {
let runner = cli.create_runner(&cli.run)?; let runner = cli.create_runner(&cli.run)?;
runner.run_node_until_exit(|config| async move { runner.run_node_until_exit(|config| async move {
match config.network.network_backend.unwrap_or_default() { match config.network.network_backend {
pezsc_network::config::NetworkBackendType::Libp2p => pezsc_network::config::NetworkBackendType::Libp2p => service::new_full::<
service::new_full::<pezsc_network::NetworkWorker<_, _>>(config, cli.consensus) pezsc_network::NetworkWorker<_, _>,
.map_err(pezsc_cli::Error::Service), >(
config, cli.consensus
)
.map_err(pezsc_cli::Error::Service),
pezsc_network::config::NetworkBackendType::Litep2p => service::new_full::< pezsc_network::config::NetworkBackendType::Litep2p => service::new_full::<
pezsc_network::Litep2pNetworkBackend, pezsc_network::Litep2pNetworkBackend,
>(config, cli.consensus) >(
config, cli.consensus
)
.map_err(pezsc_cli::Error::Service), .map_err(pezsc_cli::Error::Service),
} }
}) })
+1 -1
View File
@@ -1,6 +1,6 @@
// This file is part of Pezkuwi Sdk. // This file is part of Pezkuwi Sdk.
// Copyright (C) Pezkuwi Foundation. and Kurdistan Blockchain Technologies Institute (KBTI) 2024. // Copyright (C) Parity Technologies (UK) Ltd.
// SPDX-License-Identifier: Apache-2.0 // SPDX-License-Identifier: Apache-2.0
// Licensed under the Apache License, Version 2.0 (the "License"); // Licensed under the Apache License, Version 2.0 (the "License");
+2 -2
View File
@@ -1,6 +1,6 @@
// This file is part of pezkuwi-sdk. // This file is part of Bizinikiwi.
// Copyright (C) Pezkuwi Foundation. and Kurdistan Blockchain Technologies Institute (KBTI) 2024. // Copyright (C) Parity Technologies (UK) Ltd.
// SPDX-License-Identifier: Apache-2.0 // SPDX-License-Identifier: Apache-2.0
// Licensed under the Apache License, Version 2.0 (the "License"); // Licensed under the Apache License, Version 2.0 (the "License");
+8 -8
View File
@@ -1,6 +1,6 @@
// This file is part of pezkuwi-sdk. // This file is part of Bizinikiwi.
// Copyright (C) Pezkuwi Foundation. and Kurdistan Blockchain Technologies Institute (KBTI) 2024. // Copyright (C) Parity Technologies (UK) Ltd.
// SPDX-License-Identifier: Apache-2.0 // SPDX-License-Identifier: Apache-2.0
// Licensed under the Apache License, Version 2.0 (the "License"); // Licensed under the Apache License, Version 2.0 (the "License");
@@ -16,8 +16,8 @@
// limitations under the License. // limitations under the License.
//! A collection of node-specific RPC methods. //! A collection of node-specific RPC methods.
//! bizinikiwi provides the `pezsc-rpc` crate, which defines the core RPC layer //! Bizinikiwi provides the `sc-rpc` crate, which defines the core RPC layer
//! used by bizinikiwi nodes. This file extends those RPC definitions with //! used by Bizinikiwi nodes. This file extends those RPC definitions with
//! capabilities that are specific to this project's runtime configuration. //! capabilities that are specific to this project's runtime configuration.
#![warn(missing_docs)] #![warn(missing_docs)]
@@ -48,15 +48,15 @@ where
C: Send C: Send
+ Sync + Sync
+ 'static + 'static
+ pezsp_api::ProvideRuntimeApi<OpaqueBlock> + pezkuwi_sdk::pezsp_api::ProvideRuntimeApi<OpaqueBlock>
+ HeaderBackend<OpaqueBlock> + HeaderBackend<OpaqueBlock>
+ HeaderMetadata<OpaqueBlock, Error = BlockChainError> + HeaderMetadata<OpaqueBlock, Error = BlockChainError>
+ 'static, + 'static,
C::Api: pezsp_block_builder::BlockBuilder<OpaqueBlock>, C::Api: pezkuwi_sdk::pezsp_block_builder::BlockBuilder<OpaqueBlock>,
C::Api: pezframe_rpc_system::AccountNonceApi<OpaqueBlock, AccountId, Nonce>, C::Api: bizinikiwi_frame_rpc_system::AccountNonceApi<OpaqueBlock, AccountId, Nonce>,
P: TransactionPool + 'static, P: TransactionPool + 'static,
{ {
use pezkuwi_sdk::pezframe_rpc_system::{System, SystemApiServer}; use pezkuwi_sdk::bizinikiwi_frame_rpc_system::{System, SystemApiServer};
let mut module = RpcModule::new(()); let mut module = RpcModule::new(());
let FullDeps { client, pool } = deps; let FullDeps { client, pool } = deps;
+7 -6
View File
@@ -1,6 +1,6 @@
// This file is part of pezkuwi-sdk. // This file is part of Bizinikiwi.
// Copyright (C) Pezkuwi Foundation. and Kurdistan Blockchain Technologies Institute (KBTI) 2024. // Copyright (C) Parity Technologies (UK) Ltd.
// SPDX-License-Identifier: Apache-2.0 // SPDX-License-Identifier: Apache-2.0
// Licensed under the Apache License, Version 2.0 (the "License"); // Licensed under the Apache License, Version 2.0 (the "License");
@@ -24,12 +24,12 @@ use pezkuwi_sdk::{
pezsc_service::{error::Error as ServiceError, Configuration, TaskManager}, pezsc_service::{error::Error as ServiceError, Configuration, TaskManager},
pezsc_telemetry::{Telemetry, TelemetryWorker}, pezsc_telemetry::{Telemetry, TelemetryWorker},
pezsc_transaction_pool_api::OffchainTransactionPoolFactory, pezsc_transaction_pool_api::OffchainTransactionPoolFactory,
pezsp_runtime::traits::Block as BlockT,
*, *,
}; };
use pezsp_runtime::traits::Block as BlockT;
use std::sync::Arc; use std::sync::Arc;
type HostFunctions = pezsp_io::BizinikiwiHostFunctions; type HostFunctions = pezkuwi_sdk::pezsp_io::BizinikiwiHostFunctions;
#[docify::export] #[docify::export]
pub(crate) type FullClient = pub(crate) type FullClient =
@@ -194,6 +194,7 @@ pub fn new_full<Network: pezsc_network::NetworkBackend<Block, <Block as BlockT>:
sync_service, sync_service,
config, config,
telemetry: telemetry.as_mut(), telemetry: telemetry.as_mut(),
tracing_execute_block: None,
})?; })?;
let proposer = pezsc_basic_authorship::ProposerFactory::new( let proposer = pezsc_basic_authorship::ProposerFactory::new(
@@ -214,7 +215,7 @@ pub fn new_full<Network: pezsc_network::NetworkBackend<Block, <Block as BlockT>:
select_chain, select_chain,
consensus_data_provider: None, consensus_data_provider: None,
create_inherent_data_providers: move |_, ()| async move { create_inherent_data_providers: move |_, ()| async move {
Ok(pezsp_timestamp::InherentDataProvider::from_system_time()) Ok(pezkuwi_sdk::pezsp_timestamp::InherentDataProvider::from_system_time())
}, },
}; };
@@ -250,7 +251,7 @@ pub fn new_full<Network: pezsc_network::NetworkBackend<Block, <Block as BlockT>:
commands_stream: Box::pin(commands_stream), commands_stream: Box::pin(commands_stream),
consensus_data_provider: None, consensus_data_provider: None,
create_inherent_data_providers: move |_, ()| async move { create_inherent_data_providers: move |_, ()| async move {
Ok(pezsp_timestamp::InherentDataProvider::from_system_time()) Ok(pezkuwi_sdk::pezsp_timestamp::InherentDataProvider::from_system_time())
}, },
}; };
let authorship_future = pezsc_consensus_manual_seal::run_manual_seal(params); let authorship_future = pezsc_consensus_manual_seal::run_manual_seal(params);
+7 -6
View File
@@ -1,17 +1,18 @@
//! A shell pezpallet built with [`pezframe`]. //! A shell pezpallet built with [`frame`].
//! //!
//! To get started with this pezpallet, try implementing the guide in //! To get started with this pezpallet, try implementing the guide in
//! <https://github.com/pezkuwichain/pezkuwi-sdk> //! <https://docs.pezkuwichain.io/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)]
use pezkuwi_sdk::pezkuwi_sdk_frame::deps::pezframe_support::pezpallet_prelude::*; use frame::prelude::*;
use pezkuwi_sdk::pezkuwi_sdk_frame as frame;
// Re-export all pezpallet parts, this is needed to properly import the pezpallet into the runtime. // Re-export all pezpallet parts, this is needed to properly import the pezpallet into the runtime.
pub use pallet::*; pub use pezpallet::*;
#[pezkuwi_sdk::pezframe_support::pezpallet] #[frame::pezpallet]
pub mod pallet { pub mod pezpallet {
use super::*; use super::*;
#[pezpallet::config] #[pezpallet::config]
+3 -3
View File
@@ -4,7 +4,7 @@
responsible for validating blocks and executing the state changes they define. responsible for validating blocks and executing the state changes they define.
💁 The runtime in this template is constructed using ready-made FRAME pallets that ship with 💁 The runtime in this template is constructed using ready-made FRAME pallets that ship with
[Polkadot SDK](https://github.com/paritytech/polkadot-sdk), and a [template for a custom pallet](../pallets/README.md). [Pezkuwi SDK](https://github.com/pezkuwichain/pezkuwi-sdk), and a [template for a custom pallet](../pezpallets/README.md).
👉 Learn more about FRAME 👉 Learn more about PEZFRAME
[here](https://paritytech.github.io/polkadot-sdk/master/polkadot_sdk_docs/polkadot_sdk/frame_runtime/index.html). [here](https://docs.pezkuwichain.io/pezkuwi-sdk/master/pezkuwi_sdk_docs/pezkuwi_sdk/pezframe_runtime/index.html).
+57 -48
View File
@@ -1,3 +1,20 @@
// This file is part of Bizinikiwi.
// Copyright (C) Parity Technologies (UK) Ltd.
// SPDX-License-Identifier: Apache-2.0
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//! A minimal runtime that includes the template [`pezpallet`](`pezpallet_minimal_template`). //! A minimal runtime that includes the template [`pezpallet`](`pezpallet_minimal_template`).
#![cfg_attr(not(feature = "std"), no_std)] #![cfg_attr(not(feature = "std"), no_std)]
@@ -9,26 +26,24 @@ include!(concat!(env!("OUT_DIR"), "/wasm_binary.rs"));
extern crate alloc; extern crate alloc;
use alloc::vec::Vec; use alloc::vec::Vec;
use pezpallet_transaction_payment::{FeeDetails, RuntimeDispatchInfo};
use pezkuwi_sdk::{ use pezkuwi_sdk::{
pezkuwi_sdk_frame::{ pezkuwi_sdk_frame::{
self as frame, self as frame,
deps::pezsp_genesis_builder, deps::pezsp_genesis_builder,
runtime::{apis, prelude::*}, runtime::{apis, prelude::*},
}, },
pezframe_system as frame_system,
*, *,
}; };
use pezpallet_transaction_payment::{FeeDetails, RuntimeDispatchInfo};
/// Provides getters for genesis configuration presets. /// Provides getters for genesis configuration presets.
pub mod genesis_config_presets { pub mod genesis_config_presets {
use super::*; use super::*;
use crate::{ use crate::{
interface::{Balance, MinimumBalance}, interface::{Balance, MinimumBalance},
runtime::{BalancesConfig, RuntimeGenesisConfig, SudoConfig}, BalancesConfig, RuntimeGenesisConfig, SudoConfig,
}; };
#[cfg(feature = "std")] use frame::deps::pezsp_keyring::Sr25519Keyring;
use pezkuwi_sdk::pezsp_keyring::Sr25519Keyring;
use alloc::{vec, vec::Vec}; use alloc::{vec, vec::Vec};
use serde_json::Value; use serde_json::Value;
@@ -86,34 +101,34 @@ pub fn native_version() -> NativeVersion {
/// The transaction extensions that are added to the runtime. /// The transaction extensions that are added to the runtime.
type TxExtension = ( type TxExtension = (
// Authorize calls that validate themselves.
pezframe_system::AuthorizeCall<Runtime>,
// Checks that the sender is not the zero address. // Checks that the sender is not the zero address.
frame_system::CheckNonZeroSender<Runtime>, pezframe_system::CheckNonZeroSender<Runtime>,
// Checks that the runtime version is correct. // Checks that the runtime version is correct.
frame_system::CheckSpecVersion<Runtime>, pezframe_system::CheckSpecVersion<Runtime>,
// Checks that the transaction version is correct. // Checks that the transaction version is correct.
frame_system::CheckTxVersion<Runtime>, pezframe_system::CheckTxVersion<Runtime>,
// Checks that the genesis hash is correct. // Checks that the genesis hash is correct.
frame_system::CheckGenesis<Runtime>, pezframe_system::CheckGenesis<Runtime>,
// Checks that the era is valid. // Checks that the era is valid.
frame_system::CheckEra<Runtime>, pezframe_system::CheckEra<Runtime>,
// Checks that the nonce is valid. // Checks that the nonce is valid.
frame_system::CheckNonce<Runtime>, pezframe_system::CheckNonce<Runtime>,
// Checks that the weight is valid. // Checks that the weight is valid.
frame_system::CheckWeight<Runtime>, pezframe_system::CheckWeight<Runtime>,
// Ensures that the sender has enough funds to pay for the transaction // Ensures that the sender has enough funds to pay for the transaction
// and deducts the fee from the sender's account. // and deducts the fee from the sender's account.
pezpallet_transaction_payment::ChargeTransactionPayment<Runtime>, pezpallet_transaction_payment::ChargeTransactionPayment<Runtime>,
// Reclaim the unused weight from the block using post dispatch information. // Reclaim the unused weight from the block using post dispatch information.
// It must be last in the pipeline in order to catch the refund in previous transaction // It must be last in the pipeline in order to catch the refund in previous transaction
// extensions // extensions
frame_system::WeightReclaim<Runtime>, pezframe_system::WeightReclaim<Runtime>,
); );
// Composes the runtime by adding all the used pezpallets and deriving necessary types. // Composes the runtime by adding all the used pallets and deriving necessary types.
#[frame_construct_runtime] #[frame_construct_runtime]
pub mod runtime { mod runtime {
use super::*;
/// The main runtime type. /// The main runtime type.
#[runtime::runtime] #[runtime::runtime]
#[runtime::derive( #[runtime::derive(
@@ -128,7 +143,6 @@ pub mod runtime {
RuntimeTask, RuntimeTask,
RuntimeViewFunction RuntimeViewFunction
)] )]
#[derive(Clone, PartialEq, Eq)]
pub struct Runtime; pub struct Runtime;
/// Mandatory system pezpallet that should always be included in a FRAME runtime. /// Mandatory system pezpallet that should always be included in a FRAME runtime.
@@ -156,24 +170,18 @@ pub mod runtime {
pub type Template = pezpallet_minimal_template::Pezpallet<Runtime>; pub type Template = pezpallet_minimal_template::Pezpallet<Runtime>;
} }
pub use runtime::{
Runtime, System, Timestamp, Balances, Sudo, TransactionPayment, Template,
RuntimeCall, RuntimeEvent, RuntimeError, RuntimeOrigin, RuntimeFreezeReason,
RuntimeHoldReason, RuntimeSlashReason, RuntimeLockId, RuntimeTask, RuntimeViewFunction,
AllPalletsWithSystem, RuntimeGenesisConfig, BalancesConfig, SudoConfig,
};
parameter_types! { parameter_types! {
pub const Version: RuntimeVersion = VERSION; pub const Version: RuntimeVersion = VERSION;
} }
/// Implements the types required for the system pezpallet. /// Implements the types required for the system pezpallet.
#[derive_impl(frame_system::config_preludes::SolochainDefaultConfig)] #[derive_impl(pezframe_system::config_preludes::SolochainDefaultConfig)]
impl frame_system::Config for Runtime { impl pezframe_system::Config for Runtime {
type Block = Block; type Block = Block;
type Version = Version; type Version = Version;
// Use the account data from the balances pezpallet // Use the account data from the balances pezpallet
type AccountData = pezpallet_balances::AccountData<<Runtime as pezpallet_balances::Config>::Balance>; type AccountData =
pezpallet_balances::AccountData<<Runtime as pezpallet_balances::Config>::Balance>;
} }
// Implements the types required for the balances pezpallet. // Implements the types required for the balances pezpallet.
@@ -186,7 +194,7 @@ impl pezpallet_balances::Config for Runtime {
#[derive_impl(pezpallet_sudo::config_preludes::TestDefaultConfig)] #[derive_impl(pezpallet_sudo::config_preludes::TestDefaultConfig)]
impl pezpallet_sudo::Config for Runtime {} impl pezpallet_sudo::Config for Runtime {}
// Implements the types required for the timestamp pezpallet. // Implements the types required for the sudo pezpallet.
#[derive_impl(pezpallet_timestamp::config_preludes::TestDefaultConfig)] #[derive_impl(pezpallet_timestamp::config_preludes::TestDefaultConfig)]
impl pezpallet_timestamp::Config for Runtime {} impl pezpallet_timestamp::Config for Runtime {}
@@ -206,19 +214,22 @@ impl pezpallet_minimal_template::Config for Runtime {}
type Block = frame::runtime::types_common::BlockOf<Runtime, TxExtension>; type Block = frame::runtime::types_common::BlockOf<Runtime, TxExtension>;
type Header = HeaderFor<Runtime>; type Header = HeaderFor<Runtime>;
type RuntimeExecutive = type RuntimeExecutive = Executive<
Executive<Runtime, Block, frame_system::ChainContext<Runtime>, Runtime, AllPalletsWithSystem>; Runtime,
Block,
pezframe_system::ChainContext<Runtime>,
Runtime,
AllPalletsWithSystem,
>;
impl_runtime_apis! { impl_runtime_apis! {
use pezsp_runtime::traits::BlockT;
impl apis::Core<Block> for Runtime { impl apis::Core<Block> for Runtime {
fn version() -> RuntimeVersion { fn version() -> RuntimeVersion {
VERSION VERSION
} }
fn execute_block(block: <Block as BlockT>::LazyBlock) { fn execute_block(block: <Block as frame::traits::Block>::LazyBlock) {
RuntimeExecutive::execute_block(block.into()) RuntimeExecutive::execute_block(block)
} }
fn initialize_block(header: &Header) -> ExtrinsicInclusionMode { fn initialize_block(header: &Header) -> ExtrinsicInclusionMode {
@@ -227,7 +238,7 @@ impl_runtime_apis! {
} }
impl apis::Metadata<Block> for Runtime { impl apis::Metadata<Block> for Runtime {
fn metadata() -> OpaqueMetadata { fn metadata() -> OpaqueMetadata {
Runtime::metadata() OpaqueMetadata::new(Runtime::metadata().into())
} }
fn metadata_at_version(version: u32) -> Option<OpaqueMetadata> { fn metadata_at_version(version: u32) -> Option<OpaqueMetadata> {
@@ -249,16 +260,14 @@ impl_runtime_apis! {
} }
fn inherent_extrinsics(data: InherentData) -> Vec<ExtrinsicFor<Runtime>> { fn inherent_extrinsics(data: InherentData) -> Vec<ExtrinsicFor<Runtime>> {
// TODO: Implement proper inherent extrinsics creation data.create_extrinsics()
Vec::new()
} }
fn check_inherents( fn check_inherents(
block: <Block as BlockT>::LazyBlock, block: <Block as frame::traits::Block>::LazyBlock,
data: InherentData, data: InherentData,
) -> CheckInherentsResult { ) -> CheckInherentsResult {
// TODO: Implement proper inherents checking data.check_extrinsics(&block)
CheckInherentsResult::new()
} }
} }
@@ -266,7 +275,7 @@ impl_runtime_apis! {
fn validate_transaction( fn validate_transaction(
source: TransactionSource, source: TransactionSource,
tx: ExtrinsicFor<Runtime>, tx: ExtrinsicFor<Runtime>,
block_hash: <Runtime as frame_system::Config>::Hash, block_hash: <Runtime as pezframe_system::Config>::Hash,
) -> TransactionValidity { ) -> TransactionValidity {
RuntimeExecutive::validate_transaction(source, tx, block_hash) RuntimeExecutive::validate_transaction(source, tx, block_hash)
} }
@@ -333,16 +342,16 @@ impl_runtime_apis! {
/// ///
/// Other types should preferably be private. /// Other types should preferably be private.
// TODO: this should be standardized in some way, see: // TODO: this should be standardized in some way, see:
// https://github.com/paritytech/substrate/issues/10579#issuecomment-1600537558 // https://github.com/pezkuwichain/pezkuwi-sdk/issues/3
pub mod interface { pub mod interface {
use super::{Runtime, frame_system}; use super::Runtime;
use pezkuwi_sdk::{pezkuwi_sdk_frame as frame, *, pezpallet_balances}; use pezkuwi_sdk::{pezkuwi_sdk_frame as frame, *};
pub type Block = super::Block; pub type Block = super::Block;
pub use frame::runtime::types_common::OpaqueBlock; pub use frame::runtime::types_common::OpaqueBlock;
pub type AccountId = <Runtime as frame_system::Config>::AccountId; pub type AccountId = <Runtime as pezframe_system::Config>::AccountId;
pub type Nonce = <Runtime as frame_system::Config>::Nonce; pub type Nonce = <Runtime as pezframe_system::Config>::Nonce;
pub type Hash = <Runtime as frame_system::Config>::Hash; pub type Hash = <Runtime as pezframe_system::Config>::Hash;
pub type Balance = <Runtime as pezpallet_balances::Config>::Balance; pub type Balance = <Runtime as pezpallet_balances::Config>::Balance;
pub type MinimumBalance = <Runtime as pezpallet_balances::Config>::ExistentialDeposit; pub type MinimumBalance = <Runtime as pezpallet_balances::Config>::ExistentialDeposit;
} }