Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
script to Wait till got the transaction result
async function waitForTxToBeMined (txHash) {
let txReceipt
while (!txReceipt) {
try {
txReceipt = await eth.getTransactionReceipt(txHash)
} catch (err) {
return indicateFailure(err)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment