pub trait Precompile {
    // Required method
    fn execute(
        handle: &mut impl PrecompileHandle
    ) -> Result<PrecompileOutput, PrecompileFailure>;
}
Expand description

One single precompile used by EVM engine.

Required Methods§

fn execute( handle: &mut impl PrecompileHandle ) -> Result<PrecompileOutput, PrecompileFailure>

Try to execute the precompile with given handle which provides all call data and allow to register costs and logs.

Implementations on Foreign Types§

§

impl<T> Precompile for PortalPrecompile<T>where T: Config + Config<()> + Config, <T as Config<()>>::AssetId: From<u32>, <T as Config<()>>::AssetIdParameter: From<u32>, <T as Config<()>>::Balance: EvmData, <<T as Config>::Currency as Currency<<T as Config>::AccountId>>::Balance: EvmData, U256: From<<T as Config<()>>::Balance> + From<<<T as Config>::Currency as Currency<<T as Config>::AccountId>>::Balance>,

§

fn execute( handle: &mut impl PrecompileHandle ) -> Result<PrecompileOutput, PrecompileFailure>

§

impl<T> Precompile for TokensPrecompile<T>where T: Config + Config<()> + Config, <T as Config<()>>::AssetId: From<u32>, <T as Config<()>>::AssetIdParameter: From<u32>, <T as Config<()>>::Balance: EvmData, <<T as Config>::Currency as Currency<<T as Config>::AccountId>>::Balance: EvmData, U256: From<<T as Config<()>>::Balance> + From<<<T as Config>::Currency as Currency<<T as Config>::AccountId>>::Balance>,

§

fn execute( handle: &mut impl PrecompileHandle ) -> Result<PrecompileOutput, PrecompileFailure>

§

impl<T> Precompile for VacuumPrecompile<T>where T: Config + Config<()> + Config, <T as Config<()>>::AssetId: From<u32>, <T as Config<()>>::AssetIdParameter: From<u32>, <T as Config<()>>::Balance: EvmData, <<T as Config>::Currency as Currency<<T as Config>::AccountId>>::Balance: EvmData, U256: From<<T as Config<()>>::Balance> + From<<<T as Config>::Currency as Currency<<T as Config>::AccountId>>::Balance>,

§

fn execute( handle: &mut impl PrecompileHandle ) -> Result<PrecompileOutput, PrecompileFailure>

Implementors§

§

impl Precompile for Modexp

§

impl<T> Precompile for Twhere T: LinearCostPrecompile,