From 42c7b004ecb44927947bb9b42a28cbce0dbeb9f6 Mon Sep 17 00:00:00 2001 From: bruno Date: Tue, 26 Jun 2018 12:36:00 +0200 Subject: [PATCH] Alpha/Test/helpers: add call to delegate RPC --- src/proto_alpha/lib_protocol/test/helpers/context.ml | 3 +++ src/proto_alpha/lib_protocol/test/helpers/context.mli | 1 + 2 files changed, 4 insertions(+) diff --git a/src/proto_alpha/lib_protocol/test/helpers/context.ml b/src/proto_alpha/lib_protocol/test/helpers/context.ml index ba72e695a..9413fdaf4 100644 --- a/src/proto_alpha/lib_protocol/test/helpers/context.ml +++ b/src/proto_alpha/lib_protocol/test/helpers/context.ml @@ -139,6 +139,9 @@ module Contract = struct Alpha_services.Contract.manager_key rpc_ctxt ctxt contract >>=? fun (_, res) -> return (res <> None) + let delegate ctxt contract = + Alpha_services.Contract.delegate rpc_ctxt ctxt contract + let delegate_opt ctxt contract = Alpha_services.Contract.delegate_opt rpc_ctxt ctxt contract diff --git a/src/proto_alpha/lib_protocol/test/helpers/context.mli b/src/proto_alpha/lib_protocol/test/helpers/context.mli index 97c172676..6bd38043c 100644 --- a/src/proto_alpha/lib_protocol/test/helpers/context.mli +++ b/src/proto_alpha/lib_protocol/test/helpers/context.mli @@ -48,6 +48,7 @@ module Contract : sig val manager: t -> Contract.t -> Account.t tzresult Lwt.t val is_manager_key_revealed: t -> Contract.t -> bool tzresult Lwt.t + val delegate: t -> Contract.t -> public_key_hash tzresult Lwt.t val delegate_opt: t -> Contract.t -> public_key_hash option tzresult Lwt.t end