web3j icon indicating copy to clipboard operation
web3j copied to clipboard

TransactionResult has not getters to get the params of a transaction

Open Swarmxcy opened this issue 9 years ago • 4 comments

We can get List after calling EthBlock.getBlock().getTransactions() or EthBlock.getResult().getTransactions(). However, It seems that we can get nothing from an TransactionResult object. There is no getter to get the "input, from, to" params of a transaction.

Swarmxcy avatar Mar 10 '17 13:03 Swarmxcy

Are you requesting full transaction objects in your requests? i.e.

EthBlock ethBlock = web3j.ethGetBlockByHash("0x...", true)

conor10 avatar Mar 11 '17 04:03 conor10

Closing as no further information provided.

conor10 avatar Mar 19 '17 20:03 conor10

I'm also having a similar issue. Anyone able to figure this out?

andrewnguyen22 avatar Jan 26 '18 16:01 andrewnguyen22

@andrewnguyen22 you have to call the get() method on the TransactionResult object and cast the return object to org.web3j.protocol.core.methods.response.Transaction:

Transaction tx = (Transaction) transactionResult.get();

Daantie avatar Feb 01 '18 15:02 Daantie