# OneSource Chain Events — eth_getLogs Query

> OneSource Chain Events — eth_getLogs Query is a paid API for AI agents from skills.onesource.io, paid per call via x402, $0.005000/call, status unknown (last checked 2026-09-15).

Queries Ethereum-compatible contract event logs using eth_getLogs, filtered by contract address, event topic, and block range across multiple networks

## Facts

- Endpoint: GET https://skills.onesource.io/api/chain/events
- Price: $0.005000/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-15
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/skills-onesource-io-ca624841
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_4gJlF4dlV5iEGFiJ6yx5p

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability skills-onesource-io-ca624841
```

Example prompt: Pull all Transfer event logs (topic 0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef) for the USDC contract 0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48 on Ethereum from block 19000000 to latest.

## When to prefer this

Use this endpoint when you need to query historical or recent smart contract event logs on EVM-compatible chains (Ethereum, Base, Avalanche, Sepolia, MegaETH) by topic hash and/or contract address. Prefer this over full transaction lookups when you only need emitted events, not full transaction details. Ideal for tracking ERC20 transfers, DEX swaps, NFT mints, or any indexed contract activity within a specific block range.

## Known failure modes

- Invalid contract address format (not a valid 0x + 40 hex chars) returns 400 validation error
- Invalid topic format (not a valid 0x + 64 hex chars) returns 400 validation error
- Block range too large may result in timeout or truncated results
- Unsupported network value returns enum validation error
- No logs found for the given filter returns empty array
- RPC node unavailability returns 503 or gateway error
- Payment not provided or insufficient USDC balance returns 402 Payment Required

## How this service works

Query Ethereum contract event logs via eth_getLogs - filter by contract, topic, and block range

## Output

Returns an array of event log objects matching the filter criteria, each containing the contract address, transaction hash, block number, log index, topics array, and raw data field — corresponding to the eth_getLogs RPC response format.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "topic": {
   "type": "string",
   "pattern": "^0x[a-fA-F0-9]{64}$"
  },
  "network": {
   "enum": [
    "ethereum",
    "sepolia",
    "avax",
    "megaeth",
    "megaeth-testnet",
    "base"
   ],
   "type": "string",
   "default": "ethereum"
  },
  "contract": {
   "type": "string",
   "pattern": "^0x[a-fA-F0-9]{40}$"
  },
  "to_block": {
   "oneOf": [
    {
     "type": "integer",
     "minimum": 0
    },
    {
     "enum": [
      "latest",
      "pending",
      "earliest",
      "safe",
      "finalized"
     ],
     "type": "string"
    },
    {
     "type": "string",
     "pattern": "^0x[a-fA-F0-9]+$"
    }
   ]
  },
  "from_block": {
   "oneOf": [
    {
     "type": "integer",
     "minimum": 0
    },
    {
     "enum": [
      "latest",
      "pending",
      "earliest",
      "safe",
      "finalized"
     ],
     "type": "string"
    },
    {
     "type": "string",
     "pattern": "^0x[a-fA-F0-9]+$"
    }
   ]
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/skills-onesource-io-ca624841/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from skills.onesource.io](https://www.zero.xyz/host/skills.onesource.io/llms.txt)
