diff --git a/src/proto_alpha/lib_protocol/script_ir_translator.ml b/src/proto_alpha/lib_protocol/script_ir_translator.ml index 4f987a86ea9e37530283d00ceed79e053e2f27d5..ea3d29b5e7e00f0462321073f725db54d4670c1d 100644 --- a/src/proto_alpha/lib_protocol/script_ir_translator.ml +++ b/src/proto_alpha/lib_protocol/script_ir_translator.ml @@ -607,9 +607,13 @@ let rec parse_ty : | Prim (loc, T_key_hash, [], annot) -> check_type_annot loc annot >|? fun () -> return ctxt key_hash_t | Prim (loc, T_chest_key, [], annot) -> - check_type_annot loc annot >|? fun () -> return ctxt chest_key_t + if legacy then + check_type_annot loc annot >|? fun () -> return ctxt chest_key_t + else error (Deprecated_instruction T_chest_key) | Prim (loc, T_chest, [], annot) -> - check_type_annot loc annot >|? fun () -> return ctxt chest_t + if legacy then + check_type_annot loc annot >|? fun () -> return ctxt chest_t + else error (Deprecated_instruction T_chest) | Prim (loc, T_timestamp, [], annot) -> check_type_annot loc annot >|? fun () -> return ctxt timestamp_t | Prim (loc, T_address, [], annot) -> diff --git a/src/proto_alpha/lib_protocol/test/integration/michelson/test_timelock.ml b/src/proto_alpha/lib_protocol/test/integration/michelson/test_timelock.ml index 4f0ac0df7bca47364af7a62193fd5791d6792a45..7e548766f55d9d0f39ff06c8cae1d1c475bc88da 100644 --- a/src/proto_alpha/lib_protocol/test/integration/michelson/test_timelock.ml +++ b/src/proto_alpha/lib_protocol/test/integration/michelson/test_timelock.ml @@ -72,7 +72,7 @@ let deprecated_chest_open () = when List.mem ~equal:( = ) (Environment.Ecoproto_error - (Script_tc_errors.Deprecated_instruction I_OPEN_CHEST)) + (Script_tc_errors.Deprecated_instruction T_chest_key)) lst -> return () | Error errs ->