Complete rebrand: Polkadot→Pezkuwi, Substrate→Bizinikiwi

- Replace PolkadotConfig with PezkuwiConfig
- Replace SubstrateConfig with BizinikiwConfig
- Rename config module files (polkadot.rs→pezkuwi.rs, substrate.rs→bizinikiwi.rs)
- Update all documentation and examples
- All 165 files updated, cargo check passes
This commit is contained in:
2025-12-21 21:42:34 +03:00
parent 99e4ee3ab8
commit 7af0bcd262
166 changed files with 2395 additions and 2395 deletions
+4 -4
View File
@@ -1,6 +1,6 @@
# subxt-cli
Utilities for working with substrate metadata for `subxt`
Utilities for working with bizinikiwi metadata for `subxt`
```
USAGE:
@@ -17,7 +17,7 @@ Prints help information
SUBCOMMANDS:
codegen Generate runtime API client code from metadata
help Prints this message or the help of the given subcommand(s)
metadata Download metadata from a substrate node, for use with `subxt` codegen
metadata Download metadata from a bizinikiwi node, for use with `subxt` codegen
```
## Metadata
@@ -32,7 +32,7 @@ USAGE:
OPTIONS:
-f, --format <format> the format of the metadata to display: `json`, `hex` or `bytes` [default: json]
--url <url> the url of the substrate node to query for metadata [default: http://localhost:9933]
--url <url> the url of the bizinikiwi node to query for metadata [default: http://localhost:9933]
```
## Codegen
@@ -52,7 +52,7 @@ OPTIONS:
the path to the encoded metadata file
--url <url>
the url of the substrate node to query for metadata for codegen
the url of the bizinikiwi node to query for metadata for codegen
```
+2 -2
View File
@@ -10,10 +10,10 @@ use std::{io::Write, path::PathBuf};
mod fetch;
/// Download chainSpec from a substrate node.
/// Download chainSpec from a bizinikiwi node.
#[derive(Debug, ClapParser)]
pub struct Opts {
/// The url of the substrate node to query for metadata for codegen.
/// The url of the bizinikiwi node to query for metadata for codegen.
#[clap(long)]
url: Url,
/// Write the output of the command to the provided file path.
+2 -2
View File
@@ -301,7 +301,7 @@ fn codegen(
// Run this first to ensure type paths are unique (which may result in 1,2,3 suffixes being
// added to type paths), so that when we validate derives/substitutions below, they are
// allowed for such types. See <https://github.com/paritytech/subxt/issues/2011>.
// allowed for such types. See <https://github.com/pezkuwichain/subxt/issues/2011>.
scale_typegen::utils::ensure_unique_type_paths(metadata.types_mut())
.expect("ensure_unique_type_paths should not fail; please report an issue.");
@@ -418,7 +418,7 @@ mod tests {
}
async fn run(args_str: &str) -> color_eyre::Result<String> {
let mut args = vec!["codegen", "--file=../artifacts/polkadot_metadata_small.scale"];
let mut args = vec!["codegen", "--file=../artifacts/pezkuwi_metadata_small.scale"];
args.extend(args_str.split(' ').filter(|e| !e.is_empty()));
let opts: super::Opts = clap::Parser::try_parse_from(args)?;
let mut output: Vec<u8> = Vec::new();
+2 -2
View File
@@ -13,10 +13,10 @@ use std::collections::HashMap;
use crate::utils::validate_url_security;
/// Verify metadata compatibility between substrate nodes.
/// Verify metadata compatibility between bizinikiwi nodes.
#[derive(Debug, ClapParser)]
pub struct Opts {
/// Urls of the substrate nodes to verify for metadata compatibility.
/// Urls of the bizinikiwi nodes to verify for metadata compatibility.
#[clap(name = "nodes", long, use_value_delimiter = true, value_parser)]
nodes: Vec<Url>,
/// Check the compatibility of metadata for a particular pallet.
+2 -2
View File
@@ -17,8 +17,8 @@ use pezkuwi_subxt_metadata::{
///
/// # Example
/// ```text
/// subxt diff ./artifacts/polkadot_metadata_small.scale ./artifacts/polkadot_metadata_tiny.scale
/// subxt diff ./artifacts/polkadot_metadata_small.scale wss://rpc.polkadot.io:443
/// subxt diff ./artifacts/pezkuwi_metadata_small.scale ./artifacts/pezkuwi_metadata_tiny.scale
/// subxt diff ./artifacts/pezkuwi_metadata_small.scale wss://rpc.pezkuwi.io:443
/// ```
#[derive(Debug, Args)]
#[command(author, version, about, long_about = None)]
+4 -4
View File
@@ -20,7 +20,7 @@ mod runtime_apis;
/// Show the pallets and runtime apis that are available:
///
/// ```text
/// subxt explore --file=polkadot_metadata.scale
/// subxt explore --file=pezkuwi_metadata.scale
/// ```
///
/// ## Pallets
@@ -290,7 +290,7 @@ pub mod tests {
}
async fn run_against_file(cli_command: &str) -> color_eyre::Result<String> {
run(&format!("--file=../artifacts/polkadot_metadata_small.scale {cli_command}")).await
run(&format!("--file=../artifacts/pezkuwi_metadata_small.scale {cli_command}")).await
}
#[tokio::test]
@@ -422,11 +422,11 @@ pub mod tests {
#[tokio::test]
async fn insecure_urls_get_denied() {
// Connection should work fine:
run("--url wss://rpc.polkadot.io:443").await.unwrap();
run("--url wss://rpc.pezkuwi.io:443").await.unwrap();
// Errors, because the --allow-insecure is not set:
assert!(
run("--url ws://rpc.polkadot.io:443")
run("--url ws://rpc.pezkuwi.io:443")
.await
.unwrap_err()
.to_string()
+3 -3
View File
@@ -7,7 +7,7 @@ use std::str::FromStr;
use pezkuwi_subxt::{
OfflineClient,
config::SubstrateConfig,
config::BizinikiwConfig,
metadata::{Metadata, PalletMetadata},
tx,
utils::H256,
@@ -146,7 +146,7 @@ fn get_calls_enum_type<'a>(
/// The specific values used for construction do not matter too much, we just need any OfflineClient
/// to create unsigned extrinsics
fn mocked_offline_client(metadata: Metadata) -> OfflineClient<SubstrateConfig> {
fn mocked_offline_client(metadata: Metadata) -> OfflineClient<BizinikiwConfig> {
let genesis_hash =
H256::from_str("91b171bb158e2d3848fa23a9f1c25182fb8e20313b2c1eb49219da7a70ce90c3")
.expect("Valid hash; qed");
@@ -154,7 +154,7 @@ fn mocked_offline_client(metadata: Metadata) -> OfflineClient<SubstrateConfig> {
let runtime_version =
pezkuwi_subxt::client::RuntimeVersion { spec_version: 9370, transaction_version: 20 };
OfflineClient::<SubstrateConfig>::new(genesis_hash, runtime_version, metadata)
OfflineClient::<BizinikiwConfig>::new(genesis_hash, runtime_version, metadata)
}
/// composites stay composites, all other types are converted into a 1-fielded unnamed composite
+1 -1
View File
@@ -10,7 +10,7 @@ use frame_metadata::{RuntimeMetadata, RuntimeMetadataPrefixed};
use pezkuwi_subxt_utils_stripmetadata::StripMetadata;
use std::{io::Write, path::PathBuf};
/// Download metadata from a substrate node, for use with `subxt` codegen.
/// Download metadata from a bizinikiwi node, for use with `subxt` codegen.
#[derive(Debug, ClapParser)]
pub struct Opts {
#[command(flatten)]
+1 -1
View File
@@ -9,7 +9,7 @@ mod utils;
use clap::Parser as ClapParser;
/// Subxt utilities for interacting with Substrate based nodes.
/// Subxt utilities for interacting with Bizinikiwi based nodes.
#[derive(Debug, ClapParser)]
enum Command {
Metadata(commands::metadata::Opts),
+6 -6
View File
@@ -11,7 +11,7 @@ use heck::ToUpperCamelCase;
use scale_info::PortableRegistry;
use scale_typegen_description::{format_type_description, type_description};
use std::{fmt::Display, fs, io::Read, path::PathBuf, str::FromStr};
use pezkuwi_subxt::{OnlineClient, PolkadotConfig};
use pezkuwi_subxt::{OnlineClient, PezkuwiConfig};
use pezkuwi_subxt_utils_fetchmetadata::{self as fetch_metadata, MetadataVersion, Url};
use scale_value::Value;
@@ -19,7 +19,7 @@ use scale_value::Value;
/// The source of the metadata.
#[derive(Debug, Args, Clone)]
pub struct FileOrUrl {
/// The url of the substrate node to query for metadata for codegen.
/// The url of the bizinikiwi node to query for metadata for codegen.
#[clap(long, value_parser)]
pub url: Option<Url>,
/// The path to the encoded metadata file.
@@ -219,10 +219,10 @@ impl<T: Display> Indent for T {}
pub async fn create_client(
file_or_url: &FileOrUrl,
) -> color_eyre::Result<OnlineClient<PolkadotConfig>> {
) -> color_eyre::Result<OnlineClient<PezkuwiConfig>> {
let client = match &file_or_url.url {
Some(url) => OnlineClient::<PolkadotConfig>::from_url(url).await?,
None => OnlineClient::<PolkadotConfig>::new().await?,
Some(url) => OnlineClient::<PezkuwiConfig>::from_url(url).await?,
None => OnlineClient::<PezkuwiConfig>::new().await?,
};
Ok(client)
}
@@ -368,7 +368,7 @@ mod tests {
assert!(FileOrUrl::from_str("./src/i_dont_exist.rs").is_err());
assert!(matches!(
FileOrUrl::from_str("https://github.com/paritytech/subxt"),
FileOrUrl::from_str("https://github.com/pezkuwichain/subxt"),
Ok(FileOrUrl { url: Some(_), file: None, version: None, at_block: None })
));
}