0

I deployed a smart contract and done some transactions. Now I want to see the transaction receipt of the transactions. So I wrote this code:

 var Web3 = require('web3');
 var web3 = new Web3(new 
 Web3.providers.HttpProvider('https://rinkeby.infura.io/IHyXTwb......Pu')); 
 var txR 
 =web3.eth.getTransactionReceipt("0x1333fbc20a9ad2bb56264.......d6576c");
 console.log(txR);

I am getting

promise pending

1

According to documentation, web3.eth.getTransactionReceipt returns Promise to return Object. Try passing callback to the function as second argument:

web3.eth.getTransactionReceipt("0x1333fbc20a9ad2bb56264.......d6576c", (txR) => {
  console.log(txR);
});

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.