⚡ Test Our Private Nodes of 40+ Blockchains just for $50!

coins coins coins coins
avax
Avalanche (AVAX)

Method: POST eth_getLogs

dropdown

# eth_getLogs example for Avalanche (AVAX)

POST eth_getLogs

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

Parameters

Object - object

The filter options

Request

curl --location --request POST 'https://avax.getblock.io/mainnet/ext/bc/C/rpc' \
--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": "0xa7d7079b0fead91f3e65f86e8915cb59c1a4c664",
            "blockHash": "0x73d36757ee96901703fa799c15969062ec2271edad373ddecaef19ad5faca0c0",
            "blockNumber": "0xcbf81b",
            "data": "0x00000000000000000000000000000000000000000000000000000000361891fd",
            "logIndex": "0x0",
            "removed": false,
            "topics": [
                "0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef",
                "0x0000000000000000000000009a7dac091046ec33c329e2269888d57bf907d3c3",
                "0x0000000000000000000000006cb064ce0543315d83b01b0958e968c916fc642b"
            ],
            "transactionHash": "0xe5e227472a950b7888130dd6e6b1b1e024da6c31347fbfff798520f6b1d56086",
            "transactionIndex": "0x2"
        },
        {
            "address": "0x72c3438cf1c915ecf5d9f17a6ed346b273d5bf71",
            "blockHash": "0x73d36757ee96901703fa799c15969062ec2271edad373ddecaef19ad5faca0c0",
            "blockNumber": "0xcbf81b",
            "data": "0x0000000000000000000000000000000000000000000000001e1cd34674023f3c00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002d1a51c7e00500000",
            "logIndex": "0x2a",
            "removed": false,
            "topics": [
                "0xd78ad95fa46c994b6551d0da85fc275fe613ce37657fb8d5e3d130840159d822",
                "0x00000000000000000000000060ae616a2155ee3d9a68541ba4544862310933d4",
                "0x000000000000000000000000bd037b2a4e05bb4543998008167a59cb06c1a1a0"
            ],
            "transactionHash": "0x098a17b58bce7909adabd5efd5ec1b29cf4338ff76b1cfd856f8de37b1c61bb4",
            "transactionIndex": "0xf"
        }
    ]
}