Trait PrecompileLookup
pub trait PrecompileLookup: Send + Sync {
// Required method
fn lookup(&self, address: &Address) -> Option<DynPrecompile>;
}Available on crate feature
evm only.Expand description
Trait for dynamically resolving precompile contracts.
This trait allows for runtime resolution of precompiles that aren’t known at initialization time.
Required Methods§
fn lookup(&self, address: &Address) -> Option<DynPrecompile>
fn lookup(&self, address: &Address) -> Option<DynPrecompile>
Looks up a precompile at the given address.
Returns Some(precompile) if a precompile exists at the address,
or None if no precompile is found.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".
Implementors§
impl<F> PrecompileLookup for F
Implement PrecompileLookup for closure types