pub trait PrecompileProvider {
type Context: ContextTr;
type Output;
// Required methods
fn set_spec(
&mut self,
spec: <<Self::Context as ContextTr>::Cfg as Cfg>::Spec,
);
fn run(
&mut self,
context: &mut Self::Context,
address: &Address,
bytes: &Bytes,
gas_limit: u64,
) -> Result<Option<Self::Output>, PrecompileError>;
fn warm_addresses(&self) -> Box<impl Iterator<Item = Address> + '_>;
fn contains(&self, address: &Address) -> bool;
}
Required Associated Types§
Required Methods§
fn set_spec(&mut self, spec: <<Self::Context as ContextTr>::Cfg as Cfg>::Spec)
Sourcefn run(
&mut self,
context: &mut Self::Context,
address: &Address,
bytes: &Bytes,
gas_limit: u64,
) -> Result<Option<Self::Output>, PrecompileError>
fn run( &mut self, context: &mut Self::Context, address: &Address, bytes: &Bytes, gas_limit: u64, ) -> Result<Option<Self::Output>, PrecompileError>
Run the precompile.
Sourcefn warm_addresses(&self) -> Box<impl Iterator<Item = Address> + '_>
fn warm_addresses(&self) -> Box<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.