Ropsten [eth_getLogs] get incomplete data

This is my query code

curl --location --request POST 'https://ropsten.infura.io/v3/project-id' \
--header 'Content-Type: application/json' \
--header 'user: ' \
--data-raw '{
    "jsonrpc": "2.0",
    "method": "eth_getLogs",
    "params": [
        {
            "fromBlock": "0x871a14",
            "toBlock": "0x871a14"
        }
    ],
    "id": 1
}'

I got only 2 logs, but in https://ropsten.etherscan.io/block/8854036 it has 43 txs

1 Like

Hello wkzQ,

Not every transaction will emit logs/events, the smart contract function called must be programmed to do so. In the case of this particular block, the only two transactions which emitted logs are the ones with hashes 0x0993ed9ed43552531364efde1bb82a395effcfce2717df85e8a866e24a01902a and 0xe5035c51de51238a052d1e788c4a8793165953cc77d832a94796092640b1d40d where they each emitted a single event.