81trust / 100
Onchain Allowance
by dt0ur.online in Onchain & crypto
x402 APIPassing, checked 3 h ago
Check an ERC-20 token approval on base, ethereum, arbitrum, optimism, polygon, bsc: how much a spender (router, Permit2, contract) may move from an owner's wallet, whether the approval is unlimited, and whether it covers the owner's full balance.
POST https://dt0ur.online/api/onchain/allowance
Last 30 days
All checks passedSome failedAll failedNot checked
- Uptime
- 100%
- Response time
- 230 ms typical, 230 ms slowest 5%
- Last check
- 3 h ago
- Next check
- any minute now
How to call it
# See the payment challenge (nothing is charged)
curl -i -X POST "https://dt0ur.online/api/onchain/allowance" \
-H "content-type: application/json" \
-d '{"chain":"base","owner":"0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045","spender":"0x000000000022D473030F116dDEE9F6B43aC78BA3","token":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913"}'import { wrapFetchWithPayment } from "@x402/fetch";
import { x402Client } from "@x402/core/client";
import { ExactEvmScheme } from "@x402/evm/exact/client";
import { privateKeyToAccount } from "viem/accounts";
const client = new x402Client().register(
"eip155:8453",
new ExactEvmScheme(privateKeyToAccount(process.env.AGENT_KEY)),
);
const pay = wrapFetchWithPayment(fetch, client);
// Not sure it's safe to pay? Preflight it first for $0.005:
// GET https://toolvet.app/api/v1/check?url=https%3A%2F%2Fdt0ur.online%2Fapi%2Fonchain%2Fallowance
const res = await pay("https://dt0ur.online/api/onchain/allowance", {
method: "POST",
headers: { "content-type": "application/json" },
body: JSON.stringify({"chain":"base","owner":"0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045","spender":"0x000000000022D473030F116dDEE9F6B43aC78BA3","token":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913"}),
});
console.log(await res.json());Example input
{
"chain": "base",
"owner": "0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045",
"spender": "0x000000000022D473030F116dDEE9F6B43aC78BA3",
"token": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913"
}Example output
{
"allowance": 0,
"allowance_raw": "0",
"can_spend_full_balance": false,
"chain": "base",
"is_unlimited": false,
"owner": "0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045",
"owner_balance": 43.286078,
"spender": "0x000000000022D473030F116dDEE9F6B43aC78BA3",
"symbol": "USDC",
"token": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913"
}Security scan
- No findings. We scan names, descriptions and tool definitions for hidden instructions and other prompt-injection patterns.
Recent checks
| When | Result | HTTP | Time | Price |
|---|---|---|---|---|
| 3 h ago | Passed | 402 | 326 ms | $0.01 |
| 6 h ago | Passed | 402 | 230 ms | $0.01 |
| 11 h ago | Passed | 402 | 197 ms | $0.01 |