diff --git a/src/proto_alpha/lib_protocol/entrypoint_repr.ml b/src/proto_alpha/lib_protocol/entrypoint_repr.ml index 7931a57a42c47fc91638b2d1107c4d96967b0f1e..f005430e6b2ac13c2714c73202527aa079970eba 100644 --- a/src/proto_alpha/lib_protocol/entrypoint_repr.ml +++ b/src/proto_alpha/lib_protocol/entrypoint_repr.ml @@ -159,6 +159,14 @@ let remove_delegate = of_string_strict_exn "remove_delegate" let deposit = of_string_strict_exn "deposit" +let stake = of_string_strict_exn "stake" + +let unstake = of_string_strict_exn "unstake" + +let finalize_unstake = of_string_strict_exn "finalize_unstake" + +let set_delegate_parameters = of_string_strict_exn "set_delegate_parameters" + let is_deposit = ( = ) deposit let is_root = ( = ) root @@ -212,6 +220,10 @@ let smart_encoding = builtin_case 3 set_delegate; builtin_case 4 remove_delegate; builtin_case 5 deposit; + builtin_case 6 stake; + builtin_case 7 unstake; + builtin_case 8 finalize_unstake; + builtin_case 9 set_delegate_parameters; case (Tag 255) ~title:"named" diff --git a/src/proto_alpha/lib_protocol/entrypoint_repr.mli b/src/proto_alpha/lib_protocol/entrypoint_repr.mli index cef8b2a63f21b930d7da054221406ddf297f2d5b..2582bb42396fe5037a1dc99821667635046b8f04 100644 --- a/src/proto_alpha/lib_protocol/entrypoint_repr.mli +++ b/src/proto_alpha/lib_protocol/entrypoint_repr.mli @@ -56,6 +56,18 @@ val remove_delegate : t (** Deposit entrypoint "deposit" *) val deposit : t +(** Entrypoint "stake" *) +val stake : t + +(** Entrypoint "unstake" *) +val unstake : t + +(** Entrypoint "finalize_unstake" *) +val finalize_unstake : t + +(** Entrypoint "set_delegate_parameters" *) +val set_delegate_parameters : t + (** Checks whether an entrypoint is the deposit entrypoint *) val is_deposit : t -> bool diff --git a/src/proto_alpha/lib_protocol/test/integration/test_adaptive_inflation_launch.ml b/src/proto_alpha/lib_protocol/test/integration/test_adaptive_inflation_launch.ml index 54debbc98538d10af44880c0d08d65253c51bc8c..bef383bf72842a56da3f7110f6145548a791a6d4 100644 --- a/src/proto_alpha/lib_protocol/test/integration/test_adaptive_inflation_launch.ml +++ b/src/proto_alpha/lib_protocol/test/integration/test_adaptive_inflation_launch.ml @@ -67,13 +67,9 @@ let assert_current_cycle ~loc (blk : Block.t) expected = assert_cycle_eq ~loc current_cycle expected let stake ctxt contract amount = - let open Lwt_result_wrap_syntax in - let*?@ entrypoint = - Protocol.Alpha_context.Entrypoint.of_string_strict ~loc:0 "stake" - in Op.transaction ctxt - ~entrypoint + ~entrypoint:Protocol.Alpha_context.Entrypoint.stake ~fee:Protocol.Alpha_context.Tez.zero contract contract @@ -81,12 +77,7 @@ let stake ctxt contract amount = let set_delegate_parameters ctxt delegate ~staking_over_baking_limit ~baking_over_staking_edge = - let open Lwt_result_wrap_syntax in - let*?@ entrypoint = - Protocol.Alpha_context.Entrypoint.of_string_strict - ~loc:0 - "set_delegate_parameters" - in + let entrypoint = Protocol.Alpha_context.Entrypoint.set_delegate_parameters in let parameters = Protocol.Alpha_context.Script.lazy_expr (Expr.from_string