Using PubSub to monitor transactions on a set of addresses

We’re thinking of using Infura to monitor transactions on a set of addresses we give it. I believe this is possible but looking at the docs I’m a little unclear on how you’d do this. I’d prefer to use PubSub. Would we use one of these methods and pass it an array of ETH addresses? How can/would we filter or incoming/outgoing transactions?

Hello @KidA001 and welcome to the Infura community!

What kind of information you are looking to collect from subscription?
You can specify subscriptions to ‘logs’ or ‘newHeads’ which will be more descriptive.

After subscribing, it might be more efficient for you to filter client-side. Would that work for your use case? Or you can use some of the filtering methods Infura - Filter-Methods

Thanks for the response and sorry for my slow reply, I didn’t see it until now.

I’m just looking to see that a transaction occurred on a set of addresses and then to get the txn_hash of the transaction. Would subscribing to logs be the most efficient for this? I also see newPendingTransactionsbut it’s unclear to me what data is returned these different subscriptions, not seeing any details in docs but I could have missed it.

Additionally when adding/removing an address to the logs subscription is there a limitation to the number of addresses per subscription?

@KidA001 please check out these articles, they will give you a more descriptive explanation:

https://medium.com/coinmonks/monitoring-an-ethereum-address-with-web3-js-970c0a3cf96d
https://medium.com/pixelpoint/track-blockchain-transactions-like-a-boss-with-web3-js-c149045ca9bf