Skip to main content

Module vanity

Module vanity 

Source

Re-exportsΒ§

use alloy_primitives::Address; πŸ”’
use alloy_primitives::hex; πŸ”’
use alloy_primitives::hex; πŸ”’
use alloy_signer_local::PrivateKeySigner; πŸ”’
use clap::Parser; πŸ”’
use eyre::Result; πŸ”’
use eyre::WrapErr; πŸ”’
use foundry_cli::json::print_json_success; πŸ”’
use foundry_common::fs::write_sensitive_json_file; πŸ”’
use foundry_common::sh_println; πŸ”’
use foundry_common::shell; πŸ”’
use rayon::iter; πŸ”’
use rayon::iter::ParallelIterator; πŸ”’
use regex::Regex; πŸ”’
use serde::Deserialize; πŸ”’
use serde::Deserialize; πŸ”’
use serde::Serialize; πŸ”’
use serde::Serialize; πŸ”’
use serde_json::json; πŸ”’
use std::fs; πŸ”’
use std::path::Path; πŸ”’
use std::path::PathBuf; πŸ”’
use std::time::Instant; πŸ”’

StructsΒ§

Matcher πŸ”’
Optional start and end patterns an address must satisfy.
VanityArgs
CLI arguments for cast wallet vanity.
WalletData πŸ”’
WalletData contains address and private_key information for a wallet.
Wallets πŸ”’
Wallets is a collection of WalletData.

EnumsΒ§

Pattern πŸ”’
A vanity pattern: an exact byte prefix/suffix, or a regex over the lowercase hex address.

FunctionsΒ§

find_vanity πŸ”’
Generates random wallets in parallel until matcher matches the wallet address, or the contract address it creates at nonce when one is given.
parse_pattern πŸ”’
save_wallet_to_file πŸ”’
Saves the specified wallet to a β€˜vanity_addresses.json’ file at the given save_path. If the file exists, the wallet data is appended to the existing content; otherwise, a new file is created.