how do you check the number off transaction confirmations of an ethereum transaction using web3j?

by yemista   Last Updated January 14, 2018 06:28 AM

I looked through the documentation but there doesnt seem to be mention of this. I tried to debug it and look at the status of the transaction receipt but it is always null. Is there any way to do this?

Tags : web3j

Answers 1

Generally, what people mean when they count the number of confirmations is how many blocks there have been since the one the given transaction was in.

So all you need to do is find out the current block number (web3.eth.getBlockNumber(function (err, number) { ... });) and then subtract the block number from your transaction receipt.

January 14, 2018 06:05 AM

Related Questions

How to use web3j to observe transaction of ERC20 token

Updated October 30, 2017 05:28 AM

Why block number is kept BigInteger in Web3j?

Updated November 06, 2017 15:28 PM

How to create ethreum wallet using WEB3j

Updated November 15, 2017 04:28 AM