Wait for transfer tx receipts when configuring Optimism

This commit is contained in:
Prathamesh Musale 2023-04-13 12:27:52 +05:30
parent 6b27731a81
commit b45925fca0

View File

@ -16,7 +16,11 @@ task('send-balance', 'Sends Ether to a specified Ethereum account')
to,
value: ethers.utils.parseEther(amount),
})
const txReceipt = await tx.wait()
console.log(`Balance sent to: ${to}, from: ${wallet.address}`)
console.log(
`Block: { number: ${txReceipt.blockNumber}, hash: ${txReceipt.blockHash} }`
)
console.log(`Transaction hash: ${tx.hash}`)
})