aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--cmd/abigen/main.go11
1 files changed, 3 insertions, 8 deletions
diff --git a/cmd/abigen/main.go b/cmd/abigen/main.go
index b6ec04ce1..461c29468 100644
--- a/cmd/abigen/main.go
+++ b/cmd/abigen/main.go
@@ -81,7 +81,7 @@ func main() {
bins []string
types []string
)
- if *solFlag != "" || *vyFlag != "" || (*abiFlag == "-" && *pkgFlag == "") {
+ if *solFlag != "" || *vyFlag != "" || *abiFlag == "-" {
// Generate the list of types to exclude from binding
exclude := make(map[string]bool)
for _, kind := range strings.Split(*excFlag, ",") {
@@ -129,13 +129,8 @@ func main() {
}
} else {
// Otherwise load up the ABI, optional bytecode and type name from the parameters
- var abi []byte
- var err error
- if *abiFlag == "-" {
- abi, err = ioutil.ReadAll(os.Stdin)
- } else {
- abi, err = ioutil.ReadFile(*abiFlag)
- }
+ abi, err := ioutil.ReadFile(*abiFlag)
+
if err != nil {
fmt.Printf("Failed to read input ABI: %v\n", err)
os.Exit(-1)