Skip to content

Testing framework: expose functions for contract compilation and origination

E. Rivas requested to merge er433/test/expose-michelson_contract into dev

type:breaking

For LIGO developers

This MR introduces a new primitive for reading .tz contracts in the testing framework, and also exposes other primitives as functions in Test.

Changelog details:

New Test type and functions

  • type michelson_contract: representing Michelson contracts.
  • Test.compile_contract_from_file : string -> string -> string list -> michelson_contract
  • Test.compile_contract : ('param * 'storage -> operation list * 'storage) -> michelson_contract
  • Test.read_contract_from_file : string -> michelson_contract
  • Test.originate_contract : michelson_contract -> michelson_program -> tez -> address
  • Test.size : michelson_contract -> int

Breaking changes in Test types, now they return michelson_contract instead of michelson_program:

  • Test.originate_from_file : string -> string -> string list -> michelson_program -> tez -> address * michelson_contract * int
  • Test.originate : ('param * 'storage -> operation list * 'storage) -> 'storage -> tez -> (('param, 'storage) typed_address * michelson_contract * int)

Most usages ignore this result, but might break some tests in case they are too annotated.

Edited by E. Rivas

Merge request reports