{"uid":"cap_F93HxN2qnn2zJqj94kYgk","slug":"xerxes-eth-getcode-ethereum-contract-bytecode-lookup-27f4ad74","name":"Xerxes eth_getCode — Ethereum Contract Bytecode Lookup","description":"Returns the bytecode of a contract at a given address via eth_getCode. Useful for verifying contract deployment, checking if an address is a contract, and analyzing contract code. Query: address (0x + 40 hex).","url":"https://ari001.tailb4ac3a.ts.net/v1/ventures/ethereum_contract_abi_service/eth_getcode?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","HEAD","DELETE"],"type":"string"},"queryParams":{"type":"object","required":["address"],"properties":{"address":{"type":"string","pattern":"^0x[a-fA-F0-9]{40}$","description":"0x + 40 hex"}}}},"additionalProperties":false},"output":{"type":"object","required":["type"],"properties":{"type":{"type":"string"},"example":{"type":"object","required":["ok","service"],"properties":{"ok":{"type":"boolean"},"hex":{"type":["string","null"]},"chain":{"type":"string"},"error":{"type":"string","description":"present when ok is false"},"method":{"type":"string"},"result":{"type":"string","description":"the bytecode, 0x-hex"},"service":{"type":"string"}}}}}}},"responseSchema":null,"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.003","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.003/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.003","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.003","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_NH5d-iQQhixfrb5htvE6Y","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.003","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Returns the deployed bytecode of a smart contract at a given Ethereum address using eth_getCode","exampleAgentPrompt":"Can you fetch the bytecode deployed at Ethereum address 0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2 so I can confirm the contract is actually deployed there?","exampleUseCases":[{"title":"Verify contract deployment success","prompt":"I just deployed a smart contract to Ethereum — can you check 0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48 and confirm there's actual bytecode there so I know the deployment went through?"},{"title":"Distinguish EOA from contract address","prompt":"Before I call this address, can you tell me whether 0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045 is a smart contract or just a regular wallet — pull the bytecode and let me know if it's empty or not."},{"title":"Fetch bytecode for static analysis","prompt":"I want to analyze the on-chain code for the Uniswap V2 router — grab the raw bytecode at 0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D on Ethereum so I can decompile and inspect it."}],"resultDescription":"Returns a JSON object with an 'ok' boolean, a 'result' field containing the 0x-prefixed hex bytecode string (empty '0x' if the address is an EOA or undeployed contract), the chain name, the method name ('eth_getCode'), and a 'service' identifier. On failure, 'ok' is false and an 'error' field describes the problem.","failureModes":["Invalid address format (not 0x + 40 hex) returns a validation error","Address exists but has no code (EOA) returns '0x' as bytecode — not an error, but may be mistaken for one","Network or RPC connectivity issues may cause service unavailability","Malformed request missing the required address query parameter returns an error response"],"whenToPreferThis":"Use this endpoint when you need to verify whether an Ethereum address has deployed contract code, retrieve raw bytecode for analysis or decompilation, or confirm a deployment succeeded. It is the canonical eth_getCode RPC call, ideal for lightweight contract-existence checks without needing a full ABI or indexed data source. Prefer this over ABI-fetching services when you only need raw bytecode, not decoded interfaces.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-02T18:37:09.852Z","isFirstParty":false,"canonicalSlug":"xerxes-eth-getcode-ethereum-contract-bytecode-lookup-27f4ad74"}