miguelmota / ethereum-development-with-go-book

📖 A little guide book on Ethereum Development with Go (golang)
https://goethereumbook.org
Other
1.74k stars 427 forks source link

Unpack parameters has changed #55

Closed ncitron closed 2 years ago

ncitron commented 3 years ago

In the ebook, ABI.Unpack takes three arguments: interface{}, string and []byte. This seems to have changed in the recent versions of geth, which now has Unpack not take an interface, and instead returns a []interface{} representing the event's data.

aquavirgo commented 3 years ago

Hi, please consider use UnpackIntoInterface(&transferEvent, "Transfer", vLog.Data)

best regards

stale[bot] commented 2 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.