have a small query
when i try to get the Tx by hash
tx,pending,err:=Client.TransactionByHash(context.Background(), txhash)
tx does not have the from value to know who actually sent the tx am i missing something?
It seems highly unlikely. I don't program in Go, but if your library that provides Client.TransactionByHash has documentation, I would check into that function and look into the return types. What library is it?
its the og geth lib I kinda made my own struct around it and ig got it working just gotta test if it works fr as in the lib the returned value does not hold from in it its saved locally and to retrieve gotta call another function for which i dont get enough data from the first function so had to look and make own struct with all the stuff I need
Yeah, it looks like you don't get from from a Transaction, but you can get it from a Message, but it also says a future PR will remove it. This might help a bit: https://github.com/ethereum/go-ethereum/blob/d575a2d3bc76dfbdefdd68b6cffff115542faf75/core/types/transaction.go#L560
Обсуждают сегодня