Transaction pre-execution validation.
Performs envelope and sender checks in deterministic order against current
state and block context, returning :ok or the first {:error, reason}.
Given an EEVM.Config instead of a bare EEVM.HardforkConfig, the checks
honour its simulation switches (see EEVM.Config).
Summary
Functions
Like validate/4, but a failure also carries the values the rule
compared, as {:error, reason, details}; EEVM.TransactionError lists
them per reason.
Validate under the default hardfork; see validate/4.
Run the pre-execution checks in order and return the first failure.
Error reasons are listed in EEVM.Error.
Functions
@spec check( EEVM.TxEnv.t(), EEVM.Database.t(), EEVM.BlockEnv.t(), EEVM.HardforkConfig.t() | EEVM.Config.t() ) :: :ok | {:error, EEVM.Error.transaction_validation_error(), map()}
Like validate/4, but a failure also carries the values the rule
compared, as {:error, reason, details}; EEVM.TransactionError lists
them per reason.
@spec validate(EEVM.TxEnv.t(), EEVM.Database.t(), EEVM.BlockEnv.t()) :: :ok | {:error, EEVM.Error.transaction_validation_error()}
Validate under the default hardfork; see validate/4.
@spec validate( EEVM.TxEnv.t(), EEVM.Database.t(), EEVM.BlockEnv.t(), EEVM.HardforkConfig.t() | EEVM.Config.t() ) :: :ok | {:error, EEVM.Error.transaction_validation_error()}
Run the pre-execution checks in order and return the first failure.
Error reasons are listed in EEVM.Error.