pub trait PrecompileProvider: Clone {
type Context;
type Error;
// Required methods
fn new(context: &mut Self::Context) -> Self;
fn run(
&mut self,
context: &mut Self::Context,
address: &Address,
bytes: &Bytes,
gas_limit: u64,
) -> Result<Option<InterpreterResult>, Self::Error>;
fn warm_addresses(&self) -> impl Iterator<Item = Address>;
fn contains(&self, address: &Address) -> bool;
}
Required Associated Types§
Required Methods§
Sourcefn run(
&mut self,
context: &mut Self::Context,
address: &Address,
bytes: &Bytes,
gas_limit: u64,
) -> Result<Option<InterpreterResult>, Self::Error>
fn run( &mut self, context: &mut Self::Context, address: &Address, bytes: &Bytes, gas_limit: u64, ) -> Result<Option<InterpreterResult>, Self::Error>
Run the precompile.
Sourcefn warm_addresses(&self) -> impl Iterator<Item = Address>
fn warm_addresses(&self) -> impl Iterator<Item = Address>
Get the warm addresses.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.