{"uid":"cap_fXriOJzqJfRGKAmJ7WY49","slug":"contract-code-identity-verifier-4b663dd0","name":"Contract Code Identity Verifier","description":"Check a deployed contract's code identity - keccak256 code hash read from the node via eth_getProof, confirmed on a second independent node, plus EIP-1167/1967/1822 proxy resolution.","url":"https://api.darangilau.com/contract-code-hash","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":{"chain":{"enum":["base","ethereum"],"type":"string","default":"base"},"address":{"type":"string","pattern":"^0x[a-fA-F0-9]{40}$","description":"contract address to check"},"expected":{"type":"string","pattern":"^0x[a-fA-F0-9]{64}$","description":"optional: the keccak256 code hash you expect, e.g. from your audit report or a prior verification"}}}},"additionalProperties":false},"output":{"type":"object","required":["type"],"properties":{"type":{"type":"string"},"example":{"type":"object"}}}}},"responseSchema":null,"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.01","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":"down","priceObserved":null,"sessionDeposit":null,"pricing":{"kind":"static","summary":"$0.01/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.01","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.01","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_v0clRCgxza-TDHb2974S4","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.01","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Verifies a deployed smart contract's code identity by computing its keccak256 code hash via eth_getProof on two independent nodes and resolving EIP-1167/1967/1822 proxy patterns.","exampleAgentPrompt":"Can you verify that the contract at 0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48 on Ethereum hasn't changed since our audit — its expected code hash was 0xb9a2de3d7e5d696e78b3e6ea4d2aab9bca9a4b5f1c3d2e4f5a6b7c8d9e0f1a2b3?","exampleUseCases":[{"title":"Pre-interaction contract integrity check","prompt":"Before my app calls into the lending protocol at 0x7d2768dE32b0b80b7a3454c06BdAc94A69DDc7A9 on Ethereum, can you confirm its code hash matches 0xabc123def456abc123def456abc123def456abc123def456abc123def456abc123?"},{"title":"Proxy implementation discovery","prompt":"The token contract at 0x4Fabb145d64652a948d72533023f6E7A623C7C53 on Base looks like a proxy — can you resolve what implementation it's pointing to and give me the code hash of the actual logic contract?"},{"title":"Post-deployment audit verification","prompt":"We just deployed our contract to 0x5C69bEe701ef814a2B6a3EDD4B1652CB9cc5aA6f on Base — can you check that the code hash on-chain matches what our auditors signed off on: 0xd3b96a2c1e4f5a6b7c8d9e0f1a2b3c4d5e6f7a8b9c0d1e2f3a4b5c6d7e8f9a0b1?"}],"resultDescription":"Returns the keccak256 code hash of the deployed contract bytecode as read via eth_getProof from two independent nodes, a confirmation that both nodes agree, whether the contract matches an optional expected hash, and proxy resolution details (implementation address and proxy standard such as EIP-1167, EIP-1967, or EIP-1822) if applicable.","failureModes":["Invalid or non-checksummed contract address returns a 400 error","Address is an EOA (not a contract) — returns empty code hash or error","Expected hash provided but does not match — returns mismatch result","Two nodes return conflicting code hashes — verification fails with inconsistency error","Unsupported chain specified — returns 400 validation error","Network timeout or node unavailability — returns 503 or partial result"],"whenToPreferThis":"Choose this endpoint when you need cryptographic assurance that a deployed contract's bytecode matches a known-good reference (e.g. from an audit report), when you need dual-node confirmation to guard against a compromised RPC, or when you need to resolve proxy patterns (EIP-1167/1967/1822) to find the actual implementation contract. Prefer this over a simple eth_getCode call when security and tamper-evidence are required, or when dealing with upgradeable proxy contracts where the logic address may have changed.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-15T18:26:33.171Z","isFirstParty":false}