# x402 Calldata Safety Decoder

> x402 Calldata Safety Decoder is a paid API for AI agents from x402-services-production.up.railway.app, paid per call via x402, $0.05/call, status unknown (last checked 2026-09-15).

Decodes raw EVM calldata into its function name and arguments, and flags dangerous transaction patterns like unlimited approvals, setApprovalForAll, permit, and transferFrom.

## Facts

- Endpoint: POST https://x402-services-production.up.railway.app/api/safety/decode
- Price: $0.05/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-15
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/x402-calldata-safety-decoder-6695bc13
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_2Ips0RL1BxKXMUJ8LX8Ql

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 x402-calldata-safety-decoder-6695bc13 -d '<json body>'
```

Example prompt: Before I sign this transaction, can you decode this calldata and tell me if it contains anything dangerous like an unlimited approval or setApprovalForAll? Here's the data: 0x095ea7b3000000000000000000000000deadbeefdeadbeefdeadbeefdeadbeefdeadbeefdeadbeef000000000000000000000000000000000000000000000000ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff

## When to prefer this

Use this endpoint when you need to understand what an EVM transaction actually does before signing it — especially when the calldata is opaque hex and you want to detect dangerous approval patterns. Ideal for wallet security checks, DeFi transaction review, phishing detection, and any agentic flow that needs to gate on transaction safety before proceeding.

## Known failure modes

- Invalid or malformed calldata returns a parse error
- Unrecognized function selector (not in ABI registry) may return partial decode or unknown function name
- Empty or missing 'data' field returns a 400 validation error
- Very short calldata (less than 4 bytes) cannot identify a function selector
- Network timeout or service unavailability returns 5xx error

## How this service works

Decode raw calldata into its function + arguments and flag dangerous patterns (unlimited approve, setApprovalForAll, permit, transferFrom). Send { data }. Understand what a transaction actually does before signing.

## Output

Returns the decoded function name and its parsed arguments from the raw calldata, along with boolean or labeled flags indicating whether the transaction contains dangerous patterns such as unlimited ERC-20 approve, setApprovalForAll, permit signatures, or transferFrom calls — helping the user understand what a transaction actually does before signing it.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "required": [
  "data"
 ],
 "properties": {
  "data": {
   "type": "string",
   "description": "0x calldata blob"
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/x402-calldata-safety-decoder-6695bc13/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from x402-services-production.up.railway.app](https://www.zero.xyz/host/x402-services-production.up.railway.app/llms.txt)
