pub struct Precompiles<'a, I, E, H> {
pub all_precompiles: BTreeMap<Address, AllPrecompiles<'a, I, E, H>>,
pub paused_precompiles: BTreeSet<Address>,
}Fields§
§all_precompiles: BTreeMap<Address, AllPrecompiles<'a, I, E, H>>§paused_precompiles: BTreeSet<Address>Implementations§
Source§impl<'a, I: IO + Copy, E: Env, H: ReadOnlyPromiseHandler> Precompiles<'a, I, E, H>
impl<'a, I: IO + Copy, E: Env, H: ReadOnlyPromiseHandler> Precompiles<'a, I, E, H>
pub fn new_homestead<M: ModExpAlgorithm + 'static>( ctx: PrecompileConstructorContext<'a, I, E, H, M>, ) -> Self
pub fn new_byzantium<M: ModExpAlgorithm + 'static>( ctx: PrecompileConstructorContext<'a, I, E, H, M>, ) -> Self
pub fn new_istanbul<M: ModExpAlgorithm + 'static>( ctx: PrecompileConstructorContext<'a, I, E, H, M>, ) -> Self
pub fn new_berlin<M: ModExpAlgorithm + 'static>( ctx: PrecompileConstructorContext<'a, I, E, H, M>, ) -> Self
pub fn new_london<M: ModExpAlgorithm + 'static>( ctx: PrecompileConstructorContext<'a, I, E, H, M>, ) -> Self
Trait Implementations§
Source§impl<I: IO + Copy, E: Env, H: ReadOnlyPromiseHandler> PrecompileSet for Precompiles<'_, I, E, H>
impl<I: IO + Copy, E: Env, H: ReadOnlyPromiseHandler> PrecompileSet for Precompiles<'_, I, E, H>
Source§fn execute(
&self,
handle: &mut impl PrecompileHandle,
) -> Option<Result<PrecompileOutput, PrecompileFailure>>
fn execute( &self, handle: &mut impl PrecompileHandle, ) -> Option<Result<PrecompileOutput, PrecompileFailure>>
Tries to execute a precompile in the precompile set.
If the provided address is not a precompile, returns None.
Source§fn is_precompile(&self, address: H160) -> bool
fn is_precompile(&self, address: H160) -> bool
Check if the given address is a precompile. Should only be called to
perform the check while not executing the precompile afterward, since
execute already performs a check internally.Auto Trait Implementations§
impl<'a, I, E, H> Freeze for Precompiles<'a, I, E, H>
impl<'a, I, E, H> !RefUnwindSafe for Precompiles<'a, I, E, H>
impl<'a, I, E, H> !Send for Precompiles<'a, I, E, H>
impl<'a, I, E, H> !Sync for Precompiles<'a, I, E, H>
impl<'a, I, E, H> Unpin for Precompiles<'a, I, E, H>
impl<'a, I, E, H> !UnwindSafe for Precompiles<'a, I, E, H>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more