-
Hello,
Am I correct to assume that if I use the A way to workaround this is to alway be fetching events from a block range <num_of_last_block_containing_log + 1; latest_block_num> instead of <num_of_latest_block_from_last_range + 1; latest_block_num>. Thank you |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
viem uses However, if the RPC Provider does not support filters, we fall back to |
Beta Was this translation helpful? Give feedback.
viem uses
eth_newFilter
ð_getFilterChanges
forwatchContractEvent
, which is mutually exclusive of latest block number. So it should work for Infura (to answer your question).However, if the RPC Provider does not support filters, we fall back to
eth_getLogs
which is mutually inclusive of latest block number. We rely on the previously queried block number there, so it’ll probably be a good idea to update the fall back implementation for the case you mentioned (for RPC providers that don’t support filters and have load balancing mechanisms).