1

I am trying to use ethjs.js to listen to pending transactions, but nothing really worked. Does anyone have a working example fetching pending transactions with ethjs.js?

I have tried the following:

https://github.com/ethjs/ethjs/blob/master/docs/user-guide.md#ethnewpendingtransactionfilter

https://github.com/ethjs/ethjs/blob/master/docs/user-guide.md#ethfilter

Thanks!

0

If you have the transaction hash you can use ethjs-query. ethjs-query supports all Ethereum specified RPC methods.

 eth.getTransactionByHash(tHash)
     .then((result) => {
        alert(result['blockHash']);
     })
     .catch((error) => {
          alert(error.message);
     });

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.