r/ethdev • u/Bardia49 • 16d ago
Question Smart Contracts
Hi everybody, i wanted to know if anyone here ever worked with smart contracts in Go?
My main focus is to read the events(basically reading results) from my smart contracts, if anyone can recommend me some free resources would be great.
0
Upvotes
1
3
u/Bloqarl 16d ago
goethereumbook.org is free and has chapters on reading and subscribing to event logs with go-ethereum. I'd run abigen on your ABI so you get typed methods like FilterTransfer and WatchTransfer instead of decoding logs by hand, and if you subscribe, check log.Removed, that's how a reorg tells you an event you already processed is gone.