mirror of
https://gitlab.com/pezkuwichain/pezkuwi-sdk.git
synced 2026-11-14 22:47:06 +00:00
Make this monorepo's tracked tree identical to the deployed github repo (github.com/pezkuwichain/pezkuwi-DKS): all RC/AH/People runtimes and framework carry the mainnet fixes (incl. U128CurrencyToVote everywhere, so the staking election stall cannot recur), and tools/usdt-bridge matches the current, public-safe custody tooling (real config/deploy units gitignored, secret-file locations and server IPs stripped, sanitized *.example templates committed). Only exception to the mirror: GitLab-native CI is preserved (.gitlab-ci.yml and .gitlab/), to be rebuilt to match the github CI pipeline in a follow-up.
33 lines
1018 B
Rust
33 lines
1018 B
Rust
//! One-off diagnostic: dump the RuntimeHoldReason enum's variant list, in
|
|
//! discriminant order, from live chain metadata.
|
|
//!
|
|
//! Run with:
|
|
//! RPC_URL="ws://217.77.6.126:9944" cargo run --release -p pezkuwi-subxt --example holdreason_check
|
|
|
|
#![allow(missing_docs)]
|
|
|
|
#[tokio::main]
|
|
async fn main() -> Result<(), Box<dyn std::error::Error>> {
|
|
let url = std::env::var("RPC_URL").unwrap_or_else(|_| "ws://217.77.6.126:9944".to_string());
|
|
let api = pezkuwi_subxt::OnlineClient::<pezkuwi_subxt::PezkuwiConfig>::from_insecure_url(&url)
|
|
.await?;
|
|
let metadata = api.metadata();
|
|
let types = metadata.types();
|
|
|
|
for ty in types.types.iter() {
|
|
let path_str = ty.ty.path.segments.join("::");
|
|
if path_str.contains("HoldReason") {
|
|
println!("=== TYPE: {} ===", path_str);
|
|
if let scale_info::TypeDef::Variant(v) = &ty.ty.type_def {
|
|
for variant in &v.variants {
|
|
println!(" index {}: {}", variant.index, variant.name);
|
|
}
|
|
} else {
|
|
println!(" (not a variant/enum type)");
|
|
}
|
|
}
|
|
}
|
|
|
|
Ok(())
|
|
}
|