package tezt-tezos

  1. Overview
  2. Docs

Helpers built upon the Sc_rollup_node and Sc_rollup_client

val hooks : Tezt.Process.hooks

Hooks that handles hashes specific to smart rollups.

val hex_encode : string -> string

hex_encode s returns the hexadecimal representation of the given string s.

val read_kernel : ?base:string -> string -> string

read_kernel filename reads binary encoded WebAssembly module (e.g. `foo.wasm`) and returns a hex-encoded Wasm PVM boot sector, suitable for passing to originate_sc_rollup.

module Installer_kernel_config : sig ... end
val prepare_installer_kernel : ?runner:Tezt.Runner.t -> ?base_installee:string -> preimages_dir:string -> ?config:Installer_kernel_config.t -> string -> string Lwt.t

prepare_installer_kernel ~base_installee ~preimages_dir ?config installee feeds the smart-rollup-installer with a kernel (installee), and returns the boot sector corresponding to the installer for this specific kernel. installee is read from base_installee on the disk.

A Installer_kernel_config.t can optionally be provided to the installer via config.

The preimages of the installee are saved to preimages_dir. This should be the reveal data directory of the rollup node.

The returned installer is hex-encoded and may be passed to originate_sc_rollup directly.

val prepare_installer_kernel_gen : ?runner:Tezt.Runner.t -> ?base_installee:string -> preimages_dir:string -> ?display_root_hash:bool -> ?config:Installer_kernel_config.t -> string -> (string * string option) Lwt.t

prepare_installer_kernel ?runner ?base_installee ~preimages_dir ?display_root_hash ?config installee will behave just as Sc_rollup_helpers.prepare_installer_kernel but will also output the preimage root hash if display_root_hash is set to true.

val setup_l1 : ?bootstrap_smart_rollups:Protocol.bootstrap_smart_rollup list -> ?commitment_period:int -> ?challenge_window:int -> ?timeout:int -> ?whitelist_enable:bool -> Protocol.t -> (Node.t * Client.t) Lwt.t

setup_l1 protocol initializes a protocol with the given parameters, and returns the L1 node and client.

val originate_sc_rollup : ?hooks:Tezt.Process_hooks.t -> ?burn_cap:Tez.t -> ?whitelist:string list -> ?alias:string -> ?src:string -> kind:string -> ?parameters_ty:string -> ?boot_sector:string -> Client.t -> string Lwt.t

originate_sc_rollup is a wrapper above Client.originate_sc_rollup that waits for the block to be included.

val default_boot_sector_of : kind:string -> string

default_boot_sector_of k returns a valid boot sector for a PVM of kind kind.

val last_cemented_commitment_hash_with_level : sc_rollup:string -> Client.t -> (string * int) Lwt.t
val genesis_commitment : sc_rollup:string -> Client.t -> Sc_rollup_client.commitment Lwt.t

genesis_commitment ~sc_rollup client returns the genesis commitment, fails if this commitment have been cleaned from the context.

val call_rpc : smart_rollup_node:Sc_rollup_node.t -> service:string -> Tezt.JSON.t Lwt.t

call_rpc ~smart_rollup_node ~service call the RPC for service on smart_rollup_node.

OCaml

Innovation. Community. Security.