package tezt-tezos

  1. Overview
  2. Docs
type t

Smart-Contract Rollup client state

val create : protocol:Protocol.t -> ?runner:Tezt_wrapper.Runner.t -> ?name:string -> ?base_dir:string -> ?color:Tezt_wrapper.Log.Color.t -> Sc_rollup_node.t -> t

create ~protocol ?runner ?name ?base_dir node returns a fresh client identified by a specified name, logging in color, executing the program at path, storing local information in base_dir, and communicating with the specified node, using the runner.

rpc_get client path issues a GET request for path.

val rpc_post : ?hooks:Tezt_wrapper.Process.hooks -> t -> Client.path -> Tezt_wrapper.JSON.t -> Tezt_wrapper.JSON.t Runnable.process

rpc_post client path data issues a POST request for path with data.

val rpc_get_rich : ?hooks:Tezt_wrapper.Process.hooks -> ?log_output:bool -> t -> Client.path -> (string * string) list -> Tezt_wrapper.JSON.t Runnable.process

rpc_get_rich ?hooks ?log_output client path parameters issues a GET request for path passing parameters.

type 'output_type durable_state_operation =
  1. | Value : string option durable_state_operation
  2. | Length : int64 option durable_state_operation
  3. | Subkeys : string list durable_state_operation
val inspect_durable_state_value : ?hooks:Tezt_wrapper.Process.hooks -> ?log_output:bool -> ?block:string -> t -> pvm_kind:string -> operation:'a durable_state_operation -> key:string -> 'a Runnable.process

inspect_durable_state_value ?hooks ?log_output ?block client key gets the corresponding durable PVM state value mapped to key for the block (default "head").

type outbox_proof = {
  1. commitment_hash : string;
  2. proof : string;
}
val outbox_proof_single : ?hooks:Tezt_wrapper.Process.hooks -> ?expected_error:Tezt_wrapper.Base.rex -> ?entrypoint:string -> ?parameters_ty:string -> t -> message_index:int -> outbox_level:int -> destination:string -> parameters:string -> outbox_proof option Lwt.t

outbox_proof_single asks the rollup node for a proof that an output of a given message_index is available in the outbox at a given outbox_level as a latent call to destination's entrypoint with the given parameters.

type transaction = {
  1. destination : string;
  2. entrypoint : string option;
  3. parameters : string;
  4. parameters_ty : string option;
}
val outbox_proof : ?hooks:Tezt_wrapper.Process.hooks -> ?expected_error:Tezt_wrapper.Base.rex -> t -> message_index:int -> outbox_level:int -> outbox_proof option Lwt.t

Same as outbox_proof_single without providing the outbox message

val encode_json_outbox_msg : ?hooks:Tezt_wrapper.Process.hooks -> t -> Tezt_wrapper.JSON.u -> string Runnable.process

encode_json_outbox_msg outbox_msg_json returns the encoding of an outbox message.

val encode_batch : ?hooks:Tezt_wrapper.Process.hooks -> ?expected_error:Tezt_wrapper.Base.rex -> t -> transaction list -> string option Lwt.t

encode_batch batch returns the encoding of a batch of output transactions.

val inject : ?hooks:Tezt_wrapper.Process_hooks.t -> t -> string list -> string list Runnable.process

inject client messages injects the messages in the queue the rollup node's batcher and returns the list of message hashes injected.

OCaml

Innovation. Community. Security.