pub trait PrecompileSetFragment {
// Required methods
fn new() -> Self;
fn execute(
&self,
handle: &mut impl PrecompileHandle
) -> Option<PrecompileResult>;
fn is_precompile(
&self,
address: H160,
remaining_gas: u64
) -> IsPrecompileResult;
fn used_addresses(&self) -> Vec<H160>;
}
Expand description
A fragment of a PrecompileSet. Should be implemented as is it
was a PrecompileSet containing only the precompile(set) it wraps.
They can be combined into a real PrecompileSet using PrecompileSetBuilder
.
Required Methods§
sourcefn execute(
&self,
handle: &mut impl PrecompileHandle
) -> Option<PrecompileResult>
fn execute( &self, handle: &mut impl PrecompileHandle ) -> Option<PrecompileResult>
Execute the fragment.
sourcefn is_precompile(&self, address: H160, remaining_gas: u64) -> IsPrecompileResult
fn is_precompile(&self, address: H160, remaining_gas: u64) -> IsPrecompileResult
Is the provided address a precompile in this fragment?
sourcefn used_addresses(&self) -> Vec<H160>
fn used_addresses(&self) -> Vec<H160>
Return the list of addresses covered by this fragment.