package tezt-tezos
val create :
?runner:Tezt_wrapper.Runner.t ->
?mode:mode ->
?data_dir:string ->
?devmode:bool ->
?rpc_addr:string ->
?rpc_port:int ->
string ->
t
create ?runner ?mode ?data_dir ?devmode ?rpc_addr ?rpc_port
rollup_node_endpoint
creates an EVM node server.
The server listens to requests at address rpc_addr
and the port rpc_port
. rpc_addr
defaults to "127.0.0.1"
and a fresh port is chosen if rpc_port
is not set.
To use the node on development set devmode
to true
. Otherwise to set it to the one on production set devmode
to false
(or omit the parameter).
The server communicates with a rollup-node and sets its endpoint via rollup_node_endpoint
.
mode
defaults to Proxy
.
run evm_node
launches the EVM node server with the arguments given during create
.
val init :
?runner:Tezt_wrapper.Runner.t ->
?mode:mode ->
?data_dir:string ->
?devmode:bool ->
?rpc_addr:string ->
?rpc_port:int ->
string ->
t Lwt.t
val spawn_run : t -> Tezt_wrapper.Process.t
spawn_run evm_node
same as run
but spawns a process.
Send SIGTERM and wait for the process to terminate.
Default timeout
is 30 seconds, after which SIGKILL is sent.
val endpoint : t -> string
endpoint evm_node
returns the endpoint to communicate with the evm_node
.
JSON-RPC request.
val call_evm_rpc : t -> request -> Tezt_wrapper.JSON.t Lwt.t
call_evm_rpc evm_node ~request
sends a JSON-RPC request to the evm_node
, for the given request
.
val batch_evm_rpc : t -> request list -> Tezt_wrapper.JSON.t Lwt.t
batch_evm_rpc evm_node ~requests
sends multiple JSON-RPC requests to the evm_node
, for the given requests
.
val extract_result : Tezt_wrapper.JSON.t -> Tezt_wrapper.JSON.t
extract_result json
expects a JSON-RPC `result` and returns the value.
val extract_error_message : Tezt_wrapper.JSON.t -> Tezt_wrapper.JSON.t
extract_error_message json
expects a JSON-RPC `error.message` and returns the value.
fetch_contract_code evm_node contract
returns the code associated to the given contract in the rollup.
A slot in the transaction pool associates an address to a mapping of nonces to transactions.
val txpool_content : t -> (txpool_slot list * txpool_slot list) Lwt.t
txpool_content evm_node
returns the transaction hash and nonce contained in the `pending` and `queued` pools.