Stack Exchange network consists of 183 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.
Also "WatchXXXX()" is pretty easy to use and lets you access logs from a newly deployed contract, I think you should add FIlter and Watch too on the guide.
Actually by calling "FilterXXXX()" from the contract's struct in go we can also access each event from a specified contract, there are two more fields in the bind.FilterOpts which I don't know what are there for yet. pastebin.com/F0fJtDLg
hello, I actually used mappings as a wrapper, if toBytes(Customers[address].sender).length == 0 then it's not initialized therefore it's not present in the collection, if it is then I can easily access it with indexing. btw "toBytes(address)" is a function I found here which converts the given address to bytes
I've actually got my code working, seems that the transaction wasn't included in any block, that is why the event wasn't parsed (came to this conclusion while debugging in remix). It worked fine after that, btw, in that guide book he mentioned a "From" and a "To" block, which I guess means that we have to specify which blocks we have to listen for events? I mean I can easily get the block # from code but isn't it a little bit unneeded? And furthermore how can I be sure that the method mentioned in the guide is the best approach?