diff --git a/src/proto_alpha/lib_protocol/alpha_context.mli b/src/proto_alpha/lib_protocol/alpha_context.mli index e306f8e24ed2697c121aa63ba732f8657ca67b33..e4b743d75fb05ee16c32caf6b4999bd5a0995dbf 100644 --- a/src/proto_alpha/lib_protocol/alpha_context.mli +++ b/src/proto_alpha/lib_protocol/alpha_context.mli @@ -557,6 +557,10 @@ module Script : sig | D_True | D_Unit | D_Lambda_rec + | D_Transfer_tokens + | D_Set_delegate + | D_Create_contract + | D_Emit | I_PACK | I_UNPACK | I_BLAKE2B diff --git a/src/proto_alpha/lib_protocol/michelson_v1_primitives.ml b/src/proto_alpha/lib_protocol/michelson_v1_primitives.ml index 8c198be16e91493afd538e56476ac9bdc2e6ac2e..60e0fb1781204d8ff80d5c174564031bc1ef62cd 100644 --- a/src/proto_alpha/lib_protocol/michelson_v1_primitives.ml +++ b/src/proto_alpha/lib_protocol/michelson_v1_primitives.ml @@ -50,6 +50,10 @@ type prim = | D_True | D_Unit | D_Lambda_rec + | D_Transfer_tokens + | D_Set_delegate + | D_Create_contract + | D_Emit | I_PACK | I_UNPACK | I_BLAKE2B @@ -206,7 +210,8 @@ type namespace = let namespace = function | K_code | K_view | K_parameter | K_storage -> Keyword_namespace | D_Elt | D_False | D_Left | D_None | D_Pair | D_Right | D_Some | D_True - | D_Unit | D_Lambda_rec -> + | D_Unit | D_Lambda_rec | D_Transfer_tokens | D_Set_delegate + | D_Create_contract | D_Emit -> Constant_namespace | I_ABS | I_ADD | I_ADDRESS | I_AMOUNT | I_AND | I_APPLY | I_BALANCE | I_BLAKE2B | I_CAR | I_CAST | I_CDR | I_CHAIN_ID | I_CHECK_SIGNATURE @@ -263,6 +268,10 @@ let string_of_prim = function | D_True -> "True" | D_Unit -> "Unit" | D_Lambda_rec -> "Lambda_rec" + | D_Transfer_tokens -> "Transfer_tokens" + | D_Set_delegate -> "Set_delegate" + | D_Create_contract -> "Create_contract" + | D_Emit -> "Emit" | I_PACK -> "PACK" | I_UNPACK -> "UNPACK" | I_BLAKE2B -> "BLAKE2B" @@ -424,6 +433,10 @@ let prim_of_string = | "True" -> return D_True | "Unit" -> return D_Unit | "Lambda_rec" -> return D_Lambda_rec + | "Transfer_tokens" -> return D_Transfer_tokens + | "Set_delegate" -> return D_Set_delegate + | "Create_contract" -> return D_Create_contract + | "Emit" -> return D_Emit | "PACK" -> return I_PACK | "UNPACK" -> return I_UNPACK | "BLAKE2B" -> return I_BLAKE2B @@ -792,7 +805,13 @@ let prim_encoding = ("LAMBDA_REC", I_LAMBDA_REC); ("TICKET", I_TICKET); ("BYTES", I_BYTES); - ("NAT", I_NAT) + ("NAT", I_NAT); + (* /!\ NEW INSTRUCTIONS MUST BE ADDED AT THE END OF THE STRING_ENUM, FOR BACKWARD COMPATIBILITY OF THE ENCODING. *) + (* Alpha_019 addtitions *) + ("Transfer_tokens", D_Transfer_tokens); + ("Set_delegate", D_Set_delegate); + ("Create_contract", D_Create_contract); + ("Emit", D_Emit) (* New instructions must be added here, for backward compatibility of the encoding. *) (* Keep the comment above at the end of the list *); ] diff --git a/src/proto_alpha/lib_protocol/michelson_v1_primitives.mli b/src/proto_alpha/lib_protocol/michelson_v1_primitives.mli index 761631190abad0277bf956b546bdb0afc6f38448..f92bf18f64ac5e5c9575ad42df1a537884cc6294 100644 --- a/src/proto_alpha/lib_protocol/michelson_v1_primitives.mli +++ b/src/proto_alpha/lib_protocol/michelson_v1_primitives.mli @@ -62,6 +62,10 @@ type prim = | D_True | D_Unit | D_Lambda_rec + | D_Transfer_tokens + | D_Set_delegate + | D_Create_contract + | D_Emit | I_PACK | I_UNPACK | I_BLAKE2B