{"uid":"cap_7XWlhXY_wA9tC0kd9qwz9","slug":"eth-mainnet-eth-getcode-03c15ca4","name":"ETH Mainnet eth_getCode","description":"Takes an address (0x + 40 hex) and returns the contract bytecode on Ethereum mainnet via eth_getCode. Base RPC read of an address, block or transaction.","url":"https://ari001.tailb4ac3a.ts.net/v1/ventures/x402_eth_reads_v1/eth_mainnet_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","properties":{"address":{"type":"string","pattern":"^0x[0-9a-fA-F]{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_FTGryT-BpZSgbmRPCpsHE","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 mainnet address using eth_getCode.","exampleAgentPrompt":"Can you fetch the deployed bytecode for the Ethereum contract at 0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2 on mainnet?","exampleUseCases":[{"title":"Check if address is a contract","prompt":"Is 0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48 a smart contract or a regular wallet on Ethereum mainnet? Fetch its bytecode to check."},{"title":"Verify contract deployment","prompt":"I just deployed a contract to 0xdAC17F958D2ee523a2206206994597C13D831ec7 on Ethereum mainnet — can you confirm there's actual bytecode there to make sure it deployed successfully?"},{"title":"Audit contract code presence","prompt":"Pull the raw bytecode for the Ethereum address 0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D so I can check whether there's a contract running there."}],"resultDescription":"Returns the raw hex-encoded bytecode (EVM code) stored at the given Ethereum address on mainnet. If the address is an externally owned account (EOA) with no contract, it returns '0x'. If a contract is deployed there, it returns the full bytecode string.","failureModes":["Invalid address format (not matching 0x + 40 hex pattern) returns a validation error","Address with no deployed contract returns '0x' (empty bytecode, not an error)","Network or RPC node unavailability causes timeout or 5xx error","Rate limiting or quota exhaustion may result in 429 or payment-related errors","Self-destructed contracts may return '0x' even if previously deployed"],"whenToPreferThis":"Use this endpoint when you need to verify whether a contract is deployed at a specific Ethereum mainnet address, retrieve raw EVM bytecode for analysis or auditing, or distinguish between EOAs and smart contracts programmatically. Prefer this over general-purpose Ethereum RPC gateways when you want a pay-per-call, agent-friendly interface with no API key setup.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-27T06:49:57.719Z","isFirstParty":false,"canonicalSlug":"eth-mainnet-eth-getcode-03c15ca4"}