# TxSim Decoder

> TxSim Decoder is a paid API for AI agents from simulate.cyberwarex.com, paid per call via x402, $0.002/call, status unknown (last checked 2026-09-14).

Decodes raw EVM calldata into a named function, signature, and arguments, and flags security risks like unlimited token approvals or ownership transfers — without simulation or an API key.

## Facts

- Endpoint: GET https://simulate.cyberwarex.com/decode
- Price: $0.002/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-14
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/txsim-decoder-cae0ad63
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_y0ZEEKsXVQJKjpYFpMIo4

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 txsim-decoder-cae0ad63
```

Example prompt: Before I sign this transaction, can you decode the calldata 0x095ea7b3000000000000000000000000deadbeef000000000000000000000000ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff and tell me what function it's calling and whether it looks risky?

## When to prefer this

Choose this endpoint when an agent needs a fast, keyless, no-simulation way to decode and risk-screen raw EVM calldata before presenting a transaction to a user for signing. Ideal for wallet agents, DeFi automation bots, and security screening pipelines where cost and latency matter and full simulation is overkill. Prefer over full EVM simulators when you only need function identity and static risk flags, not execution traces or state diffs.

## Known failure modes

- Calldata too short or malformed hex returns a parse error
- Unknown 4-byte selector cannot be resolved to a function name, flagged as unknown selector risk
- Missing required 'data' query parameter returns a validation error
- Calldata with no arguments beyond the selector may return empty args array
- Non-EVM or non-hex input will fail pattern validation

## How this service works

Decode raw EVM calldata into a named function, signature and arguments, plus security risk flags (unlimited token approval, setApprovalForAll, ownership transfer, unknown selector, native value transfer). Keyless, deterministic, no simulation - the cheap way for an agent to understand and risk-screen a piece of calldata before signing.

## Output

Returns a decoded object with the function name, full signature, and parsed arguments, plus a risk assessment object containing a severity level (none, caution, or danger) and specific security flags such as unlimited token approval, setApprovalForAll, ownership transfer, unknown selector, or native value transfer. Also includes a disclaimer string.

## 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",
      "HEAD",
      "DELETE"
     ],
     "type": "string"
    },
    "queryParams": {
     "type": "object",
     "required": [
      "data"
     ],
     "properties": {
      "to": {
       "type": "string",
       "pattern": "^0x[a-fA-F0-9]{40}$",
       "description": "Target address (optional, for context only)."
      },
      "data": {
       "type": "string",
       "pattern": "^0x[a-fA-F0-9]*$",
       "description": "Transaction calldata (hex, 4-byte selector + ABI args)."
      }
     },
     "additionalProperties": false
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object",
     "properties": {
      "risk": {
       "type": "object",
       "description": "level (none|caution|danger) + flags."
      },
      "decoded": {
       "type": "object",
       "description": "function, signature, args."
      },
      "disclaimer": {
       "type": "string"
      }
     }
    }
   }
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/txsim-decoder-cae0ad63/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from simulate.cyberwarex.com](https://www.zero.xyz/host/simulate.cyberwarex.com/llms.txt)
