In JavaScript (web3.js), how do I get the transaction-hash corresponding to a function executed in my smart contract?


1 Answer 1


When you send a transaction to a contract function, you get back the transaction hash:

var txHash = myContract.myFunction(param1, { from: you });

If there is a transaction that you need to find, look into your sender address at etherscan.io.

Your Answer

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

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