replace fmt with errors
Co-authored-by: Marius van der Wijden <m.vanderwijden@live.de>
This commit is contained in:
parent
6b69f4c90c
commit
7b6f0eadd7
|
@ -126,7 +126,7 @@ var (
|
||||||
func (_{{$contract.Type}} *{{$contract.Type}}) Unpack{{.Normalized.Name}}Event(log types.Log) (*{{$contract.Type}}{{.Normalized.Name}}, error) {
|
func (_{{$contract.Type}} *{{$contract.Type}}) Unpack{{.Normalized.Name}}Event(log types.Log) (*{{$contract.Type}}{{.Normalized.Name}}, error) {
|
||||||
event := "{{.Normalized.Name}}"
|
event := "{{.Normalized.Name}}"
|
||||||
if log.Topics[0] != _{{$contract.Type}}.abi.Events[event].ID {
|
if log.Topics[0] != _{{$contract.Type}}.abi.Events[event].ID {
|
||||||
return nil, fmt.Errorf("event signature mismatch")
|
return nil, errors.New("event signature mismatch")
|
||||||
}
|
}
|
||||||
out := new({{$contract.Type}}{{.Normalized.Name}})
|
out := new({{$contract.Type}}{{.Normalized.Name}})
|
||||||
if len(log.Data) > 0 {
|
if len(log.Data) > 0 {
|
||||||
|
|
Loading…
Reference in New Issue