eth_getLogs
Network: Arbitrum Sepolia · Testnet · Chain ID 421614 (0x66eee)
Counts as 1 request. See Request Counting.
Returns an array of all logs matching a given filter object. This is one of the most commonly used methods for indexing and monitoring smart contract events.
Parameters
Object— Filter options:Field Type Description fromBlock QUANTITY|TAG Start block (default: "latest")toBlock QUANTITY|TAG End block (default: "latest")address DATA|Array Contract address(es) to filter topics Array Topic filters (indexed event params) blockHash DATA Restricts to a single block
Returns
Array — Array of log objects:
| Field | Type | Description |
|---|---|---|
| address | DATA | Contract that emitted the log |
| topics | Array<DATA> | Indexed event parameters |
| data | DATA | Non-indexed event parameters |
| blockNumber | QUANTITY | Block number |
| transactionHash | DATA | Transaction hash |
| logIndex | QUANTITY | Log index in block |
Request
{
"jsonrpc": "2.0",
"method": "eth_getLogs",
"params": [
{
"fromBlock": "0x134E800",
"toBlock": "0x134E810",
"address": "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48",
"topics": ["0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef"]
}
],
"id": 1
}The example filters ERC-20 Transfer events for one token contract. Replace address and the block range with values on Arbitrum Sepolia.
The topic
0xddf252ad...is the keccak-256 hash ofTransfer(address,address,uint256).
Code Examples
curl -X POST https://arbitrum-sepolia-rpc.blockreq.com/v1/rpc/public \
-H "Content-Type: application/json" \
-d '{"jsonrpc":"2.0","method":"eth_getLogs","params":[{"fromBlock":"0x134E800","toBlock":"0x134E810","address":"0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48","topics":["0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef"]}],"id":1}'