diff --git a/cli/smartcontract/smart_contract.go b/cli/smartcontract/smart_contract.go index 7891807e6..e1445b867 100644 --- a/cli/smartcontract/smart_contract.go +++ b/cli/smartcontract/smart_contract.go @@ -89,11 +89,11 @@ func NewCommands() []cli.Command { Usage: "Output of the compiled contract", }, cli.BoolFlag{ - Name: "debug, d", - Usage: "Debug mode will print out additional information after a compiling", + Name: "verbose, v", + Usage: "Print out additional information after a compiling", }, cli.StringFlag{ - Name: "emitdebug", + Name: "debug, d", Usage: "Emit debug info in a separate file", }, }, @@ -351,16 +351,17 @@ func contractCompile(ctx *cli.Context) error { o := &compiler.Options{ Outfile: ctx.String("out"), - Debug: ctx.Bool("debug"), - DebugInfo: ctx.String("emitdebug"), + DebugInfo: ctx.String("debug"), } result, err := compiler.CompileAndSave(src, o) if err != nil { return cli.NewExitError(err, 1) } - fmt.Println(hex.EncodeToString(result)) + if ctx.Bool("verbose") { + fmt.Println(hex.EncodeToString(result)) + } return nil } diff --git a/pkg/compiler/compiler.go b/pkg/compiler/compiler.go index cebfd3e1b..e53c3eaac 100644 --- a/pkg/compiler/compiler.go +++ b/pkg/compiler/compiler.go @@ -26,9 +26,6 @@ type Options struct { // The name of the output for debug info. DebugInfo string - - // Debug outputs a hex encoded string of the generated bytecode. - Debug bool } type buildInfo struct {