# ABI Function Call Encoder (Calldata Generator)

> ABI Function Call Encoder (Calldata Generator) 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-16).

Encodes a Solidity function signature and its arguments into ABI-encoded calldata (selector + hex data) ready for signing or simulating on-chain.

## Facts

- Endpoint: POST https://api.vextorium.com/abi-codificar-pago?utm_source=zero.xyz
- Price: $0.003/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-16
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/abi-function-call-encoder-calldata-generator-1d544ec0
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_kKvzmq-YODP8cN8ZUZiCV

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-function-call-encoder-calldata-generator-1d544ec0 -d '<json body>'
```

Example prompt: Encode the calldata for transfer(address,uint256) with arguments [0x7e5f4552091a69125d5dfcb7b8c2659029395bdf, 1000000] so I can sign and submit the transaction.

## When to prefer this

Choose this endpoint when you need to quickly generate raw EVM calldata from a function signature string and typed arguments without running a local ethers.js/web3.py library or a full node. Ideal for lightweight agent pipelines that need to prepare transaction data, simulate calls, or pass calldata to a signing service without setting up a local ABI encoding stack.

## Known failure modes

- Invalid or malformed function signature returns an error
- Wrong number or type of arguments relative to signature causes encoding failure
- Unsupported Solidity types in the signature may not be handled
- Malformed Ethereum address argument causes a parsing error
- Empty or missing 'funcion' 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 containing: the canonical function signature string, the 4-byte function selector (e.g. 0xa9059cbb), the full ABI-encoded calldata hex string including selector and encoded arguments, and the total byte length of the calldata.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "funcion": {
   "type": "string"
  },
  "argumentos": {
   "type": "array"
  }
 }
}
```

## Response schema (JSON Schema)

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

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/abi-function-call-encoder-calldata-generator-1d544ec0/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)
