package tezt-tezos

  1. Overview
  2. Docs
Legend:
Page
Library
Module
Module type
Parameter
Class
Class type
Source

Module Tezt_tezos.Evm_proxy_serverSource

Sourcetype t

EVM proxy server state.

Sourceval create : ?runner:Tezt.Runner.t -> ?rpc_addr:string -> ?rpc_port:int -> Sc_rollup_node.t -> t

create ?runner ?rpc_addr ?rpc_port rollup_node creates an EVM proxy 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.

The server communicates with a rollup-node and sets its endpoint via rollup_node.

Sourceval mockup : ?runner:Tezt.Runner.t -> ?rpc_addr:string -> ?rpc_port:int -> unit -> t

mockup ?runner ?rpc_addr ?rpc_port () is like create but doesn't communicate with a rollup_node and serves mockup values.

Sourceval run : t -> unit Lwt.t

run proxy_server launches the EVM proxy server with the arguments given during create.

Sourceval init : ?runner:Tezt.Runner.t -> ?rpc_addr:string -> ?rpc_port:int -> Sc_rollup_node.t -> t Lwt.t

init ?runner ?rpc_addr ?rpc_port rollup_node creates an EVM proxy server with create and runs it with run.

Sourceval spawn_run : t -> Tezt.Process.t

spawn_run proxy_server same as run but spawns a process.

Sourceval endpoint : t -> string

endpoint proxy_server returns the endpoint to communicate with the proxy_server.

Sourcetype request = {
  1. method_ : string;
  2. parameters : Tezt.JSON.u;
}

JSON-RPC request.

Sourceval call_evm_rpc : t -> request -> Tezt.JSON.t Lwt.t

call_evm_rpc proxy_server ~request sends a JSON-RPC request to the proxy_server, for the given request.

Sourceval batch_evm_rpc : t -> request list -> Tezt.JSON.t Lwt.t

batch_evm_rpc proxy_server ~requests sends multiple JSON-RPC requests to the proxy_server, for the given requests.

Sourceval extract_result : Tezt.JSON.t -> Tezt.JSON.t

extract_result json expects a JSON-RPC `result` and returns the value.

Sourceval fetch_contract_code : t -> string -> string Lwt.t

fetch_contract_code proxy_server contract returns the code associated to the given contract in the rollup.

Sourcetype txpool_slot = {
  1. address : string;
  2. transactions : (int64 * Tezt.JSON.t) list;
}

A slot in the transaction pool associates an address to a mapping of nonces to transactions.

Sourceval txpool_content : t -> (txpool_slot list * txpool_slot list) Lwt.t

txpool_content proxy_server returns the transaction hash and nonce contained in the `pending` and `queued` pools.

OCaml

Innovation. Community. Security.