From cf7de5cc75cbec3217ab3864f88fb9828dec15a1 Mon Sep 17 00:00:00 2001 From: Galfour Date: Wed, 27 Jun 2018 22:30:59 +0200 Subject: [PATCH] Client: argument is now optional with no default in a transfer operation --- src/proto_alpha/lib_client/client_proto_args.ml | 3 +-- src/proto_alpha/lib_client/client_proto_args.mli | 2 +- .../lib_client_commands/client_proto_context_commands.ml | 2 +- 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/src/proto_alpha/lib_client/client_proto_args.ml b/src/proto_alpha/lib_client/client_proto_args.ml index ec039eb8b..439bb57b3 100644 --- a/src/proto_alpha/lib_client/client_proto_args.ml +++ b/src/proto_alpha/lib_client/client_proto_args.ml @@ -89,11 +89,10 @@ let init_arg = string_parameter let arg_arg = - default_arg + arg ~long:"arg" ~placeholder:"data" ~doc:"argument passed to the contract's script, if needed" - ~default:"Unit" string_parameter let delegate_arg = diff --git a/src/proto_alpha/lib_client/client_proto_args.mli b/src/proto_alpha/lib_client/client_proto_args.mli index ed669660f..115933e2e 100644 --- a/src/proto_alpha/lib_client/client_proto_args.mli +++ b/src/proto_alpha/lib_client/client_proto_args.mli @@ -16,7 +16,7 @@ val init_arg: (string, Proto_alpha.full) Clic.arg val fee_arg: (Tez.t, Proto_alpha.full) Clic.arg val gas_limit_arg: (Z.t option, Proto_alpha.full) Clic.arg val storage_limit_arg: (Z.t option, Proto_alpha.full) Clic.arg -val arg_arg: (string, Proto_alpha.full) Clic.arg +val arg_arg: (string option, Proto_alpha.full) Clic.arg val source_arg: (string option, Proto_alpha.full) Clic.arg val delegate_arg: (Signature.Public_key_hash.t option, Proto_alpha.full) Clic.arg diff --git a/src/proto_alpha/lib_client_commands/client_proto_context_commands.ml b/src/proto_alpha/lib_client_commands/client_proto_context_commands.ml index 63966bc53..6d768b678 100644 --- a/src/proto_alpha/lib_client_commands/client_proto_context_commands.ml +++ b/src/proto_alpha/lib_client_commands/client_proto_context_commands.ml @@ -304,7 +304,7 @@ let commands () = transfer cctxt ~chain:`Main ~block:cctxt#block ?confirmations:cctxt#confirmations ~dry_run - ~source ~fee ~src_pk ~src_sk ~destination ~arg ~amount ?gas_limit ?storage_limit () >>= + ~source ~fee ~src_pk ~src_sk ~destination ?arg ~amount ?gas_limit ?storage_limit () >>= report_michelson_errors ~no_print_source ~msg:"transfer simulation failed" cctxt >>= function | None -> return_unit | Some (_res, _contracts) ->