Skip to content

Commit 4d2706c

Browse files
jwasingerfjl
authored andcommitted
add TODO note about cleaning up template code for return values
1 parent 1b7aece commit 4d2706c

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

accounts/abi/bind/source2.go.tpl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,7 @@ var (
8686
{{.Name}} {{bindtype .Type $structs}}{{end}}
8787
}
8888
{{ end }}
89+
// TODO: if return count > 1, we return a struct. no need to iterate .Normalized.Outputs here (but double-check this and remove this TODO once confirmed).
8990
func ({{ decapitalise $contract.Type}} *{{$contract.Type}}) Unpack{{.Normalized.Name}}(data []byte) ({{if .Structured}} {{.Normalized.Name}}Output,{{else}}{{range .Normalized.Outputs}}{{bindtype .Type $structs}},{{end}}{{end}} error) {
9091
out, err := {{ decapitalise $contract.Type}}.abi.Unpack("{{.Original.Name}}", data)
9192
{{if .Structured}}

0 commit comments

Comments
 (0)