Skip to main content
Elio Decolli's user avatar
Elio Decolli's user avatar
Elio Decolli's user avatar
Elio Decolli
  • Member for 6 years, 7 months
  • Last seen more than 3 years ago
awarded
awarded
awarded
comment
go-ethereum event subscriptions doesn't work?
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.
comment
go-ethereum event subscriptions doesn't work?
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
awarded
comment
safest and most convenient way to iterate through items
That's what I did as a workaround, thanks a lot anyways =]
comment
safest and most convenient way to iterate through items
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
Loading…
comment
go-ethereum event subscriptions doesn't work?
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?
awarded
accepted
asked
Loading…
awarded
awarded
asked
Loading…