Can eth_subscribe method subscribe to multiple topic types?

For the eth_subscribe method here:

Can I subscribe (listen for) multiple topic types from the same Ethereum contract?

For example: given a Uniswap v2 pool address, I want to listen for burn, mint, and swap events. I use the logs -> topics parameter. Can I filter to listen for burn, mint, and swap topics in ONE eth_subscribe method? Or do I need MULTIPLE eth_subscribe topics?


Hi @Unblended9843,

Check this out:

the topics is an array so it accepts several topics.

1 Like

This topic was automatically closed after 30 days. New replies are no longer allowed.