Evm_node_lib_dev.Validate
type validation_mode =
| Minimal
Minimal validation, includes:
| Full
Full validation, is minimal validation plus:
val is_tx_valid :
?max_number_of_chunks:int ->
(module Services_backend_sig.S) ->
mode:validation_mode ->
string ->
(Evm_node_lib_dev_encoding.Ethereum_types.quantity
* Evm_node_lib_dev_encoding.Ethereum_types.legacy_transaction_object,
string)
Stdlib.result
Tezos_base.TzPervasives.tzresult
Lwt.t
is_tx_valid backend_rpc tx_raw
validates the transaction tx_raw
and returns the next allowed nonce for the sender of the transaction alongside the transaction object.
type validation_config = {
minimum_base_fee_per_gas : Evm_node_lib_dev_encoding.Ethereum_types.quantity;
base_fee_per_gas : Evm_node_lib_dev_encoding.Ethereum_types.quantity;
maximum_gas_limit : Evm_node_lib_dev_encoding.Ethereum_types.quantity;
da_fee_per_byte : Evm_node_lib_dev_encoding.Ethereum_types.quantity;
next_nonce : Evm_node_lib_dev_encoding.Ethereum_types.address ->
Evm_node_lib_dev_encoding.Ethereum_types.quantity option
Tezos_base.TzPervasives.tzresult
Lwt.t;
balance : Evm_node_lib_dev_encoding.Ethereum_types.address ->
Evm_node_lib_dev_encoding.Ethereum_types.quantity
Tezos_base.TzPervasives.tzresult
Lwt.t;
}
type validation_state = {
config : validation_config;
addr_balance : Z.t Tezos_base.TzPervasives.String.Map.t;
addr_nonce : Z.t Tezos_base.TzPervasives.String.Map.t;
}
val validate_balance_gas_nonce_with_validation_state :
validation_state ->
caller:Evm_node_lib_dev_encoding.Ethereum_types.address ->
Evm_node_lib_dev_encoding.Transaction.transaction ->
(validation_state, string) Stdlib.result Tezos_base.TzPervasives.tzresult
Lwt.t