package tezos-011-PtHangz2-test-helpers

  1. Overview
  2. Docs
include module type of struct include Common end
val wrap : 'a Tezos_protocol_011_PtHangz2.Protocol.Environment.Error_monad.tzresult -> 'a Tezos_base__TzPervasives.tzresult Lwt.t
val assert_true : (bool, 'a) result Lwt.t -> (unit, 'a) result Lwt.t
val assert_false : (bool, 'a) result Lwt.t -> (unit, 'a) result Lwt.t
val assert_some : ('a option, 'b) result Lwt.t -> ('a, 'b) result Lwt.t
val assert_none : ('a option, 'b) result Lwt.t -> (unit, 'b) result Lwt.t
val assert_error : ('a, 'b) result Lwt.t -> (unit, 'c) result Lwt.t
val print : ?prefix:string -> 'a Data_encoding.Encoding.t -> 'a -> unit
val to_hex : 'a -> 'a Data_encoding.Encoding.t -> string
val randomized_byte : ?pos:int -> 'a -> 'a Data_encoding.Encoding.t -> 'a
type wallet = Common.wallet = {
  1. sk : Tezos_sapling.Core.Wallet.Spending_key.t;
  2. vk : Tezos_sapling.Core.Wallet.Viewing_key.t;
}
val wallet_gen : unit -> wallet
val gen_addr : int -> Tezos_sapling.Core.Client.Viewing_key.t -> Tezos_sapling.Core.Client.Viewing_key.address list
val gen_nf : unit -> Tezos_sapling.Core.Client.Nullifier.t
val gen_cm_cipher : memo_size:int -> unit -> Tezos_sapling.Core.Client.Commitment.t * Tezos_sapling.Core.Client.Ciphertext.t
val client_state_of_diff : memo_size:int -> (Tezos_sapling.Core.Validator.Hash.t * Tezos_protocol_011_PtHangz2.Protocol.Alpha_context.Sapling.diff) -> Tezos_sapling.Storage.state
include module type of struct include Contract_helpers end
val init : unit -> (Block.t * Tezos_base__TzPervasives.Signature.public_key_hash * Tezos_protocol_011_PtHangz2.Protocol.Alpha_context.Contract.t * Tezos_protocol_011_PtHangz2.Protocol.Alpha_context.Contract.t, Tezos_base__TzPervasives.tztrace) result Lwt.t

Initializes 2 addresses to do only operations plus one that will be used to bake.

val run_script : Tezos_raw_protocol_011_PtHangz2.Alpha_context.t -> ?step_constants: Tezos_protocol_011_PtHangz2.Protocol.Script_interpreter.step_constants -> string -> ?entrypoint:string -> storage:string -> parameter:string -> unit -> (Tezos_protocol_011_PtHangz2.Protocol.Script_interpreter.execution_result * (Tezos_raw_protocol_011_PtHangz2.Script_ir_translator.ex_script * int), Tezos_base__TzPervasives.error Tezos_base__TzPervasives.trace) result Lwt.t

Helper function that parses and types a script, its initial storage and parameters from strings. It then executes the typed script with the storage and parameter and returns the result.

Returns a block in which the contract is originated. Also returns the associated anti-replay string and KT1 address.

val hex_shield : memo_size:int -> wallet -> string -> string
val shield : memo_size:int -> Tezos_sapling.Forge.Core.Spending_key.t -> int -> Tezos_sapling.Core.Wallet.Viewing_key.t -> (string -> 'a) -> string -> 'a list * int
val next_block : Block.t -> Tezos_protocol_011_PtHangz2.Protocol.Alpha_context.Operation.packed -> (Block.t, Tezos_base__TzPervasives.tztrace) result Lwt.t