Get txs with data of an address


how can I get all the ethereum transactions that contains ‘mydata’ of a specific address? if possible using web3js and with only one api call


Hey @damland, you’ll want to use the web3.eth.subscribe function described here:
Alternatively, there’s a great library called Subspace built on top of web3.js that I just wrote a post about here:

Are you looking for every transaction containing ‘mydata’ from every block ever, or each newly mined block?

Using web3.eth.subscribe will it be considered a request call to infura for every tx find? If for example a new pending tx is found and I have 100 users in that page will it make 100 requests at the same time?

@Sean_Infura every transaction containing ‘mydata’ from every block ever, Thanks

Each of those 100 users will be in 1 request. So conceivably each block could be 1 request. I think has a great overview of how to subscribe to events for “mydata”

I have this very same problem: (no error and no result)
eth.subscribe using infura does it work only for contracts?

Hey, based on your other question on the forum it looks like you got this solved.

its working but only for contracts