AddressValidator

Trait AddressValidator 

Source
pub trait AddressValidator: Send + Sync {
    // Required method
    fn validate(&self, address: &str, contract_name: &str) -> ConfigResult<()>;
}
Expand description

Trait for validating blockchain addresses

This trait allows different blockchain address validation logic to be plugged into the configuration system without creating tight coupling to specific blockchain crates.

Required Methods§

Source

fn validate(&self, address: &str, contract_name: &str) -> ConfigResult<()>

Validate an address string

§Arguments
  • address - The address string to validate
  • contract_name - The name of the contract (for error messages)
§Returns
  • Ok(()) if the address is valid
  • Err(ConfigError) with details if the address is invalid

Implementors§