From 21c5a287f91640f383bc09ffe97d922999e171c7 Mon Sep 17 00:00:00 2001 From: Richard Creighton Date: Tue, 12 May 2026 14:02:40 +0100 Subject: [PATCH] cmd/abigen: respect --v2=false (#34943) Passing `--v2=false` currently still selects the v2 binding generator because the command checks whether the flag was set. This switches generation to use the boolean flag value, so explicit false continues to generate legacy bindings while `--v2` keeps selecting v2. --- cmd/abigen/main.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmd/abigen/main.go b/cmd/abigen/main.go index c82358be49..d9d1fa02ac 100644 --- a/cmd/abigen/main.go +++ b/cmd/abigen/main.go @@ -215,7 +215,7 @@ func generate(c *cli.Context) error { code string err error ) - if c.IsSet(v2Flag.Name) { + if c.Bool(v2Flag.Name) { code, err = abigen.BindV2(types, abis, bins, c.String(pkgFlag.Name), libs, aliases) } else { code, err = abigen.Bind(types, abis, bins, sigs, c.String(pkgFlag.Name), libs, aliases)