ERC-20 token approval check on Base
Check how much of a wallet's ERC-20 token a spender contract is approved to move on Base: the raw and formatted allowance, the token symbol and decimals, and whether the approval is unlimited. Use before a swap or deposit to see if an approve transaction is needed, and to audit a wallet for risky unlimited approvals.
Inputs
| Name | Type | Description |
|---|---|---|
token (required) | string | ERC-20 token contract address on Base (0x...) |
owner (required) | string | Wallet address that holds the token (0x...) |
spender (required) | string | Address allowed to spend, usually a router or protocol contract (0x...) |
Request
Over HTTP, with a card key from /credits:
curl -H "Authorization: Bearer adt_…" "https://agent-data-tools.revmesh2074.workers.dev/base-allowance?token=0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913&owner=0x4200000000000000000000000000000000000006&spender=0x000000000022D473030F116dDEE9F6B43aC78BA3"
Or one of your 25 free calls, no key:
curl "https://agent-data-tools.revmesh2074.workers.dev/base-allowance?token=0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913&owner=0x4200000000000000000000000000000000000006&spender=0x000000000022D473030F116dDEE9F6B43aC78BA3&trial=1"
Without a key, the same URL answers 402 Payment Required with x402 and MPP terms, so an agent with a wallet pays per call in USDC (Base, Polygon, Arbitrum, Monad, World Chain or Tempo) and retries.
Example result
{
"chain": "base",
"token": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
"symbol": "USDC",
"decimals": 6,
"owner": "0x4200000000000000000000000000000000000006",
"spender": "0x000000000022D473030F116dDEE9F6B43aC78BA3",
"allowance": "0",
"allowanceFormatted": "0",
"unlimited": false,
"approved": false
}
From an AI agent (MCP)
Add the MCP server to Claude, Cursor or any MCP client. This tool is base_allowance, and the first 25 successful calls are free:
https://agent-data-tools.revmesh2074.workers.dev/mcp