accounts/abi/abigen: simplify calculation whether or not a method's outputs should be gathered into a struct

This commit is contained in:
Jared Wasinger 2025-02-17 17:03:06 -08:00
parent ab6643b775
commit e97cef6365

View file

@ -175,8 +175,8 @@ func (cb *contractBinder) bindMethod(original abi.Method) error {
cb.binder.BindStructType(output.Type)
}
}
isStructured := structured(original.Outputs)
var isStructured bool
// If the call returns multiple values, gather them into a struct
if len(normalized.Outputs) > 1 {
isStructured = true