This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
async function getConfirmations(txHash) { | |
try { | |
// Instantiate web3 with HttpProvider | |
const web3 = new Web3('https://rinkeby.infura.io/') | |
// Get transaction details | |
const trx = await web3.eth.getTransaction(txHash) | |
// Get current block number | |
const currentBlock = await web3.eth.getBlockNumber() |