# Optimism ERC-20 Allowance

> Optimism ERC-20 Allowance is a paid API for AI agents from agent-data-tools.revmesh2074.workers.dev, paid per call via x402, $0.01/call, status unknown (last checked 2026-10-29).

Returns the ERC-20 token allowance on Optimism — how much a spender is approved to move from an owner's wallet, in both raw and human-readable units, plus whether the approval is unlimited.

## Facts

- Endpoint: GET https://agent-data-tools.revmesh2074.workers.dev/op/allowance?utm_source=zero.xyz
- Price: $0.01/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-29
- Activations on Zero: 0
- Provider: agent-data-tools.revmesh2074.workers.dev
- Website: https://agent-data-tools.revmesh2074.workers.dev
- Tags: x402
- Canonical page: https://www.zero.xyz/c/agent-data-tools-revmesh2074-workers-dev-optimism-erc-20-allowance-59cbdd38
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_B389u9HqOvPEiSLKyWmK2

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 agent-data-tools-revmesh2074-workers-dev-optimism-erc-20-allowance-59cbdd38
```

Example prompt: Check how much USDC the Uniswap Permit2 contract (0x000000000022D473030F116dDEE9F6B43aC78BA3) is allowed to spend from my Optimism wallet 0xAbCd...1234 — I want to know the allowance amount and whether it's unlimited.

## When to prefer this

Use this endpoint when you need to check or audit a token allowance on the Optimism network specifically. Prefer it over generic blockchain RPC calls because it resolves token tickers (USDC, WETH) without requiring the contract address, returns the allowance in both raw and human-readable units, and explicitly flags unlimited approvals. Choose over similar endpoints on other chains when your owner wallet and token are on Optimism (OP Mainnet). Use op_token_balance instead if you need the owner's actual token balance rather than an approval amount.

## Known failure modes

- 404 — token contract address not found on Optimism (uncharged)
- 422 — contract exists but is not an ERC-20 token (uncharged)
- Invalid owner or spender address format returns an error
- Network or RPC timeout if Optimism node is temporarily unreachable

## How this service works

ERC-20 token allowance on Optimism: how much a spender may move from an owner's wallet (allowance), raw and in token units, and whether the approval is unlimited. Use to check an approval before a swap or to audit risky open approvals; for the owner's balance use op_token_balance. Token is a ticker (USDC, USDT, WETH…) or a 0x contract; a missing contract is 404 and a non-ERC-20 422, both uncharged.

## Output

Returns a JSON object with the allowance in human-readable token units (allowance field), the raw integer allowance string (raw), a boolean flag indicating whether the approval is unlimited (unlimited), plus token metadata: symbol, decimals, chain name, and chainId, along with the owner and spender addresses echoed back for confirmation.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "required": [
  "token",
  "owner",
  "spender"
 ],
 "properties": {
  "owner": {
   "type": "string",
   "description": "0x wallet that gave the approval"
  },
  "token": {
   "type": "string",
   "description": "Token: a ticker such as USDC or WETH, or the 0x ERC-20 contract address"
  },
  "spender": {
   "type": "string",
   "description": "0x contract or wallet allowed to spend (the example is Uniswap Permit2)"
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "raw": {
   "type": "string"
  },
  "chain": {
   "type": "string"
  },
  "owner": {
   "type": "string"
  },
  "token": {
   "type": "string"
  },
  "symbol": {
   "type": "string"
  },
  "chainId": {
   "type": "number"
  },
  "spender": {
   "type": "string"
  },
  "decimals": {
   "type": "number"
  },
  "allowance": {
   "type": "string"
  },
  "unlimited": {
   "type": "boolean"
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/agent-data-tools-revmesh2074-workers-dev-optimism-erc-20-allowance-59cbdd38/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from agent-data-tools.revmesh2074.workers.dev](https://www.zero.xyz/host/agent-data-tools.revmesh2074.workers.dev/llms.txt)
