accounts/abi/bind: remove unecessary TODO from v2 template

This commit is contained in:
Jared Wasinger 2025-01-09 14:53:34 +08:00 committed by Felix Lange
parent 8c20a2c987
commit 5ae1de49c7

View file

@ -86,7 +86,6 @@ var (
{{.Name}} {{bindtype .Type $structs}}{{end}}
}
{{ end }}
// 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).
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) {
out, err := {{ decapitalise $contract.Type}}.abi.Unpack("{{.Original.Name}}", data)
{{if .Structured}}