{"uid":"cap_UnabsS7XOF9OoQzAUYkwD","slug":"base-address-contract-checker-3a3a359f","name":"Base Address Contract Checker","description":"Is a Base address a smart contract or an EOA? Returns is_contract and bytecode size. Use when an agent must decide whether a recipient is a contract before sending funds or approving it.","url":"https://x402-data-api.sigrunner.workers.dev/chain/is-contract?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","properties":{"address":{"type":"string","description":"0x-prefixed 20-byte Base address"}}}},"additionalProperties":false},"output":{"type":"object","required":["type"],"properties":{"type":{"type":"string"},"example":{"type":"object","required":["address","is_contract","code_bytes","chain"],"properties":{"chain":{"type":"string"},"address":{"type":"string"},"code_bytes":{"type":"integer"},"is_contract":{"type":"boolean"}}}}}}},"responseSchema":{"type":"json","example":{"chain":"base","address":"0x4200000000000000000000000000000000000006","code_bytes":2000,"is_contract":true}},"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_geB4yGlYvVCD9g2pHvxpk","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":"Determines whether a Base mainnet address is a smart contract or an externally owned account (EOA), returning a boolean flag and bytecode size.","exampleAgentPrompt":"Before I send funds to 0x4200000000000000000000000000000000000006 on Base, can you check whether it's a smart contract or a regular wallet address?","exampleUseCases":[{"title":"Pre-transfer contract safety check","prompt":"I'm about to send 500 USDC to 0xAbCd1234AbCd1234AbCd1234AbCd1234AbCd1234 on Base — can you first confirm whether that address is a smart contract or just a regular EOA wallet?"},{"title":"DeFi approval gate for contract recipients","prompt":"Before my agent approves a token allowance to 0x7d2768dE32b0b80b7a3454c06BdAc94A69DDc7A9 on Base, check if it's actually a deployed contract so we don't accidentally approve a random wallet."},{"title":"Automated recipient classification in payment flow","prompt":"I'm building a payment pipeline on Base and need to know if 0x3fC91A3afd70395Cd496C647d5a6CC9D4B2b7FAD is a contract or a plain address — what does the bytecode check say?"}],"resultDescription":"Returns a JSON object with the queried address, a boolean is_contract field (true if bytecode is present), an integer code_bytes indicating bytecode size, and the chain identifier ('base'). An EOA will have code_bytes of 0 and is_contract of false; a deployed contract will have code_bytes > 0 and is_contract of true.","failureModes":["Missing or malformed address parameter — no query param provided or not a valid 0x-prefixed 20-byte hex string","Address not found / zero-address edge cases returning ambiguous results","Network or RPC errors on Base mainnet causing lookup failure","Payment failure (x402 USDC payment not fulfilled) resulting in 402 response","Rate limiting or infrastructure errors returning 5xx responses"],"whenToPreferThis":"Use this endpoint when an agent needs to make a binary contract-vs-EOA determination on a Base mainnet address before executing a financial operation such as sending funds, approving token allowances, or whitelisting recipients. It is more lightweight than full contract ABI fetching and purpose-built for the Base chain. Prefer it over generic Ethereum explorers when operating within a Base-native agent workflow that already handles x402 micropayments.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-25T10:46:28.955Z","isFirstParty":false,"canonicalSlug":"base-address-contract-checker-3a3a359f"}