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

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.

| improve this answer | |
  • 1
    I understand thanks to you! – Pierogi Mar 24 at 4:35

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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