# ABI Encode/Decode — EVM Calldata Builder

> ABI Encode/Decode — EVM Calldata Builder is a paid API for AI agents from api.agentstools.dev, paid per call via x402, $0.003/call, status unknown (last checked 2026-09-15).

ABI-encode a Solidity function call (selector + args) or encode/decode arbitrary ABI types to build and parse EVM calldata correctly.

## Facts

- Endpoint: POST https://api.agentstools.dev/crypto/abi
- Price: $0.003/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-15
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/abi-encode-decode-evm-calldata-builder-353c9674
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_nc90x1HomstDoh-_bOSWS

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-decode-evm-calldata-builder-353c9674 -d '<json body>'
```

Example prompt: ABI-encode a function call to transfer(address,uint256) with args ['0xAbC123...', 1000000000000000000] so I have the correct EVM calldata hex to submit on-chain.

## When to prefer this

Use this endpoint when an agent needs to programmatically construct or parse EVM calldata without a local Solidity/ethers.js environment — ideal for serverless agents that need to prepare raw transactions, verify calldata from on-chain events, or serialize arguments for multicall patterns. Prefer over manual encoding when correctness of ABI padding and selector computation is critical.

## Known failure modes

- Invalid function signature format — returns error if signature does not match Solidity ABI syntax
- Mismatched argument count or types — fails if args array length doesn't match the signature's parameter list
- Malformed 0x hex input for decode — error if data is not valid hex-encoded ABI bytes
- Missing required fields (op, signature, types, args) — 400 error for incomplete requests
- Type mismatch — encoding a string where uint256 is expected returns a type coercion error

## How this service works

ABI-encode a function call (selector + args) or encode/decode arbitrary ABI types — build and parse EVM calldata correctly.

## Output

Returns ABI-encoded hex string for encode/encode_call operations, or a structured array of decoded typed values for decode operations. For encode_call, includes the 4-byte function selector prepended to the encoded arguments.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "op": {
   "enum": [
    "encode_call",
    "encode",
    "decode"
   ],
   "type": "string"
  },
  "args": {
   "type": "array",
   "description": "Argument values for op=encode_call/encode"
  },
  "data": {
   "type": "string",
   "description": "0x calldata/abi bytes for op=decode"
  },
  "types": {
   "type": "array",
   "items": {
    "type": "string"
   },
   "description": "ABI type list for op=encode/decode"
  },
  "signature": {
   "type": "string",
   "description": "Function signature for op=encode_call, e.g. transfer(address,uint256)"
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/abi-encode-decode-evm-calldata-builder-353c9674/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from api.agentstools.dev](https://www.zero.xyz/host/api.agentstools.dev/llms.txt)
