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


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.

| improve this answer | |

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.