Distinguish parameter and storage arguments in --help
This commit is contained in:
parent
6bb5a0f731
commit
fdfb00b7a6
@ -57,9 +57,9 @@ let entry_point n =
|
||||
info ~docv ~doc [] in
|
||||
required @@ pos n (some string) (Some "main") info
|
||||
|
||||
let expression n =
|
||||
let expression purpose n =
|
||||
let open Arg in
|
||||
let docv = "EXPRESSION" in
|
||||
let docv = purpose ^ "_EXPRESSION" in
|
||||
let doc = "$(docv) is the expression that will be compiled." in
|
||||
let info = info ~docv ~doc [] in
|
||||
required @@ pos n (some string) None info
|
||||
@ -97,7 +97,7 @@ let compile_parameter =
|
||||
ok ()
|
||||
in
|
||||
let term =
|
||||
Term.(const f $ source 0 $ entry_point 1 $ expression 2 $ syntax) in
|
||||
Term.(const f $ source 0 $ entry_point 1 $ expression "PARAMETER" 2 $ syntax) in
|
||||
let cmdname = "compile-parameter" in
|
||||
let docs = "Subcommand: compile parameters to a michelson expression. The resulting michelson expression can be passed as an argument in a transaction which calls a contract. See `ligo " ^ cmdname ^ " --help' for a list of options specific to this subcommand." in
|
||||
(term , Term.info ~docs cmdname)
|
||||
@ -112,7 +112,7 @@ let compile_storage =
|
||||
ok ()
|
||||
in
|
||||
let term =
|
||||
Term.(const f $ source 0 $ entry_point 1 $ expression 2 $ syntax) in
|
||||
Term.(const f $ source 0 $ entry_point 1 $ expression "STORAGE" 2 $ syntax) in
|
||||
let cmdname = "compile-storage" in
|
||||
let docs = "Subcommand: compile an initial storage in ligo syntax to a michelson expression. The resulting michelson expression can be passed as an argument in a transaction which originates a contract. See `ligo " ^ cmdname ^ " --help' for a list of options specific to this subcommand." in
|
||||
(term , Term.info ~docs cmdname)
|
||||
@ -126,7 +126,7 @@ let dry_run =
|
||||
ok ()
|
||||
in
|
||||
let term =
|
||||
Term.(const f $ source 0 $ entry_point 1 $ expression 2 $ expression 3 $ syntax) in
|
||||
Term.(const f $ source 0 $ entry_point 1 $ expression "PARAMETER" 2 $ expression "STORAGE" 3 $ syntax) in
|
||||
let cmdname = "dry-run" in
|
||||
let docs = "Subcommand: run a smart-contract with the given storage and input." in
|
||||
(term , Term.info ~docs cmdname)
|
||||
@ -140,7 +140,7 @@ let run_function =
|
||||
ok ()
|
||||
in
|
||||
let term =
|
||||
Term.(const f $ source 0 $ entry_point 1 $ expression 2 $ syntax) in
|
||||
Term.(const f $ source 0 $ entry_point 1 $ expression "PARAMETER" 2 $ syntax) in
|
||||
let cmdname = "run-function" in
|
||||
let docs = "Subcommand: run a function with the given parameter." in
|
||||
(term , Term.info ~docs cmdname)
|
||||
|
Loading…
Reference in New Issue
Block a user