# ABI Encode – EVM Contract Function Calldata Encoder

> ABI Encode – EVM Contract Function Calldata Encoder is a paid API for AI agents from api.vextorium.com, paid per call via x402, $0.003/call, status unknown (last checked 2026-10-15).

Encodes a Solidity function signature and arguments into ABI-encoded calldata (selector + hex data) ready to sign, broadcast, or simulate on EVM chains.

## Facts

- Endpoint: POST https://api.vextorium.com/v1/abi-encode?utm_source=zero.xyz
- Price: $0.003/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-15
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/abi-encode-evm-contract-function-calldata-encoder-e67cab33
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_zAbQgEQ5-7VqqCCGvokJh

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-evm-contract-function-calldata-encoder-e67cab33 -d '<json body>'
```

Example prompt: Encode the calldata for calling transfer(address,uint256) on an ERC-20 contract, with recipient 0x7e5F4552091A69125d5DfCb7b8C2659029395Bdf and amount 1000000.

## When to prefer this

Choose this endpoint when you need to programmatically construct raw EVM calldata from a Solidity function signature and typed arguments — especially for transaction simulation, raw signing, or building payloads for multicall contracts. Prefer it over client-side ethers.js/viem encoding when running in a server-less or agent context without a JS runtime, or when you need a lightweight HTTP call to produce deterministic calldata without installing a full Web3 library.

## Known failure modes

- Invalid or malformed function signature returns an error (e.g. missing parentheses or unknown types)
- Argument count mismatch with the function signature causes encoding failure
- Unsupported Solidity types (e.g. tuple/struct variants) may not encode correctly
- Malformed address arguments (wrong length or non-hex) cause encoding errors
- Empty or missing function field returns a validation error

## How this service works

Encode a contract function call (calldata) from its signature and arguments, e.g. transfer(address,uint256) with [to, amount]: selector and hex data ready to sign or simulate.

## Output

Returns a JSON object with the hex-encoded calldata string (including 4-byte selector prefix), the isolated 4-byte function selector, the canonical function signature string, and the total byte length of the calldata. For example: {"calldata":"0xa9059cbb0000...","selector":"0xa9059cbb","function":"transfer(address,uint256)","bytes":68}.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "function": {
   "type": "string"
  },
  "arguments": {
   "type": "array"
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "bytes": 68,
  "calldata": "0xa9059cbb0000000000000000000000007e5f4552091a69125d5dfcb7b8c2659029395bdf00000000000000000000000000000000000000000000000000000000000f4240",
  "function": "transfer(address,uint256)",
  "selector": "0xa9059cbb"
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/abi-encode-evm-contract-function-calldata-encoder-e67cab33/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from api.vextorium.com](https://www.zero.xyz/host/api.vextorium.com/llms.txt)
