{"uid":"cap_OBKFiixeOYniVqXRNHYFC","slug":"onesource-contract-introspection-749d480b","name":"OneSource Contract Introspection","description":"Best-effort contract introspection via batched RPC - bytecode presence, token metadata, and ERC20-like/ERC721/ERC1155 classification","url":"https://api.onesource.io/api/chain/contract/:address","method":"GET","headers":{},"bodySchema":null,"responseSchema":null,"example":{"request":{"address":"0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48","network":"ethereum"},"response":{"data":{"name":"USD Coin","symbol":"USDC","address":"0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48","is_erc20":false,"is_erc165":false,"is_erc721":false,"is_erc1155":false,"code_length":2187,"is_contract":true},"meta":{"endpoint":"/api/chain/contract/0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48","request_id":"4f3ed0781371d8db"}}},"exampleRequest":{"address":"0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48","network":"ethereum"},"tags":["x402"],"displayCostAmount":"0.005","displayCostAsset":"USDC","priceDynamic":false,"priceHint":null,"priceStatus":"priced","priceSource":"settled","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.005/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.005","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.005","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_gC-7e5MCZXZwJTCNHFq3k","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.005","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Retrieves name, symbol, decimals, and ERC20/721/1155 interface support for a smart contract address via eth_call","exampleAgentPrompt":"What token standard and metadata does the contract at 0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48 on Ethereum support — is it ERC20, ERC721, or ERC1155, and what are its name, symbol, and decimals?","exampleUseCases":[{"title":"Verify token before processing transfers","prompt":"I'm about to interact with a contract at 0x6B175474E89094C44Da98b954EedeAC495271d0F — can you quickly check if it's an ERC20 token and grab its name, symbol, and decimal places so I know how to handle the amounts correctly?"},{"title":"Classify NFT versus fungible contracts","prompt":"I have a list of contract addresses and need to sort them into NFT collections versus fungible tokens. Can you check each one to see if it supports ERC721 or ERC1155, and tell me which are which?"},{"title":"Validate contract metadata before display","prompt":"Before I show this token to users in my app, can you verify the contract at this address actually exists, confirm it's a real ERC20 token, and fetch its official name and symbol so I display accurate information?"}],"resultDescription":"Returns the contract's human-readable name, ticker symbol, decimal precision, and boolean flags indicating which token interfaces (ERC20, ERC721, ERC1155) the contract supports, all fetched via eth_call without requiring an archive node.","failureModes":["Invalid or malformed contract address (not matching 0x + 40 hex chars) returns a validation error","Contract address that is an EOA (externally owned account) with no deployed bytecode may return empty or null fields","Contract that does not implement standard name/symbol/decimals functions returns partial or empty metadata","Unsupported network value (not ethereum or sepolia) returns an error","Network RPC unavailability causes a timeout or 503 response"],"whenToPreferThis":"Use this endpoint when you need to quickly identify what type of token contract is deployed at an address and retrieve its basic metadata (name, symbol, decimals, interface flags) without setting up your own Ethereum node. Ideal for agents that need to classify a contract before deciding how to interact with it (e.g., distinguishing ERC20 transfers from ERC721 transfers). Prefer over raw RPC calls when you want a single unified response covering multiple interface checks.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-13T12:50:07.425Z","isFirstParty":false}