package tezt-tezos
Helpers built upon the Sc_rollup_node and Sc_rollup_client
val hooks : Tezt.Process.hooks
Hooks that handles hashes specific to smart rollups.
hex_encode s
returns the hexadecimal representation of the given string s
.
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
.
val prepare_installer_kernel :
?runner:Tezt.Runner.t ->
?base_installee:string ->
preimages_dir:string ->
string ->
string Lwt.t
prepare_installer_kernel ~base_installee ~preimages_dir 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.
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 setup_l1 :
?commitment_period:int ->
?challenge_window:int ->
?timeout:int ->
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 ->
?alias:string ->
?src:string ->
kind:string ->
?parameters_ty:string ->
?boot_sector:string ->
Client.t ->
string Lwt.t
originate_sc_rollup
is a wrapper above
lient.originate_sc_rollup
that waits for the block to be included.
default_boot_sector_of k
returns a valid boot sector for a PVM of kind kind
.
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.