{"uid":"cap_J7TESpUlX4JOB6nfhNGq6","slug":"crypto-microdata-chain-code-inspector-x402-7f97c9cb","name":"Crypto Microdata – Chain Code Inspector (x402)","description":"Pay-per-call crypto microdata for trading/onchain AI agents via x402 (USDC on Base): Base gas, token risk, balances, multi-venue prices, Hyperliquid book/funding, kimchi premium. No API keys.","url":"https://kr-x402-mvp.kgy5612.workers.dev/api/chain/code?utm_source=zero.xyz","method":"GET","headers":{},"bodySchema":{"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":["address"],"properties":{"chain":{"enum":["base","eth"],"type":"string","description":"base (default) or eth mainnet"},"address":{"type":"string","pattern":"^0x[0-9a-fA-F]{40}$","examples":["0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913"],"description":"Address to inspect"}},"additionalProperties":false}},"additionalProperties":false},"output":{"type":"object","required":["type"],"properties":{"type":{"type":"string"},"example":{"type":"object"}}}}},"responseSchema":{"type":"json","example":{"kind":"ERC20","next":["/crypto/token-risk?address=0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","/crypto/allowance?owner=&spender="],"safe":null,"chain":"base","flags":["upgradeable_proxy","has_owner","admin_can_change_logic"],"owner":"0x...","proxy":{"type":"ZEPPELINOS_LEGACY","admin":"0x4fc7850364958d97b4d3f5a08f79db2493f8ca44","beacon":null,"is_proxy":true,"implementation":"0x2ce6311ddae708829bc0784c967b7d77d19fd779"},"token":{"name":"USD Coin","symbol":"USDC","decimals":6,"total_supply":4100000000},"address":"0x833589fcd6edb6e08f4c7c32d4f71b54bda02913","summary":"ERC20 USDC behind ZEPPELINOS_LEGACY proxy, has owner","chain_id":8453,"checked_at":"2026-10-30T03:40:00Z","interfaces":{"erc165":false,"erc721":false,"erc1155":false},"is_contract":true,"native_balance":0,"code_size_bytes":1852,"owner_renounced":false}},"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.002","displayCostAsset":"USDC","priceDynamic":false,"priceHint":null,"priceStatus":"priced","priceSource":"probe","requiresHandshake":false,"reviewCount":0,"rating":{"score":"0.00","successRate":"0.00","reviews":0,"stars":null,"state":"unrated"},"availabilityStatus":"unknown","priceObserved":null,"sessionDeposit":null,"pricing":{"kind":"static","summary":"$0.002/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.002","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.002","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_iMgmucZeBLhDtnlTCyxfx","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.002","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Returns ERC20/contract metadata for a given on-chain address on Base or Ethereum: kind, proxy type, owner, flags, token info, and suggested next endpoints.","exampleAgentPrompt":"What kind of contract is 0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913 on Base — is it a proxy, who owns it, and are there any admin risk flags I should know about?","exampleUseCases":[{"title":"Pre-trade token contract risk check","prompt":"Before my agent swaps into this token at 0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913 on Base, can you check if it's a proxy contract with an upgradeable admin or any other risk flags?"},{"title":"Token metadata lookup for DeFi dashboard","prompt":"Pull the name, symbol, decimals, and total supply for the contract at 0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48 on Ethereum mainnet so I can display it on my portfolio tracker."},{"title":"EOA vs contract classification","prompt":"Is the address 0x4fc7850364958d97b4d3f5a08f79db2493f8ca44 on Base actually a smart contract or just a regular wallet?"}],"resultDescription":"A JSON object with: `kind` (e.g. ERC20), `chain`, `address`, `is_contract`, `owner`, `owner_renounced`, `proxy` (type, admin, implementation, beacon, is_proxy), `flags` (array of risk strings like 'upgradeable_proxy', 'has_owner', 'admin_can_change_logic'), `token` (name, symbol, decimals, total_supply), `interfaces` (erc165/erc721/erc1155 booleans), `native_balance`, `code_size_bytes`, `summary` (human-readable one-liner), `safe` (null or safety verdict), `checked_at` (ISO timestamp), and `next` (array of suggested follow-up endpoint paths).","failureModes":["Invalid address format (must be 0x + 40 hex chars) → 400 error","Address is not a deployed contract → is_contract: false, limited metadata","Unsupported chain value → 400 or default to Base","Payment not received (x402 flow incomplete) → 402 Payment Required","Network timeout reading on-chain data → 5xx or partial response","Rate limiting or worker overload → 503"],"whenToPreferThis":"Use this endpoint when you need a quick, structured snapshot of what a contract address actually is before interacting with it — especially for risk assessment (proxy type, admin flags, owner) and token metadata (name/symbol/decimals). Prefer it over raw RPC calls when you want pre-parsed risk flags and suggested next steps, and when you want a pay-per-call model with no API key setup. Not ideal if you need live price data (use the multi-venue price endpoint) or full audit-level security analysis.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-31T18:40:52.153Z","isFirstParty":false,"canonicalSlug":"crypto-microdata-chain-code-inspector-x402-7f97c9cb"}