# ABI-Encode Typed Parameters

> ABI-Encode Typed Parameters 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).

ABI-encodes a list of typed parameters into Ethereum ABI binary format

## Facts

- Endpoint: POST https://twin.unykorn.org/abi-encode?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-encode-typed-parameters-6e9ff824
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_vlEsV0LKCn6YHWj9rWJvi

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-encode-typed-parameters-6e9ff824 -d '<json body>'
```

Example prompt: ABI-encode these parameters for me: types are ['address','uint256'] and values are ['0xAbCd...1234', 1000000000000000000] — I need the encoded hex to build a contract call.

## When to prefer this

Use this endpoint when an AI agent needs to ABI-encode Ethereum parameters without a local Web3 library (ethers.js, viem, web3.py) available, or when running in a sandboxed environment that can't execute arbitrary code. Ideal for agents constructing raw contract calldata, multicall payloads, or verifying encoding outputs in a blockchain workflow. It costs $0.002 USDC per call via x402, so prefer a local library when one is available at no cost.

## Known failure modes

- Mismatched types and values arrays length — returns error indicating count mismatch
- Invalid Solidity type strings (e.g. 'uint' without bit size) — returns type parsing error
- Values that don't conform to declared types (e.g. string where uint256 expected) — returns encoding error
- Payment failure or insufficient USDC balance — returns 402 Payment Required
- Malformed JSON request body — returns 400 Bad Request

## How this service works

ABI-encode a list of typed parameters — Genesis402 / UnyKorn Operator Network

## Output

Returns a JSON object with ok:true, the encoded ABI hex string, and a payment receipt including transaction hash, amount paid in USD, and a unique receipt ID. The ABI-encoded result can be used directly as calldata or as part of a larger transaction payload.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "params": {
   "type": "object",
   "properties": {
    "types": {},
    "values": {}
   }
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "ok": true,
  "type": "abi-encode",
  "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-encode-typed-parameters-6e9ff824/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)
