{"uid":"cap_WMdml8BVdc8TGLpHUiati","slug":"contract-identity-7f358858","name":"Contract Identity","description":"🆕 What sits at a Base address: contract or plain wallet, and if a contract, whether it declares ERC-721 or ERC-1155 via ERC-165 or carries the ERC-20 shape, plus name, symbol, decimals and code size. Interface support is read from the contract's own declaration first and only inferred when there is none — the ordering matters, because NFTs answer totalSupply() too.","url":"https://402.com.tr/api/x402/contract-info","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"},"pathParams":{"type":"object"},"queryParams":{"type":"object","required":["address"],"properties":{"address":{"type":"string","description":"Contract address"}}}},"additionalProperties":false},"output":{"type":"object","required":["type"],"properties":{"type":{"type":"string"},"example":{"type":"object"}}}}},"responseSchema":null,"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_0RFHQogM__bgY1hDriAem","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":"Identifies whether a Base address is a contract or EOA wallet, detects token standards (ERC-20, ERC-721, ERC-1155) via ERC-165 and interface inference, and returns name, symbol, decimals, and bytecode size.","exampleAgentPrompt":"Can you check what type of contract is at Base address 0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913 — is it an ERC-20, NFT, or just a regular wallet, and what's its name, symbol, and decimals?","exampleUseCases":[{"title":"Unknown token address classification","prompt":"I've got this Base address 0x4200000000000000000000000000000000000006 and I don't know what it is — can you tell me whether it's a regular wallet, a fungible token, or an NFT contract, and give me its name and symbol?"},{"title":"NFT vs fungible token disambiguation","prompt":"Before I list this Base contract 0x7Fc66500c84A76Ad7e9c93437bFc5Ac33E2DDaE9 as an NFT on my platform, can you confirm whether it actually declares ERC-721 or ERC-1155, or if it's just an ERC-20?"},{"title":"Smart contract deployment verification","prompt":"We just deployed a contract to Base at 0xd9aAEc86B65D86f6A7B5B1b0c42FFA531710b6CA — can you verify it has bytecode on-chain and tell me its code size, name, and token standard?"}],"resultDescription":"Returns whether the address is a contract or EOA; if a contract, identifies the token standard (ERC-20, ERC-721, ERC-1155) using ERC-165 declarations first and shape-based inference as fallback; includes name, symbol, decimals, and bytecode size.","failureModes":["Invalid or malformed address returns an error","Address not found or not deployed on Base returns empty/null contract info","RPC timeout or Base node unavailability causes request failure","Contracts with non-standard or missing metadata may return null for name/symbol/decimals","Proxy contracts may misidentify underlying implementation standard"],"whenToPreferThis":"Use this endpoint when you need a definitive, nuanced classification of a Base address — it prioritizes ERC-165 self-declaration over naive ABI sniffing and correctly handles the NFT/ERC-20 totalSupply collision. Prefer it over generic block explorer lookups when you need structured, machine-readable token metadata including decimals and code size in a single call.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-13T12:40:32.532Z","isFirstParty":false}