# StatePulse ABI Lookup

> StatePulse ABI Lookup is a paid API for AI agents from statepulse-api.hahavoid0.workers.dev, paid per call via x402, $0.005/call, status unknown (last checked 2026-09-15).

Fetches the ABI (Application Binary Interface) for a smart contract address on a given blockchain, with confidence scoring.

## Facts

- Endpoint: POST https://statepulse-api.hahavoid0.workers.dev/blockchain/abi
- Price: $0.005/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-15
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/statepulse-abi-lookup-d8f2ff82
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_w28WCFb0NfNfyq64f9Bga

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 statepulse-abi-lookup-d8f2ff82 -d '<json body>'
```

Example prompt: Can you grab the ABI for the USDC contract at 0x833589fcd6edb6e08f4c7c32d4f71b54bda02913 on Base so I can see what functions it exposes?

## When to prefer this

Use this endpoint when an AI agent needs to programmatically interact with a smart contract and requires its ABI to encode/decode function calls. Ideal when the contract address is known but the ABI is not locally cached, especially for contracts on Base or other EVM chains.

## Known failure modes

- Contract address not found or unverified — supported: false returned
- Invalid address format — likely 400 or error result
- Chain not supported — endpoint may return unsupported flag
- ABI not publicly available (unverified contract) — low confidence or no result
- Payment failure (x402 USDC) — request blocked before processing

## How this service works

Resolves the contract interface JSON (ABI) for verified smart contracts on Base or Ethereum. Matches: get verified smart contract source interface, Basescan verified ABI fetcher, Etherscan contract JSON interface loader, decode transaction calldata helpers, verified contract methods parser.

## Output

Returns the full ABI JSON array for the smart contract, the chain it was resolved on, the contract address, a boolean indicating whether the ABI is supported/found, and a confidence level (e.g. 'high').

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "result": {
   "abi": "[...]",
   "chain": "base",
   "address": "0x833589fcd6edb6e08f4c7c32d4f71b54bda02913"
  },
  "supported": true,
  "confidence": "high"
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/statepulse-abi-lookup-d8f2ff82/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from statepulse-api.hahavoid0.workers.dev](https://www.zero.xyz/host/statepulse-api.hahavoid0.workers.dev/llms.txt)
