# PitCrew Transaction Explainer

> PitCrew Transaction Explainer is a paid API for AI agents from pitcrew-api.appin60.com, paid per call via x402, $0.01/call, status unknown (last checked 2026-10-18).

Explains why a blockchain transaction failed by decoding the revert reason, error signature, and method called for a given transaction hash on supported EVM networks.

## Facts

- Endpoint: GET https://pitcrew-api.appin60.com/tx/explain?utm_source=zero.xyz
- Price: $0.01/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-18
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/pitcrew-transaction-explainer-f42c6f96
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_eMCnaA9xbZXSvla8iGYrM

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 pitcrew-transaction-explainer-f42c6f96
```

Example prompt: Why did this Base transaction fail? Hash is 0x3a1b2c4d5e6f7a8b9c0d1e2f3a4b5c6d7e8f9a0b1c2d3e4f5a6b7c8d9e0f1a2b — can you decode the revert reason and tell me what went wrong?

## When to prefer this

Choose this endpoint when an AI agent or developer needs a plain-language explanation of why a specific EVM transaction failed, including decoding custom Solidity errors and identifying the called method. Ideal for automated debugging pipelines, smart contract development workflows, or DeFi bots that need to interpret on-chain failures programmatically. Supports Ethereum, Base, Arbitrum, Optimism, Polygon, and BSC. At $0.01 USDC per call via x402, it is well-suited for pay-per-use agent workflows where transactions are debugged on demand rather than in bulk.

## Known failure modes

- Invalid or malformed transaction hash (must be 0x-prefixed 64 hex chars) returns an error
- Transaction not found on the specified chain returns a not-found error
- Unsupported chain name returns a validation error
- Network RPC unavailable for the requested chain causes a timeout or 503
- Transaction with no revert data may return limited explanation
- Payment not received (x402) returns 402 Payment Required before processing

## How this service works

Why did my transaction fail? Give a chain and tx hash; get status, decoded method, gas used vs limit, fee, token transfers, events and, for failed transactions, the decoded revert reason (Error(string), Panic codes, custom errors resolved by signature) with a plain-language fix. Pending transactions get a stuck-transaction diagnosis (nonce gap, underpriced fee) and the replace/cancel recipe. Chains: ethereum, base, arbitrum, optimism, polygon, bsc.

## Output

Returns a JSON object containing: the name and arguments of the method that was called, the revert details (kind such as 'custom error' or 'require', and the error signature), the transaction status ('failed' or 'success'), and a human-readable summary sentence explaining what happened. Example: {method, revert: {kind, signature}, status, summary}.

## 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": [
      "chain",
      "hash"
     ],
     "properties": {
      "hash": {
       "type": "string",
       "pattern": "^0x[0-9a-fA-F]{64}$",
       "description": "Transaction hash"
      },
      "chain": {
       "enum": [
        "ethereum",
        "base",
        "arbitrum",
        "optimism",
        "polygon",
        "bsc"
       ],
       "type": "string",
       "description": "Network name"
      }
     }
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object"
    }
   }
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "method": "submitRecord(uint256,uint256,uint256,uint256,bytes)",
  "revert": {
   "kind": "custom error",
   "signature": "RecordAlreadyExists(uint256)"
  },
  "status": "failed",
  "summary": "Failed calling submitRecord(...): custom error RecordAlreadyExists(uint256)."
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/pitcrew-transaction-explainer-f42c6f96/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from pitcrew-api.appin60.com](https://www.zero.xyz/host/pitcrew-api.appin60.com/llms.txt)
