From ba7a83d0f7d516d663a6833cc16b85187a55c1e9 Mon Sep 17 00:00:00 2001 From: Tom Jack Date: Sat, 2 Nov 2019 17:54:33 -0500 Subject: [PATCH] Deal with upstream MBytes changes --- src/passes/8-compiler/compiler_program.ml | 2 +- src/passes/8-compiler/uncompiler.ml | 2 +- vendors/ligo-utils/tezos-utils/x_michelson.ml | 1 - 3 files changed, 2 insertions(+), 3 deletions(-) diff --git a/src/passes/8-compiler/compiler_program.ml b/src/passes/8-compiler/compiler_program.ml index 5ec9d7a7c..6f033acc6 100644 --- a/src/passes/8-compiler/compiler_program.ml +++ b/src/passes/8-compiler/compiler_program.ml @@ -68,7 +68,7 @@ let rec translate_value (v:value) ty : michelson result = match v with | D_timestamp n -> ok @@ int (Z.of_int n) | D_mutez n -> ok @@ int (Z.of_int n) | D_string s -> ok @@ string s - | D_bytes s -> ok @@ bytes (Tezos_stdlib.MBytes.of_bytes s) + | D_bytes s -> ok @@ bytes s | D_unit -> ok @@ prim D_Unit | D_pair (a, b) -> ( let%bind (a_ty , b_ty) = get_t_pair ty in diff --git a/src/passes/8-compiler/uncompiler.ml b/src/passes/8-compiler/uncompiler.ml index 3e28f4db8..0ec7e8320 100644 --- a/src/passes/8-compiler/uncompiler.ml +++ b/src/passes/8-compiler/uncompiler.ml @@ -46,7 +46,7 @@ let rec translate_value ?bm_opt (Ex_typed_value (ty, value)) : value result = | (String_t _), s -> ok @@ D_string s | (Bytes_t _), b -> - ok @@ D_bytes (Tezos_stdlib.MBytes.to_bytes b) + ok @@ D_bytes b | (Address_t _), (s , _) -> ok @@ D_string (Alpha_context.Contract.to_b58check s) | (Unit_t _), () -> diff --git a/vendors/ligo-utils/tezos-utils/x_michelson.ml b/vendors/ligo-utils/tezos-utils/x_michelson.ml index 8f20e8c30..8e0654317 100644 --- a/vendors/ligo-utils/tezos-utils/x_michelson.ml +++ b/vendors/ligo-utils/tezos-utils/x_michelson.ml @@ -103,6 +103,5 @@ let pp_json ppf (michelson : michelson) = let pp_hex ppf (michelson : michelson) = let canonical = strip_locations michelson in let bytes = Tezos_data_encoding.Binary_writer.to_bytes_exn Script_repr.expr_encoding canonical in - let bytes = Tezos_stdlib.MBytes.to_bytes bytes in let hex = Hex.of_bytes bytes in Format.fprintf ppf "%a" Hex.pp hex