# Base Onchain Tools – ERC-20 Allowance Check

> Base Onchain Tools – ERC-20 Allowance Check is a paid API for AI agents from base-onchain-tools.dolerite.workers.dev, paid per call via x402, $0.001/call, status unknown (last checked 2026-10-10).

Checks whether a given spender address has an active ERC-20 token approval from a token holder on Base mainnet, returning the verdict and approval details.

## Facts

- Endpoint: GET https://base-onchain-tools.dolerite.workers.dev/v1/base/allowance?utm_source=zero.xyz
- Price: $0.001/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-10
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/base-onchain-tools-erc-20-allowance-check-e36d9a67
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_eGk1GMhAbfQ5HE2nXZpdN

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 base-onchain-tools-erc-20-allowance-check-e36d9a67
```

Example prompt: Check whether the Uniswap v3 router (0x2626664c2603336E57B271c5C0b26F421741e481) is approved to spend USDC from my wallet 0xAbCd1234...5678 on Base mainnet.

## When to prefer this

Choose this endpoint when you need a quick, cheap, read-only check of ERC-20 allowances on Base mainnet without setting up a wallet, API key, or RPC infrastructure. Ideal for pre-flight checks before DeFi transactions, security audits of token approvals, or any agent flow that must gate on whether a spender is authorized. Prefer this over raw RPC calls because it abstracts multi-provider failover, returns a human-readable verdict, and charges nothing on failure.

## Known failure modes

- Invalid or non-checksummed Ethereum address returns 4xx with no charge
- Token address not found or not an ERC-20 contract returns an error
- Upstream RPC outage across all five providers causes a 5xx with no charge
- Missing required owner or spender query parameters returns 4xx
- Network timeout on Base mainnet read returns 5xx with no charge

## How this service works

Eleven read-only endpoints answering questions about Base mainnet that are tedious to assemble from raw RPC: what an unverified contract is actually able to do, whether a token transfer will revert and for what reason, what an arbitrary token is worth, and whether an address is safe to pay. Priced $0.001-$0.04 per call in USDC over x402. No account, no API key, no signup, no minimum, no rate limit to negotiate — the payTo address in the 402 response is the whole integration. Failed calls are not billed. The payment middleware cancels settlement on any 4xx or 5xx, so a malformed parameter or an upstream outage costs nothing. Answers are read live from Base mainnet at request time, with failover across five independent RPC providers. A batch that comes back incomplete is treated as a failure rather than returned with the missing entries as zeros, because a confident wrong answer costs a caller more than an error does. Scope is deliberately narrow: Base mainnet only, reads only, no keys held, nothing stored between requests.

## Output

Returns a JSON object with a verdict field (e.g. 'no-approval', 'approved', 'unlimited'), the token_symbol, and an unlimited_approval boolean indicating whether the spender has been granted an unlimited allowance.

## 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": {
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "enum": [
      "GET"
     ],
     "type": "string"
    },
    "queryParams": {
     "type": "object",
     "required": [
      "owner",
      "spender"
     ],
     "properties": {
      "owner": {
       "type": "string",
       "description": "Token holder address"
      },
      "token": {
       "type": "string",
       "description": "Optional ERC-20 contract, defaults to USDC on Base"
      },
      "spender": {
       "type": "string",
       "description": "Address allowed to spend"
      }
     }
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object"
    }
   }
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "verdict": "no-approval",
  "token_symbol": "USDC",
  "unlimited_approval": false
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/base-onchain-tools-erc-20-allowance-check-e36d9a67/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from base-onchain-tools.dolerite.workers.dev](https://www.zero.xyz/host/base-onchain-tools.dolerite.workers.dev/llms.txt)
