All Questions
6 questions
2
votes
1
answer
132
views
How to correctly pack Log data in Go
Using go-ethereum, I want to convert a struct containing my log fields into a types.Log{} object containing the data bytes and topics. Essentially, I want to do the opposite of the Parse<EventName&...
1
vote
0
answers
196
views
Handling EOF when subscribing to Event Logs
I'm trying to subscribe to events logs to handle Transfer(address,address,uint64) events. I've followed this example.
https://github.com/miguelmota/ethereum-development-with-go-book/blob/master/en/...
0
votes
1
answer
868
views
Converting Log Topics to int64 correctly in Go
I currently use the code below to extract the ERC721 Token ID from Transfer Event Logs:
txHash := newLog.TxHash.Hex()
hexString := common.BytesToAddress(newLog.Topics[3].Bytes()).Hex()
flowerNum, _ :=...
8
votes
4
answers
10k
views
How to decode Log.Data in Go
I'm fetching the logs using client.SubscribeFilterLogs. The event parameters are encoded in types.Log.Data. How can I decode it in go?
3
votes
1
answer
1k
views
How to access non-indexed event arguments from Go types.Log?
The Go bindings have a type called Log that has the following fields
type Log struct {
// Consensus fields:
// address of the contract that generated the event
Address common.Address `...
2
votes
2
answers
3k
views
How to access the event log by knowing the contract address (golang)?
At the moment I develope dapps that use smart contract as storage for specific data. I use abigen to generate specific go binding to my contract. If someone try change state of the contract I use ...