cli: output contract after compiling only with --verbose flag

Also remove Debug from compiler option as it is used only in CLI.
This commit is contained in:
Evgenii Stratonikov 2020-04-06 15:33:44 +03:00
parent 73c7b408b7
commit c71ad6a5db
2 changed files with 3 additions and 5 deletions

View file

@ -351,7 +351,6 @@ func contractCompile(ctx *cli.Context) error {
o := &compiler.Options{ o := &compiler.Options{
Outfile: ctx.String("out"), Outfile: ctx.String("out"),
Debug: ctx.Bool("verbose"),
DebugInfo: ctx.String("emitdebug"), DebugInfo: ctx.String("emitdebug"),
} }
@ -360,7 +359,9 @@ func contractCompile(ctx *cli.Context) error {
if err != nil { if err != nil {
return cli.NewExitError(err, 1) return cli.NewExitError(err, 1)
} }
if ctx.Bool("verbose") {
fmt.Println(hex.EncodeToString(result)) fmt.Println(hex.EncodeToString(result))
}
return nil return nil
} }

View file

@ -26,9 +26,6 @@ type Options struct {
// The name of the output for debug info. // The name of the output for debug info.
DebugInfo string DebugInfo string
// Debug outputs a hex encoded string of the generated bytecode.
Debug bool
} }
type buildInfo struct { type buildInfo struct {