# ABI-Decode Return Data Against Declared Types

> ABI-Decode Return Data Against Declared Types is a paid API for AI agents from twin.unykorn.org, paid per call via x402, $0.002/call, status unknown (last checked 2026-10-01).

Decodes raw ABI-encoded hex data into human-readable values given a list of Solidity types

## Facts

- Endpoint: POST https://twin.unykorn.org/abi-decode?utm_source=zero.xyz
- Price: $0.002/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-01
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/abi-decode-return-data-against-declared-types-b93dab5e
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_4ZkSo7KV-HN3GCvCxqomr

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 abi-decode-return-data-against-declared-types-b93dab5e -d '<json body>'
```

Example prompt: Decode this ABI-encoded hex string for me — 0x000000000000000000000000d8da6bf26964af9d7eed9e03e53415d37aa96045 — it should be a single address type.

## When to prefer this

Choose this endpoint when you have raw ABI-encoded hex data returned from an EVM smart contract call, transaction, or event log and need to convert it into typed, human-readable values without setting up a local Web3 library. Ideal for agents operating in environments where ethers.js or web3.py is unavailable, or when you need a lightweight, pay-per-call decoding step in a larger blockchain automation workflow.

## Known failure modes

- Invalid or malformed 0x hex data returns an error response
- Mismatch between data length and declared types causes decode failure
- Unsupported or unrecognized Solidity types may result in errors
- Empty or missing data field returns a validation error
- Hex string not padded to 32-byte word boundaries may fail to decode

## How this service works

ABI-decode return data against declared types — Genesis402 / UnyKorn Operator Network

## Output

Returns a JSON object with ok: true, the decoded values corresponding to the provided types, a receipt containing a transaction hash, USD amount paid, and a unique receipt ID, plus a generated_at ISO8601 timestamp.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "params": {
   "type": "object",
   "properties": {
    "data": {
     "type": "string",
     "pattern": "^0x[0-9a-fA-F]*$"
    },
    "types": {}
   }
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "ok": true,
  "type": "abi-decode",
  "receipt": {
   "tx_hash": "0x<64hex>",
   "amount_usd": 0.002,
   "receipt_id": "g402-<16hex>"
  },
  "generated_at": "<iso8601>"
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/abi-decode-return-data-against-declared-types-b93dab5e/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from twin.unykorn.org](https://www.zero.xyz/host/twin.unykorn.org/llms.txt)
