# ERC-20 Approve Calldata Builder with Unlimited Allowance Flagging

> ERC-20 Approve Calldata Builder with Unlimited Allowance Flagging is a paid API for AI agents from evm-canon-base.onrender.com, paid per call via x402, $0.01/call, status unknown (last checked 2026-09-15).

Encodes ERC-20 approve() calldata for a given spender and amount, automatically flagging unlimited (max uint256) allowances before any transaction is signed

## Facts

- Endpoint: POST https://evm-canon-base.onrender.com/encode/approve
- Price: $0.01/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-15
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/erc-20-approve-calldata-builder-with-unlimited-allowance-flagging-7fd70266
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_4qc2jME1nXQtD47tQ3ttw

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 erc-20-approve-calldata-builder-with-unlimited-allowance-flagging-7fd70266 -d '<json body>'
```

Example prompt: Build me the approve() calldata to let Uniswap's router (0x4752ba5DBc23f44D87826276BF6Fd6b1C372aD24) spend up to 1000 USDC (0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48, 6 decimals) on my behalf, and let me know if it's flagged as an unlimited allowance.

## When to prefer this

Choose this endpoint when you need ERC-20 approve() calldata with a built-in safety check for unlimited allowances before any signing occurs. It is ideal for DeFi agents that must encode approvals deterministically while surfacing risk signals to users. Prefer it over raw ABI encoding when the unlimited-allowance flag matters for user consent flows, or when you want a single canonical calldata builder without setting up a local ABI library.

## Known failure modes

- Invalid or checksummed token address format returns a 400 error
- Invalid spender address returns a 400 error
- Amount exceeding uint256 max returns a validation error
- Unsupported token or unresolvable decimals may return an error
- Network timeout on the render.com host (cold start latency)
- Payment failure (x402) if USDC balance is insufficient

## How this service works

Build ERC-20 approval calldata, flagging unlimited allowances before anything is signed

## Output

Returns ABI-encoded hex calldata for the ERC-20 approve(address,uint256) function, along with a risk flag indicating whether the allowance is unlimited (max uint256). The agent can pass this calldata directly into a transaction without further encoding. No transaction is submitted; the endpoint is purely a calldata builder.

## 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",
    "bodyType",
    "body"
   ],
   "properties": {
    "body": {
     "type": "object",
     "required": [
      "args"
     ],
     "properties": {
      "args": {
       "type": "object",
       "description": "arguments keyed by parameter name"
      },
      "chain": {
       "description": "chain name, alias or numeric chainId"
      },
      "token": {
       "type": "string",
       "description": "symbol or contract address"
      },
      "value": {
       "type": "string",
       "description": "native value in wei"
      },
      "function": {
       "type": "string",
       "description": "name or full signature (generic route only)"
      }
     }
    },
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "enum": [
      "POST",
      "PUT",
      "PATCH"
     ],
     "type": "string"
    },
    "bodyType": {
     "enum": [
      "json",
      "form-data",
      "text"
     ],
     "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/erc-20-approve-calldata-builder-with-unlimited-allowance-flagging-7fd70266/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from evm-canon-base.onrender.com](https://www.zero.xyz/host/evm-canon-base.onrender.com/llms.txt)
