web3.js icon indicating copy to clipboard operation
web3.js copied to clipboard

Docs: getTransaction documentation incorrect

Open BlockChange opened this issue 10 years ago • 1 comments

Right here: https://github.com/ethereum/wiki/wiki/JavaScript-API#web3ethgettransaction

It says:

web3.eth.getTransaction(transactionHash [, callback])

Then the example goes:

web3.eth.getTransaction(blockNumber, indexOfTransaction);

So: blockNumber has to be transactionHash, and I don't even know where indexOfTransaction is coming from, it's used nowhere else and seems to be confused with the getTransactionFromBlock example.

(Also: someone should test this on testrpc, it returns null every time, see: https://github.com/ethereumjs/testrpc/issues/121)

(Update: geth also returns null)

BlockChange avatar Jul 14 '16 11:07 BlockChange

Thanks, fixed the docs.

frozeman avatar Aug 10 '17 12:08 frozeman