Skip to main content

execute_precompile

Function execute_precompile 

Source
pub fn execute_precompile(
    calldata: &Bytes,
    gas_remaining: &mut u64,
    _fork: Fork,
    _crypto: &dyn Crypto,
    stateless_validator: Option<&dyn StatelessValidator>,
) -> Result<Bytes, VMError>
Expand description

EXECUTE precompile entrypoint.

Input: SSZ-encoded StatelessInput. Output: SSZ-encoded StatelessValidationResult.

This wrapper exists to mimic the standard precompile signature (fn(&Bytes, &mut u64, Fork, &dyn Crypto) -> Result<Bytes, VMError>) plus the extra stateless_validator slot threaded through the dispatcher. It also converts the Option into an error, so run_execute can work with a guaranteed-Some validator.