New Here? Claim Your 30% Discount on Your First Blockchain Node Access!

banner image

Last updated on January 1, 1970

5 min read

Method eth_getLogs undefined ()
connect with JSON-RPC protocol

eth_getLogs

info-circle-fill

Returns an array of all logs matching a given filter object.

Parameters

Object - object

The filter options

Request

curl --location --request POST 'https://optimism.getblock.io/mainnet/' 
--header 'x-api-key: YOUR-API-KEY' 
--header 'Content-Type: application/json' 
--data-raw '{"jsonrpc": "2.0",
"method": "eth_getLogs",
"params": [{"topics": []}],
"id": "getblock.io"}'

Response

{
    "id": "getblock.io",
    "jsonrpc": "2.0",
    "result": [
        {
            "address": "0x7c56d3650f9acd992b3aa635c04a311c54ad264c",
            "blockHash": "0x8c0682143a415f8fddb84a32f13875c530dd83f398f0aa5aff5c73f397b92c67",
            "blockNumber": "0x625571c",
            "data": "0x0000000000000000000000000000000000000000000000000000000004f82d450000000000000000000000002bdf9249c350c68a43a9714c1b9153af54751b1c00000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000000002000000000000000000000000ac3b0b1bf185a08cea9febc7cfdcbe0a0002edfd01000000000000000000000000000000000000000000000000000000000000000a0000000000000000000000000000000000000000000000000000000004f774830000000000000000000000000000000000000000000000000000000004f774830000000000000000000000000000000000000000000000000000000004f774830000000000000000000000000000000000000000000000000000000004f82d450000000000000000000000000000000000000000000000000000000004f82d450000000000000000000000000000000000000000000000000000000004f82d450000000000000000000000000000000000000000000000000000000004f82d450000000000000000000000000000000000000000000000000000000004f86e300000000000000000000000000000000000000000000000000000000004f86e300000000000000000000000000000000000000000000000000000000004f86e30000000000000000000000000000000000000000000000000000000000000000a0102090003040506070800000000000000000000000000000000000000000000",
            "logIndex": "0x0",
            "removed": false,
            "topics": [
                "0xf6a97944f31ea060dfde0566e4167c1a1082551e64b60ecb14d599a9d023d451",
                "0x000000000000000000000000000000000000000000000000000000000001cd6f"
            ],
            "transactionHash": "0xc897147b372787d6e3969e4a4c843d8a08fc6b430ae9c4a2a322de385f7a9a90",
            "transactionIndex": "0x0"
        },
        {
            "address": "0x7c56d3650f9acd992b3aa635c04a311c54ad264c",
            "blockHash": "0x8c0682143a415f8fddb84a32f13875c530dd83f398f0aa5aff5c73f397b92c67",
            "blockNumber": "0x625571c",
            "data": "0x000000000000000000000000000000000000000000000000000000006476c7ca",
            "logIndex": "0x1",
            "removed": false,
            "topics": [
                "0x0109fc6f55cf40689f02fbaad7af7fe7bbac8a3d2186600afc7d3e10cac60271",
                "0x000000000000000000000000000000000000000000000000000000000001cd6f",
                "0x0000000000000000000000000000000000000000000000000000000000000000"
            ],
            "transactionHash": "0xc897147b372787d6e3969e4a4c843d8a08fc6b430ae9c4a2a322de385f7a9a90",
            "transactionIndex": "0x0"
        },
        {
            "address": "0x7c56d3650f9acd992b3aa635c04a311c54ad264c",
            "blockHash": "0x8c0682143a415f8fddb84a32f13875c530dd83f398f0aa5aff5c73f397b92c67",
            "blockNumber": "0x625571c",
            "data": "0x000000000000000000000000000000000000000000000000000000006476c7ca",
            "logIndex": "0x2",
            "removed": false,
            "topics": [
                "0x0559884fd3a460db3073b7fc896cc77986f16e378210ded43186175bf646fc5f",
                "0x0000000000000000000000000000000000000000000000000000000004f82d45",
                "0x000000000000000000000000000000000000000000000000000000000001cd6f"
            ],
            "transactionHash": "0xc897147b372787d6e3969e4a4c843d8a08fc6b430ae9c4a2a322de385f7a9a90",
            "transactionIndex": "0x0"
        }
    ]
}
banner icon

Start Building with GetBlock RPCs for Free