Files
pezkuwi-sdk/tools/usdt-bridge/examples/gen_automation_key.rs
T
Satoshi Qazi Muhammed d285d59108 sync: mirror deployed github repo (chains + sanitized bridge), keep GitLab CI
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.
2026-07-24 11:42:50 -07:00

28 lines
1.0 KiB
Rust

use anyhow::Result;
fn main() -> Result<()> {
let (pair, phrase, _) = sp_core::sr25519::Pair::generate_with_phrase(None);
use sp_core::Pair as _;
let public = pair.public();
let account = sp_core::crypto::AccountId32::from(public.0);
let ss58 = sp_core::crypto::Ss58Codec::to_ss58check_with_version(
&account,
sp_core::crypto::Ss58AddressFormat::custom(42),
);
let out = serde_json::json!({
"warning": "CONTAINS PRIVATE SEED PHRASE - KEEP SECURE - NOT IN GIT - NOT IN LOGS",
"role": "usdt-bridge relayer automation key - LIMITED delegated allowance only via Assets.approve_transfer, never asset owner/admin",
"ss58_address_pezkuwi": ss58,
"scheme": "sr25519",
"mnemonic": phrase,
});
std::fs::write("bridge_automation_key.json", serde_json::to_string_pretty(&out)?)?;
println!("Generated automation key.");
println!("Address (never the mnemonic): {}", ss58);
println!("Saved to bridge_automation_key.json");
Ok(())
}