Trait SystemCallEvm

pub trait SystemCallEvm: ExecuteEvm {
    // Required method
    fn transact_system_call(
        &mut self,
        data: Bytes,
        system_contract_address: Address,
    ) -> Self::Output;
}
Expand description

API for executing the system calls. System calls dont deduct the caller or reward the beneficiary. They are used before and after block execution to insert or obtain blockchain state.

It act similar to transact function and sets default Tx with data and system contract as a target.

Required Methods§

fn transact_system_call( &mut self, data: Bytes, system_contract_address: Address, ) -> Self::Output

System call is a special transaction call that is used to call a system contract.

Transaction fields are reset and set in SystemCallTx and data and target are set to given values.

Block values are taken into account and will determent how system call will be executed.

Implementations on Foreign Types§

§

impl<CTX, INSP, PRECOMPILE> SystemCallEvm for OpEvm<CTX, INSP, EthInstructions<EthInterpreter, CTX>, PRECOMPILE>
where CTX: OpContextTr + ContextSetters, <CTX as ContextTr>::Tx: SystemCallTx, PRECOMPILE: PrecompileProvider<CTX, Output = InterpreterResult>,

§

fn transact_system_call( &mut self, data: Bytes, system_contract_address: Address, ) -> <OpEvm<CTX, INSP, EthInstructions<EthInterpreter, CTX>, PRECOMPILE> as ExecuteEvm>::Output

Implementors§

§

impl<CTX, INSP, INST, PRECOMPILES> SystemCallEvm for Evm<CTX, INSP, INST, PRECOMPILES>
where CTX: ContextTr + ContextSetters, <CTX as ContextTr>::Journal: JournalTr<FinalOutput = JournalOutput>, <CTX as ContextTr>::Tx: SystemCallTx, INST: InstructionProvider<Context = CTX, InterpreterTypes = EthInterpreter>, PRECOMPILES: PrecompileProvider<CTX, Output = InterpreterResult>,