pulsechain.box
eth

eth_getLogs

Returns an array of event logs matching the given filter criteria. This is the primary method for querying contract events such as ERC20 transfers, approvals, and other on-chain activity.

Returns an array of event logs matching the given filter criteria. This is the primary method for querying contract events such as ERC20 transfers, approvals, and other on-chain activity.

Parameters

#TypeDescription
1objectFilter object.

The filter object supports these fields:

FieldTypeRequiredDescription
fromBlockstringNoStart block (hex or tag). Defaults to "latest".
toBlockstringNoEnd block (hex or tag). Defaults to "latest".
addressstring or arrayNoContract address or array of addresses to filter by.
topicsarrayNoArray of topic filters. Each element is a topic hash or null for a wildcard.

Returns

array -- An array of log objects. Each log contains:

FieldTypeDescription
addressstringThe contract address that emitted the event.
topicsarrayArray of 32-byte topic hashes. topics[0] is the event signature hash.
datastringABI-encoded non-indexed event parameters.
blockNumberstringBlock number where the log was emitted (hex).
transactionHashstringHash of the transaction that emitted the log.
transactionIndexstringTransaction index within the block (hex).
blockHashstringHash of the block.
logIndexstringLog index within the block (hex).
removedbooleantrue if the log was removed due to a chain reorganization.

Example

Fetch ERC20 Transfer events from the WPLS contract for a recent block range:

curl -s -X POST https://rpc.pulsechain.box \
  -H "Content-Type: application/json" \
  -d '{
    "jsonrpc": "2.0",
    "method": "eth_getLogs",
    "params": [{
      "fromBlock": "0x18b7000",
      "toBlock": "0x18b7064",
      "address": "0xA1077a294dDE1B09bB078844df40758a5D0f9a27",
      "topics": [
        "0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef"
      ]
    }],
    "id": 1
  }'
{
  "jsonrpc": "2.0",
  "id": 1,
  "result": [
    {
      "address": "0xa1077a294dde1b09bb078844df40758a5d0f9a27",
      "topics": [
        "0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef",
        "0x000000000000000000000000sender_address_here________________",
        "0x000000000000000000000000receiver_address_here_______________"
      ],
      "data": "0x00000000000000000000000000000000000000000000003635c9adc5dea00000",
      "blockNumber": "0x18b7032",
      "transactionHash": "0xabc123...",
      "transactionIndex": "0x0",
      "blockHash": "0xdef456...",
      "logIndex": "0x0",
      "removed": false
    }
  ]
}
TRY IT

Notes

  • The topics[0] for the ERC20 Transfer(address,address,uint256) event is 0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef. This is the keccak256 hash of the event signature.
  • Topics support positional filtering. For example, to find transfers from a specific address, set topics[1] to the zero-padded sender address. Set a position to null to match any value.
  • Querying large block ranges without an address filter can be very slow and may time out. Always scope your queries as narrowly as possible.
  • The node may impose a maximum block range or result count. If the response is too large, narrow the fromBlock/toBlock range.
  • On an archive node, you can query logs from any historical block.
  • Common event signatures:
    • Transfer(address,address,uint256) -- 0xddf252ad...
    • Approval(address,address,uint256) -- 0x8c5be1e5...
    • Swap(address,uint256,uint256,uint256,uint256,address) (Uniswap V2) -- 0xd78ad95f...
Copyright © 2026 AvecdrA. Made with love.