From c71ad6a5db48e523a3e28462aeb4a208367157d4 Mon Sep 17 00:00:00 2001 From: Evgenii Stratonikov Date: Mon, 6 Apr 2020 15:33:44 +0300 Subject: [PATCH] cli: output contract after compiling only with --verbose flag Also remove Debug from compiler option as it is used only in CLI. --- cli/smartcontract/smart_contract.go | 5 +++-- pkg/compiler/compiler.go | 3 --- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/cli/smartcontract/smart_contract.go b/cli/smartcontract/smart_contract.go index 73724393e..df273c39e 100644 --- a/cli/smartcontract/smart_contract.go +++ b/cli/smartcontract/smart_contract.go @@ -351,7 +351,6 @@ func contractCompile(ctx *cli.Context) error { o := &compiler.Options{ Outfile: ctx.String("out"), - Debug: ctx.Bool("verbose"), DebugInfo: ctx.String("emitdebug"), } @@ -360,7 +359,9 @@ func contractCompile(ctx *cli.Context) error { 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 {