Replies: 2 comments 6 replies
-
Moved to discussions. That is unfortunately the only way to do things with the currently (widely) available APIs. Many backend services do not even allow for the There may be third-party services that provide an API to monitoring the mempool, but I don't know them. Anyone know of one? Sorry.y :( |
Beta Was this translation helpful? Give feedback.
0 replies
-
Okay, thanks. One more question that maybe fits in here: |
Beta Was this translation helpful? Give feedback.
6 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Good day!
I'm trying to get all the pending transactions from a specific contract. But currently my code looks something like this:
this.rpcProvider.on('pending', tx => { this.rpcProvider.getTransaction(tx).then(async transaction => { if (transaction && transaction.to === this.CONTRACT_ADDR) { // SOME CODE HERE } });
Now the thing is, that I have to call getTransaction(tx) for every pending transaction out there to find the few pending transactions I'm interested in and this causes my machine to slow down eventually. So is there any way to filter the pending transactions beforehand?
Thanks
Beta Was this translation helpful? Give feedback.
All reactions