mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-04-26 01:47:55 +00:00
Rebrand subxt to pezkuwi-subxt with pezsp_runtime support
- Renamed all crate names from subxt-* to pezkuwi-subxt-* - Updated codegen to use pezsp_runtime, pezsp_core, pezframe_support instead of sp_runtime, sp_core, frame_support - Replaced all internal references from subxt_* to pezkuwi_subxt_* - Added local path dependencies to Pezkuwi SDK crates - Updated workspace configuration for edition 2024
This commit is contained in:
@@ -9,7 +9,7 @@ use jsonrpsee::{
|
||||
http_client::HttpClientBuilder,
|
||||
};
|
||||
use std::time::Duration;
|
||||
use subxt_utils_fetchmetadata::Url;
|
||||
use pezkuwi_subxt_utils_fetchmetadata::Url;
|
||||
|
||||
/// Returns the node's chainSpec from the provided URL.
|
||||
pub async fn fetch_chain_spec(url: Url) -> Result<serde_json::Value, FetchSpecError> {
|
||||
|
||||
@@ -6,7 +6,7 @@ use clap::Parser as ClapParser;
|
||||
#[cfg(feature = "chain-spec-pruning")]
|
||||
use serde_json::Value;
|
||||
use std::{io::Write, path::PathBuf};
|
||||
use subxt_utils_fetchmetadata::Url;
|
||||
use pezkuwi_subxt_utils_fetchmetadata::Url;
|
||||
|
||||
mod fetch;
|
||||
|
||||
|
||||
@@ -10,8 +10,8 @@ use scale_typegen_description::scale_typegen::typegen::{
|
||||
validation::{registry_contains_type_path, similar_type_paths_in_registry},
|
||||
};
|
||||
use std::path::PathBuf;
|
||||
use subxt_codegen::CodegenBuilder;
|
||||
use subxt_metadata::Metadata;
|
||||
use pezkuwi_subxt_codegen::CodegenBuilder;
|
||||
use pezkuwi_subxt_metadata::Metadata;
|
||||
|
||||
/// Generate runtime API client code from metadata.
|
||||
///
|
||||
@@ -52,7 +52,7 @@ pub struct Opts {
|
||||
#[clap(long = "substitute-type", value_parser = substitute_type_parser)]
|
||||
substitute_types: Vec<(String, String)>,
|
||||
/// The `subxt` crate access path in the generated code.
|
||||
/// Defaults to `::subxt::ext::subxt_core`.
|
||||
/// Defaults to `::pezkuwi_subxt::ext::pezkuwi_subxt_core`.
|
||||
#[clap(long = "crate")]
|
||||
crate_path: Option<String>,
|
||||
/// Do not generate documentation for the runtime API code.
|
||||
@@ -230,7 +230,7 @@ fn codegen(
|
||||
}
|
||||
|
||||
let metadata = {
|
||||
let runtime_metadata = subxt_metadata::decode_runtime_metadata(metadata_bytes)?;
|
||||
let runtime_metadata = pezkuwi_subxt_metadata::decode_runtime_metadata(metadata_bytes)?;
|
||||
let mut metadata = match runtime_metadata {
|
||||
// Too old to work with:
|
||||
frame_metadata::RuntimeMetadata::V0(_)
|
||||
|
||||
@@ -8,8 +8,8 @@ use color_eyre::eyre::WrapErr;
|
||||
use jsonrpsee::client_transport::ws::Url;
|
||||
use serde::{Deserialize, Serialize};
|
||||
use std::collections::HashMap;
|
||||
use subxt_metadata::Metadata;
|
||||
use subxt_utils_fetchmetadata::MetadataVersion;
|
||||
use pezkuwi_subxt_metadata::Metadata;
|
||||
use pezkuwi_subxt_utils_fetchmetadata::MetadataVersion;
|
||||
|
||||
use crate::utils::validate_url_security;
|
||||
|
||||
@@ -137,7 +137,7 @@ async fn fetch_runtime_metadata(
|
||||
url: Url,
|
||||
version: MetadataVersion,
|
||||
) -> color_eyre::Result<Metadata> {
|
||||
let bytes = subxt_utils_fetchmetadata::from_url(url, version, None).await?;
|
||||
let bytes = pezkuwi_subxt_utils_fetchmetadata::from_url(url, version, None).await?;
|
||||
let metadata = Metadata::decode(&mut &bytes[..])?;
|
||||
Ok(metadata)
|
||||
}
|
||||
|
||||
@@ -11,7 +11,7 @@ use color_eyre::owo_colors::OwoColorize;
|
||||
use scale_info::Variant;
|
||||
use scale_info::form::PortableForm;
|
||||
|
||||
use subxt_metadata::{
|
||||
use pezkuwi_subxt_metadata::{
|
||||
ConstantMetadata, Metadata, PalletMetadata, RuntimeApiMetadata, StorageEntryMetadata,
|
||||
};
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@ use clap::Subcommand;
|
||||
|
||||
use indoc::writedoc;
|
||||
use subxt::Metadata;
|
||||
use subxt_metadata::PalletMetadata;
|
||||
use pezkuwi_subxt_metadata::PalletMetadata;
|
||||
|
||||
use crate::utils::{FileOrUrl, Indent, first_paragraph_of_docs};
|
||||
|
||||
|
||||
@@ -15,7 +15,7 @@ use subxt::{
|
||||
Metadata,
|
||||
ext::{scale_decode::DecodeAsType, scale_encode::EncodeAsType},
|
||||
};
|
||||
use subxt_metadata::RuntimeApiMetadata;
|
||||
use pezkuwi_subxt_metadata::RuntimeApiMetadata;
|
||||
|
||||
/// Runs for a specified runtime API trait.
|
||||
/// Cases to consider:
|
||||
|
||||
@@ -8,7 +8,7 @@ use codec::{Decode, Encode};
|
||||
use color_eyre::eyre::{self, bail};
|
||||
use frame_metadata::{RuntimeMetadata, RuntimeMetadataPrefixed};
|
||||
use std::{io::Write, path::PathBuf};
|
||||
use subxt_utils_stripmetadata::StripMetadata;
|
||||
use pezkuwi_subxt_utils_stripmetadata::StripMetadata;
|
||||
|
||||
/// Download metadata from a substrate node, for use with `subxt` codegen.
|
||||
#[derive(Debug, ClapParser)]
|
||||
|
||||
+1
-1
@@ -14,7 +14,7 @@ use std::{fs, io::Read, path::PathBuf};
|
||||
use subxt::{OnlineClient, PolkadotConfig};
|
||||
|
||||
use scale_value::Value;
|
||||
use subxt_utils_fetchmetadata::{self as fetch_metadata, MetadataVersion, Url};
|
||||
use pezkuwi_subxt_utils_fetchmetadata::{self as fetch_metadata, MetadataVersion, Url};
|
||||
|
||||
/// The source of the metadata.
|
||||
#[derive(Debug, Args, Clone)]
|
||||
|
||||
Reference in New Issue
Block a user