pub trait PrecompileSetFragment {
// Required methods
fn new() -> Self;
fn execute<R: Config>(
&self,
handle: &mut impl PrecompileHandle
) -> Option<PrecompileResult>;
fn is_precompile(&self, address: H160, gas: u64) -> IsPrecompileResult;
fn used_addresses(&self) -> Vec<H160>;
fn summarize_checks(&self) -> Vec<PrecompileCheckSummary>;
}
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<R: Config>(
&self,
handle: &mut impl PrecompileHandle
) -> Option<PrecompileResult>
fn execute<R: Config>( &self, handle: &mut impl PrecompileHandle ) -> Option<PrecompileResult>
Execute the fragment.
sourcefn is_precompile(&self, address: H160, gas: u64) -> IsPrecompileResult
fn is_precompile(&self, address: H160, 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.
sourcefn summarize_checks(&self) -> Vec<PrecompileCheckSummary>
fn summarize_checks(&self) -> Vec<PrecompileCheckSummary>
Summarize
Object Safety§
This trait is not object safe.