{"uid":"cap_ze768zmEQP1AISNfq8_il","slug":"riley-craig-x402-agent-store-chain-code-size-checker-6d8b7249","name":"Riley Craig x402 Agent Store — Chain Code Size Checker","description":"Is an address a smart contract or a regular wallet (EOA)? Returns whether deployed bytecode exists and its size via eth_getCode, across Base, Ethereum, Optimism, Arbitrum, Polygon, Gnosis. The safety/identity read wallet, payment and trading agents make before interacting with an address. Live public RPC; one paid call at $0.001.","url":"https://x402-agent-store.rileycraig14.workers.dev/chain/code","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":{"type":"string","description":"base|ethereum|optimism|arbitrum|polygon|gnosis (default base)"},"address":{"type":"string","description":"Address to check (0x...)"}}}},"additionalProperties":false},"output":{"type":"object","required":["type"],"properties":{"type":{"type":"string"},"example":{"type":"object","properties":{"code_size":{"type":"number"},"is_contract":{"type":"boolean"}}}}}}},"responseSchema":{"type":"json","example":{"chain":"base","address":"0x...","code_size":12873,"is_contract":true}},"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.09","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.09/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.09","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.09","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_taLw1Q-WMS4Ka44iy5Hsg","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.09","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Checks whether a given blockchain address is a smart contract by inspecting its on-chain bytecode size, across multiple EVM-compatible chains.","exampleAgentPrompt":"Check whether 0x1234567890abcdef1234567890abcdef12345678 on Base is a smart contract or just a regular wallet address, and tell me its code size.","exampleUseCases":[{"title":"Validate counterparty before sending funds","prompt":"Before I send tokens to 0x9876543210fedcba9876543210fedcba98765432 on Ethereum, can you verify whether it's actually a smart contract or a regular wallet? I want to make sure I'm not sending to an empty account or something unexpected."},{"title":"Audit suspicious token contract addresses","prompt":"I need to check if 0xabcdefabcdefabcdefabcdefabcdefabcdefabcd on Polygon is really a deployed smart contract or just someone claiming to have a token. Pull the bytecode size and let me know if it's legit."},{"title":"Cross-chain address identity verification","prompt":"I'm seeing the same address 0x1111111111111111111111111111111111111111 used across multiple chains. Can you tell me which ones actually have this deployed as a contract versus which ones it's just an EOA, starting with Arbitrum and Optimism?"}],"resultDescription":"Returns a JSON object with the queried chain name, address, code_size in bytes, and a boolean is_contract field indicating whether the address has deployed bytecode (true = smart contract, false = EOA or empty account).","failureModes":["Missing required 'address' query param returns a validation error","Invalid or malformed address (not 0x hex) may return an error or zero code_size","Unsupported chain name may fall back to default (Base) or return an error","Payment failure via x402 returns HTTP 402 before the query is processed","Address on a chain where it has no deployed code returns is_contract: false with code_size: 0"],"whenToPreferThis":"Use this endpoint when you need to programmatically determine whether a specific EVM address is a smart contract (has deployed bytecode) or an externally owned account (EOA), across chains like Base, Ethereum, Optimism, Arbitrum, Polygon, or Gnosis. Ideal for agents performing on-chain due diligence, validating counterparty addresses, or enriching address metadata. Costs only $0.001 USDC per call with no API key required.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-14T18:43:33.150Z","isFirstParty":false}