1

I see this document.
But I don't understand what is an index position of an uncle.

I'd like to get informations of uncle blocks like etherscan.io

However I don't know a value of the index position what should be set.

1 Answer 1

1

In a block multiple uncles can be included. This method returns only one uncle.

web3.eth.getUncle(blockHashOrBlockNumber, uncleIndex [, callback])

uncleIndex is a number starting from 0 which represents which uncle will be returned.

If for example a block has 2 uncles, the first uncle has uncleIndex=0 while the second uncle has uncleIndex=1.

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.