PrecompileLookup

Trait PrecompileLookup 

pub trait PrecompileLookup: Send + Sync {
    // Required method
    fn lookup(&self, address: &Address) -> Option<DynPrecompile>;
}
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>

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.

Implementors§

§

impl<F> PrecompileLookup for F
where F: Fn(&Address) -> Option<DynPrecompile> + Send + Sync,

Implement PrecompileLookup for closure types