eth_getLogs returns empty for Ropsten

Hi,

I can’t seem to get any event logs from the testnet. Here’s my command:

curl https://ropsten.infura.io/v3/<projID> \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc":"2.0","method":"eth_getLogs","params":[{"address": "0x3b994b48922450e6cf0f415bdf337d1df7183ffa"}],"id":1}'

That address clearly has generated events, e.g. here: https://ropsten.etherscan.io/tx/0x7a7e61aa2d924dd9475795db530810cec1a1aba4f9fa24965eb745977529242c#eventlog

But the above call returns empty. Please help.

Hi there, Joe.
Does your projID hold a value right now?
Can you help to share the full response snippet with us?

Hi, yes, the projID is my ProjectID. Here’s the full response:

{"jsonrpc":"2.0","id":1,"result":[]}

Hi Joe.
Would you try using different params, such as fromBlock and toBlock?
Or using topic with address?
[https://infura.io/docs/ethereum/json-rpc/eth-getLogs](http://Check out the documentations for getLogs)

Thanks. It looks like the “fromBlock” and “toBlock” are needed, as opposed to optional like stated in the doc.

Hi Joe. I’m glad you got it to work.
These params acts as filter objects to help narrow down the response.
Different combinations of them can bring different results.