GET
/
v1
/
{chainName}
/
events
import { GoldRushClient } from "@covalenthq/client-sdk";

const ApiServices = async () => {
    const client = new GoldRushClient("YOUR_API_KEY");
    const resp = await client.BaseService.getLogs({chainName: "chainName", walletAddress: "walletAddress"});
    console.log(resp.data);
};

ApiServices();
{
  "updated_at": "2023-11-07T05:31:56Z",
  "chain_id": 123,
  "chain_name": "<string>",
  "items": [
    {
      "block_signed_at": "2023-11-07T05:31:56Z",
      "block_height": 123,
      "block_hash": "<string>",
      "tx_offset": 123,
      "log_offset": 123,
      "tx_hash": "<string>",
      "raw_log_topics": [
        "<string>"
      ],
      "sender_contract_decimals": 123,
      "sender_name": "<string>",
      "sender_contract_ticker_symbol": "<string>",
      "sender_address": "<string>",
      "sender_address_label": "<string>",
      "supports_erc": [
        "<string>"
      ],
      "sender_logo_url": "<string>",
      "sender_factory_address": "<string>",
      "raw_log_data": "<string>",
      "decoded": {
        "name": "<string>",
        "signature": "<string>",
        "params": [
          {
            "name": "<string>",
            "type": "<string>",
            "indexed": true,
            "decoded": true,
            "value": "<string>"
          }
        ]
      }
    }
  ]
}

Credit Cost

0.01 per item

Processing

Realtime

Limits:

  • For a block range of 2,000 blocks or less, the response will include all logs within the range.
  • For a block range greater than 2,000 blocks:- The response will include up to 10,000 logs.
  • If the number of logs exceeds 10,000, no logs will be included in the response. Instead, the response will contain a suggested range within the info object, including a link and message.

Path Parameters

chainName
string
required

The chain name eg: eth-mainnet.

Query Parameters

starting-block
integer

The first block to retrieve log events with. Accepts decimals, hexadecimals, or the strings earliest and latest.

ending-block
string

The last block to retrieve log events with. Accepts decimals, hexadecimals, or the strings earliest and latest.

address
string

The address of the log events sender contract.

topics
string

The topic hash(es) to retrieve logs with.

block-hash
string

The block hash to retrieve logs for.

skip-decode
boolean

Omit decoded log events.

Response

200 - application/json
Successful response
updated_at
string

The timestamp when the response was generated. Useful to show data staleness to users.

chain_id
integer

The requested chain ID eg: 1.

chain_name
string

The requested chain name eg: eth-mainnet.

items
object[]

List of response items.