mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-05-13 19:46:39 +00:00
replace fmt with errors
Co-authored-by: Marius van der Wijden <m.vanderwijden@live.de>
This commit is contained in:
parent
efc2c36291
commit
2725ae2bcb
1 changed files with 1 additions and 1 deletions
|
|
@ -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 a new issue