0

I am using Quicknode and ether.js to monitor pending transactions using the following code:

provider.on("pending", async (tx) => {
  provider.getTransaction(tx).then(function (transaction) {

    if (transaction != null && transaction['data'].includes(myAddress)) {
      console.log(transaction['data']);
      console.log(transaction['hash']);
      console.log(transaction);
    }

   })})

I have also used transaction.from instead of checking the whole transaction data.

I can find plenty of pending transactions if I don't include myAddress. However, I seem to miss every single of my own pending transactions. I have read here that sometimes not all pending transactions are retrieved. In this case, I have tried retrieving my pending transaction half a dozen times and have never found it. Why can't I see my pending transactions??

1 Answer 1

0

For anyone finding this thread in the future Apart from current maintenance this is the reason according to Quicknode customer support:

First, no provider is capable of seeing the ENTIRE mempool at all times. It's a p2p network and the mempool is not consistent across all endpoints at all times. There are even private mempools and peers that do not broadcast transactions on the network. [...] Also, we do not send transactions to the same node that you're listening to transactions on, which goes back to the whole not every node will see every possible pending transaction problem.

1
  • Hi, where did you find that info? Also, were you using Polygon testnet?
    – Téwa
    Commented Sep 29, 2022 at 21:46

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.