# ERC20 ABI Encoder

> ERC20 ABI Encoder is a paid API for AI agents from chargers-borders-cedar-fig.trycloudflare.com, paid per call via x402, price unknown, status unknown (last checked 2026-09-14).

Encodes ERC-20 token contract method calls into ABI-encoded hex data for use in Ethereum transactions

## Facts

- Endpoint: POST https://chargers-borders-cedar-fig.trycloudflare.com/tools/erc20-encode
- Price: price unknown
- Payment: x402
- Status: unknown
- Last checked: 2026-09-14
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/erc20-abi-encoder-131c6732
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_xoXD-qHsnWbRG8S16iCsm

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 erc20-abi-encoder-131c6732 -d '<json body>'
```

Example prompt: Encode an ERC-20 transfer call for sending 1000 USDC (6 decimals, so 1000000000 raw units) to address 0xAbCd...1234 — I need the ABI-encoded hex calldata to include in a raw Ethereum transaction.

## When to prefer this

Use this endpoint when you need to programmatically encode ERC-20 function calls into ABI hex calldata without importing a full Web3 library (ethers.js, web3.py). It is ideal for lightweight agents or serverless environments where installing blockchain SDKs is undesirable, and when constructing raw Ethereum transactions or eth_call payloads for standard ERC-20 methods like transfer, approve, transferFrom, balanceOf, and allowance.

## Known failure modes

- Invalid or missing method name returns an error response
- Incorrect parameter types or count cause encoding failure
- Malformed address (wrong length or non-hex) causes validation error
- Missing required 'type' or 'method' fields in the input object returns 400
- Unsupported ERC-20 method name not in the standard ABI returns an unknown method error

## How this service works

opentools utility endpoint

## Output

Returns ABI-encoded hex calldata representing the specified ERC-20 method call, ready to be included as the 'data' field in a raw Ethereum transaction or used with eth_call.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "$schema": "https://json-schema.org/draft/2020-12/schema",
 "required": [
  "input"
 ],
 "properties": {
  "input": {
   "type": "object",
   "required": [
    "type",
    "method"
   ],
   "properties": {
    "body": {
     "type": "object"
    },
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "enum": [
      "POST",
      "PUT",
      "PATCH"
     ],
     "type": "string"
    },
    "bodyType": {
     "type": "string"
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object"
    }
   }
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/erc20-abi-encoder-131c6732/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from chargers-borders-cedar-fig.trycloudflare.com](https://www.zero.xyz/host/chargers-borders-cedar-fig.trycloudflare.com/llms.txt)
