replace fmt with errors

Co-authored-by: Marius van der Wijden <m.vanderwijden@live.de>
This commit is contained in:
Sina Mahmoodi 2023-03-01 13:03:08 +03:30 committed by Jared Wasinger
parent efc2c36291
commit 2725ae2bcb
1 changed files with 1 additions and 1 deletions

View File

@ -126,7 +126,7 @@ var (
func (_{{$contract.Type}} *{{$contract.Type}}) Unpack{{.Normalized.Name}}Event(log types.Log) (*{{$contract.Type}}{{.Normalized.Name}}, error) {
event := "{{.Normalized.Name}}"
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}})
if len(log.Data) > 0 {