Simulator.Make
module SimulationBackend : SimulationBackend
val call_simulation :
?state_override:Evm_node_lib_dev_encoding.Ethereum_types.state_override ->
log_file:string ->
input_encoder:
('a -> (string list, Tezos_base.TzPervasives.tztrace) Stdlib.result) ->
input:'a ->
SimulationBackend.state ->
(bytes, Tezos_base.TzPervasives.tztrace) Stdlib.result Lwt.t
val simulation_input :
simulation_version:[< `V0 | `V1 | `V2 ] ->
with_da_fees:bool ->
timestamp:Tezos_base.TzPervasives.Time.Protocol.t ->
Evm_node_lib_dev_encoding.Ethereum_types.call ->
Simulation.estimate_gas_input
val simulation_version :
SimulationBackend.state ->
([> `V0 | `V1 | `V2 ], Tezos_base.TzPervasives.tztrace) Stdlib.result Lwt.t
val simulate_call :
overwrite_tick_limit:bool ->
Evm_node_lib_dev_encoding.Ethereum_types.call ->
Evm_node_lib_dev_encoding.Ethereum_types.Block_parameter.extended ->
Evm_node_lib_dev_encoding.Ethereum_types.state_override ->
(((Simulation.execution_result,
Evm_node_lib_dev_encoding.Ethereum_types.hash)
Stdlib.result,
string)
Stdlib.result,
Tezos_base.TzPervasives.tztrace)
Stdlib.result
Lwt.t
val call_estimate_gas :
Simulation.estimate_gas_input ->
SimulationBackend.state ->
(((Simulation.execution_result,
Evm_node_lib_dev_encoding.Ethereum_types.hash)
Stdlib.result,
string)
Stdlib.result,
Tezos_base.TzPervasives.tztrace)
Stdlib.result
Lwt.t
val da_fees_gas_limit_overhead :
SimulationBackend.state ->
bytes ->
(Z.t, Tezos_base.TzPervasives.tztrace) Stdlib.result Lwt.t
gas_for_fees simulation_state tx_data
returns the DA fees, i.e. the gas unit necessary for the data availability.
The gas for fees must be computed based on a context, to retrieve the base fee per gas and da_fee_per_byte, these information are taken from simulation_state
.
/!\ This function must return enough gas for fees. Therefore it must be synchronised to fee model in the kernel. /!\
The whole point of this function is to avoid an unncessary call to the WASM PVM to improve the performances.
val confirm_gas :
timestamp:Tezos_base.TzPervasives.Time.Protocol.t ->
maximum_gas_per_transaction:Z.t ->
simulation_version:[< `V0 | `V1 | `V2 V0 ] ->
Evm_node_lib_dev_encoding.Ethereum_types.call ->
Evm_node_lib_dev_encoding.Ethereum_types.quantity ->
SimulationBackend.state ->
Evm_node_lib_dev_encoding.Ethereum_types.quantity
Tezos_base.TzPervasives.tzresult
Lwt.t
val estimate_gas :
Evm_node_lib_dev_encoding.Ethereum_types.call ->
Evm_node_lib_dev_encoding.Ethereum_types.Block_parameter.t ->
(((Simulation.execution_result,
Evm_node_lib_dev_encoding.Ethereum_types.hash)
Stdlib.result,
string)
Stdlib.result,
Tezos_base.TzPervasives.tztrace)
Stdlib.result
Lwt.t