🚀
Nodies Docs
Visit Nodies Homepage
  • 👋Nodies Guide
  • Overview
    • 💡Our Infrastructure
    • 📑Supported Blockchains
  • RPC services
    • 📪Public endpoints
    • 💲Pricing Plans
  • Snapshot services
    • 💾Overview
    • ⏬Downloading Snapshots
  • 🖥️Supported API Methods
    • Ethereum
      • debug_traceBlockByHash
      • debug_traceBlockByNumber
      • debug_traceCall
      • debug_traceTransaction
      • eth_blockNumber
      • eth_call
      • eth_chainId
      • eth_createAccessList
      • eth_estimateGas
      • eth_feeHistory
      • eth_gasPrice
      • eth_getBalance
      • eth_getBlockByHash
      • eth_getBlockByNumber
      • eth_getBlockReceipts
      • eth_getBlockTransactionCountByHash
      • eth_getBlockTransactionCountByNumber
      • eth_getCode
      • eth_getFilterChanges
      • eth_getFilterLogs
      • eth_getLogs
      • eth_getProof
      • eth_getStorageAt
      • eth_getTransactionByBlockHashAndIndex
      • eth_getTransactionByBlockNumberAndIndex
      • eth_getTransactionByHash
      • eth_getTransactionCount
      • eth_getTransactionReceipt
      • eth_getUncleByBlockHashAndIndex
      • eth_getUncleByBlockNumberAndIndex
      • eth_getUncleCountByBlockHash
      • eth_getUncleCountByBlockNumber
      • eth_maxPriorityFeePerGas
      • eth_newBlockFilter
      • eth_newFilter
      • eth_newPendingTransactionFilter
      • eth_protocolVersion
      • eth_sendRawTransaction
      • eth_subscribe
      • eth_syncing
      • eth_uninstallFilter
      • eth_unsubscribe
      • net_listening
      • net_peerCount
      • net_version
      • trace_block
      • trace_call
      • trace_callMany
      • trace_filter
      • trace_get
      • trace_replayBlockTransactions
      • trace_replayTransaction
      • trace_transaction
      • web3_clientVersion
      • web3_sha3
    • Polygon (Mainnet / PoS)
      • bor_getAuthor
      • bor_getCurrentProposer
      • bor_getCurrentValidators
      • bor_getRootHash
      • bor_getSignersAtHash
      • debug_traceBlockByHash
      • debug_traceBlockByNumber
      • debug_traceCall
      • debug_traceTransaction
      • eth_accounts
      • eth_blockNumber
      • eth_call
      • eth_chainId
      • eth_createAccessList
      • eth_estimateGas
      • eth_feeHistory
      • eth_gasPrice
      • eth_getBalance
      • eth_getBlockByHash
      • eth_getBlockByNumber
      • eth_getBlockReceipts
      • eth_getBlockTransactionCountByHash
      • eth_getBlockTransactionCountByNumber
      • eth_getCode
      • eth_getFilterChanges
      • eth_getFilterLogs
      • eth_getLogs
      • eth_getProof
      • eth_getRootHash
      • eth_getStorageAt
      • eth_getTransactionByBlockHashAndIndex
      • eth_getTransactionByBlockNumberAndIndex
      • eth_getTransactionByHash
      • eth_getTransactionCount
      • eth_getTransactionReceipt
      • eth_maxPriorityFeePerGas
      • eth_newBlockFilter
      • eth_newFilter
      • eth_newPendingTransactionFilter
      • eth_protocolVersion
      • eth_sendRawTransaction
      • eth_subscribe
      • eth_syncing
      • eth_uninstallFilter
      • eth_unsubscribe
      • net_listening
      • net_peerCount
      • net_version
      • trace_block
      • trace_call
      • trace_callMany
      • trace_filter
      • trace_get
      • trace_replayBlockTransactions
      • trace_replayTransaction
      • trace_transaction
      • txpool_content
      • txpool_inspect
      • txpool_status
      • web3_clientVersion
      • web3_sha3
    • Kava
      • debug_traceBlockByHash
      • debug_traceBlockByNumber
      • debug_traceTransaction
      • eth_accounts
      • eth_blockNumber
      • eth_call
      • eth_chainId
      • eth_estimateGas
      • eth_feeHistory
      • eth_gasPrice
      • eth_getBalance
      • eth_getBlockByHash
      • eth_getBlockByNumber
      • eth_getBlockTransactionCountByHash
      • eth_getBlockTransactionCountByNumber
      • eth_getCode
      • eth_getFilterChanges
      • eth_getFilterLogs
      • eth_getLogs
      • eth_getProof
      • eth_getRootHash
      • eth_getStorageAt
      • eth_getTransactionByBlockHashAndIndex
      • eth_getTransactionByBlockNumberAndIndex
      • eth_getTransactionByHash
      • eth_getTransactionCount
      • eth_getTransactionReceipt
      • eth_maxPriorityFeePerGas
      • eth_newBlockFilter
      • eth_newFilter
      • eth_newPendingTransactionFilter
      • eth_protocolVersion
      • eth_sendRawTransaction
      • eth_subscribe
      • eth_syncing
      • eth_uninstallFilter
      • eth_unsubscribe
      • net_listening
      • net_peerCount
      • net_version
      • txpool_content
      • txpool_inspect
      • txpool_status
      • web3_clientVersion
      • web3_sha3
    • Metis
      • debug_traceBlockByHash
      • debug_traceBlockByNumber
      • debug_traceTransaction
      • eth_accounts
      • eth_blockNumber
      • eth_call
      • eth_chainId
      • eth_coinbase
      • eth_estimateGas
      • eth_gasPrice
      • eth_getBalance
      • eth_getBlockByHash
      • eth_getBlockByNumber
      • eth_getBlockTransactionCountByHash
      • eth_getBlockTransactionCountByNumber
      • eth_getCode
      • eth_getFilterChanges
      • eth_getFilterLogs
      • eth_getLogs
      • eth_getProof
      • eth_getStorageAt
      • eth_getTransactionByBlockHashAndIndex
      • eth_getTransactionByBlockNumberAndIndex
      • eth_getTransactionByHash
      • eth_getTransactionCount
      • eth_getTransactionReceipt
      • eth_newBlockFilter
      • eth_newFilter
      • eth_newPendingTransactionFilter
      • eth_protocolVersion
      • eth_sendRawTransaction
      • eth_subscribe
      • eth_syncing
      • eth_uninstallFilter
      • eth_unsubscribe
      • net_listening
      • net_peerCount
      • net_version
      • txpool_content
      • txpool_inspect
      • txpool_status
      • web3_clientVersion
      • web3_sha3
  • Performance Benchmarks
    • 🐎Benchmark standard
    • Ethereum Benchmarks
    • Polygon Benchmarks
    • BASE Benchmarks
    • Optimism Benchmarks
    • Metis Benchmarks
    • Kava Benchmarks
    • Stellar Benchmarks
  • Application Guide
    • 📝Registration
    • 📔Projects & Teams
    • 🥇Creating your First Project & Application
      • ✏️Define your Project Name
      • 👨‍👨‍👦‍👦Invite your Team Members
      • 🎬Creating your First Application
    • 🛣️Route to Pocket
    • 🚪Dashboard
    • 🔐Endpoint Security: API Key Management
    • ♻️Viewing Statistics
Powered by GitBook
On this page
  1. Supported API Methods
  2. Ethereum

eth_getLogs

Returns an array of all logs matching filter with given id.

Parameters

Object - filter options:

  1. fromBlock: Quantity or tag (optional, default is "latest" if not specified)

    - choose 1 of the following options:

    • A hexadecimal block number.

    • "earliest" - the earliest/genesis block.

    • "latest" - the latest mined block.

    • "safe" - the latest safe head block.

    • "finalized" - the latest finalized block.

    • "pending" - the pending state/transactions.

  2. toBlock: Quantity or tag (optional, default is "latest" if not specified)

    - choose 1 of the following options:

    • A hexadecimal block number.

    • "earliest" - the earliest/genesis block.

    • "latest" - the latest mined block.

    • "safe" - the latest safe head block.

    • "finalized" - the latest finalized block.

    • "pending" - the pending state/transactions.

  3. address: (optional) Contract address or a list of addresses from which logs should originate.

  4. topics: (optional) Array of DATA topics. Topics are order-dependent. Each topic can also be an array of DATA with "or" options.

  5. blockhash: (optional) restricts the logs returned to the given block. is equivalent to setting fromBlock and toBlock to the block number referenced in the blockhash If blockhash is present in the filter criteria, then neither fromBlock nor toBlock are allowed.

Sample Request

curl https://lb.nodies.app/v1/<INSERT URL> \
   -H "x-api-key: <API-KEY>" \
   -X POST \
   -H "Content-Type: application/json" \
   -d '{ 
  "jsonrpc": "2.0",
  "method": "eth_getLogs",
  "params": [
    {
      "blockhash": "0x729eea5dd371632d98ceffaadefedc33d245374786c5d181c7b3eec63ee7b36c"
    }
  ],
  "id": 1
}'

Sample Response

{
  "jsonrpc": "2.0",
  "id": 1,
  "result": [
    {
      "address": "0x2754b28227f041a66c46509d5620782bfc4766ef",
      "topics": [
        "0xa64da754fccf55aa65a1f0128a648633fade3884b236e879ee9f64c78df5d5d7",
        "0x000000000000000000000000efdaf1cd0d539896c06644ebe5d7f81c650bacc2",
        "0x000000000000000000000000f32682d5f99ba4143532618d6f516859a055ea06",
        "0x0000000000000000000000000000000000000000000000000000000000000000"
      ],
      "data": "0x00000000000000000000000000000000000000000000000000729b123e2f0400",
      "blockNumber": "0x9265cd",
      "transactionHash": "0x8fef048a4b01804ba49d2a58e3d436c1c2a2abc1977a36b723a5c096e3b6f84e",
      "transactionIndex": "0x0",
      "blockHash": "0x729eea5dd371632d98ceffaadefedc33d245374786c5d181c7b3eec63ee7b36c",
      "logIndex": "0x0",
      "removed": false
    },
    {
      "address": "0xaaaebe6fe48e54f431b0c390cfaf0b017d09d42d",
      "topics": [
        "0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef",
        "0x000000000000000000000000c12ad9ea067619637fbc74a3ac319dbc312f72af",
        "0x0000000000000000000000007481f00e17e0784477c6f6de5c31fe3cd4a84e47"
      ],
      "data": "0x00000000000000000000000000000000000000000000000000000000005c0f6e",
      "blockNumber": "0x9265cd",
      "transactionHash": "0xfb03571f4c000312792535c9d10e09647768112447709a041913e92dbff334bb",
      "transactionIndex": "0x1",
      "blockHash": "0x729eea5dd371632d98ceffaadefedc33d245374786c5d181c7b3eec63ee7b36c",
      "logIndex": "0x1",
      "removed": false
    },
    {
      "address": "0xa22c1b5320108c19db53f58241fd64b105562296",
      "topics": [
        "0xce7dc747411ac40191c5335943fcc79d8c2d8c01ca5ae83d9fed160409fa6120",
        "0x000000000000000000000000cb6b973b93d4d4be2753e7dffc11e26a220f4122",
        "0x000000000000000000000000cea488bfd550f775427c32ccb4fc080ef996b7f3"
      ],
      "data": "0x0000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000005e5d84fb",
      "blockNumber": "0x9265cd",
      "transactionHash": "0x041265c8d4610cbac6f4e46084ae70de2c049fe7fc895ef635ba34e50b73bf8a",
      "transactionIndex": "0x2",
      "blockHash": "0x729eea5dd371632d98ceffaadefedc33d245374786c5d181c7b3eec63ee7b36c",
      "logIndex": "0x2",
      "removed": false
    },
    {
      "address": "0xa22c1b5320108c19db53f58241fd64b105562296",
      "topics": [
        "0x9ea70f0eb33d898c3336ecf2c0e3cf1c0195c13ad3fbcb34447777dbfd5ff2d0",
        "0x000000000000000000000000cea488bfd550f775427c32ccb4fc080ef996b7f3"
      ],
      "data": "0x0000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000005e5d84fb",
      "blockNumber": "0x9265cd",
      "transactionHash": "0x041265c8d4610cbac6f4e46084ae70de2c049fe7fc895ef635ba34e50b73bf8a",
      "transactionIndex": "x2",
      "blockHash": "0x729eea5dd371632d98ceffaadefedc33d245374786c5d181c7b3eec63ee7b36c",
      "logIndex": "0x3",
      "removed": false
    }
  ]
}
Previouseth_getFilterLogsNexteth_getProof

Last updated 1 year ago

🖥️