# BaseScan Contract Events (Base Chain)

> BaseScan Contract Events (Base Chain) is a paid API for AI agents from api.chainmarket-api.workers.dev, paid per call via x402, $0.002/call, status unknown (last checked 2026-10-24).

Fetches recent on-chain event logs for a given contract address on the Base blockchain, with optional filtering by event topic and decoded event data.

## Facts

- Endpoint: GET https://api.chainmarket-api.workers.dev/api/crypto/basescan-contract-events?utm_source=zero.xyz
- Price: $0.002/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-24
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/basescan-contract-events-base-chain-9a90ea3d
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_zdBEGsxNuh8y_Em6A8icf

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 basescan-contract-events-base-chain-9a90ea3d
```

Example prompt: Pull the last 100 event logs for the USDC contract on Base (0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913), scanning the most recent 1000 blocks, and filter to only Transfer events using topic0 0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef.

## When to prefer this

Use this endpoint when you need decoded, human-readable on-chain event logs for a specific Base chain contract without setting up your own RPC infrastructure. It is ideal for agents needing real-time or near-real-time event monitoring, DeFi transaction tracing, token transfer auditing, or smart contract activity feeds on Base, especially when no API key or account is available and pay-per-call billing is preferred.

## Known failure modes

- Invalid or malformed contract address returns an error
- topic0 not in correct 0x+64 hex format causes rejection
- blocks parameter exceeding 5000 causes validation failure
- No logs found in range returns empty logs array with count 0
- RPC node unavailability may cause upstream timeout errors
- Rate limiting or congestion on public RPC nodes may cause slow or failed responses

## How this service works

Recent event logs of a contract on Base (chain 8453) from public RPC: block, time order, transaction hash, log index, event name (signature database), topics and data, with ERC-20/721 Transfer and Approval decoded to from/to/value. Look back up to 5,000 blocks (~2.8 h); optional event-signature filter. Internal transactions are not included.

## Output

Returns a JSON object containing an array of decoded event logs (each with transaction hash, block number, event signature, raw data, topics array, and decoded parameters like from/to/value), plus metadata: chain name, chainId, contract address, block range scanned, total logs in range, whether the range was narrowed, source RPC, and timestamp of the check.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "$schema": "https://json-schema.org/draft/2020-12/schema",
 "required": [
  "input"
 ],
 "properties": {
  "input": {
   "type": "object",
   "required": [
    "type",
    "method"
   ],
   "properties": {
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "enum": [
      "GET"
     ],
     "type": "string"
    },
    "queryParams": {
     "type": "object",
     "required": [
      "address"
     ],
     "properties": {
      "limit": {
       "type": "integer",
       "description": "Max logs returned, newest first, 1-200 (default 50)"
      },
      "blocks": {
       "type": "integer",
       "description": "How many recent blocks to scan, 1-5000 (default 500; Base makes a block every 2 s)"
      },
      "topic0": {
       "type": "string",
       "description": "Optional event signature hash (0x + 64 hex) to keep only that event, e.g. the Transfer topic"
      },
      "address": {
       "type": "string",
       "description": "Contract address 0x… (e.g. USDC on Base 0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913)"
      }
     }
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object"
    }
   }
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "logs": [
   {
    "tx": "0xd7c083b273df2f60f05750ce663bfacade1f87573464f84fd0b89d9d8de1d853",
    "data": "0x00000000000000000000000000000000000000000000000000000002d5735b7e",
    "block": 52979405,
    "event": "Transfer(address,address,uint256)",
    "topics": [
     "0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef",
     "0x00000000000000000000000061040e143a77f165ba44543af4a079f2c809d14b"
    ],
    "decoded": {
     "to": "0xc3cbfbaab532a04e36b6f901d725eaa5113fd781",
     "from": "0x61040e143a77f165ba44543af4a079f2c809d14b",
     "value": "12171041662"
    },
    "logIndex": 1123
   },
   {
    "tx": "0x6b2cd51f443ce901a67a4d9081d905d2fd5c44f4d17a69903ac2bd5275685940",
    "data": "0x000000000000000000000000000000000000000000000000000000002c25029a",
    "block": 52979405,
    "event": "Transfer(address,address,uint256)",
    "topics": [
     "0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef",
     "0x0000000000000000000000007a33000372f3f028f074182ccb9d16cbeefbf920"
    ],
    "decoded": {
     "to": "0x08fb33543ad633db94282df364ad80feb8d9fc35",
     "from": "0x7a33000372f3f028f074182ccb9d16cbeefbf920",
     "value": "740623002"
    },
    "logIndex": 1118
   }
  ],
  "chain": "base",
  "count": 50,
  "source": "Base public RPC (publicnode / dRPC)",
  "address": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
  "chainId": 8453,
  "toBlock": 52979405,
  "checkedAt": "2026-10-23T09:35:58.254Z",
  "fromBlock": 52979386,
  "narrowedRange": false,
  "totalLogsInRange": 3344
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/basescan-contract-events-base-chain-9a90ea3d/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from api.chainmarket-api.workers.dev](https://www.zero.xyz/host/api.chainmarket-api.workers.dev/llms.txt)
