Compare contract bytecode
contract-security_contract-bytecode-compareCompare two caller-supplied EVM bytecodes. mode exact compares every byte. An omitted mode is exact. mode normalized masks only the supplied immutable ranges and a trailing Solidity CBOR metadata suffix when bytecodeKind is not creation and that suffix is present on both bytecodes. comparison_status is identical, different, partially_comparable, or invalid. Hashes are keccak256 of the supplied bytes. Similarity is the share of equal compared bytes, truncated to 4 decimal places. A difference is not a judgment that either bytecode is malicious, and similar bytecode is not equivalent behavior. No source code is verified and no chain is queried. Price $0.05 USDC. POST /api/v1/contract-security/contract-bytecode-compare. Unpaid calls return 402 and do not run.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"reference": "<reference>",
"candidate": "<candidate>"
},
"name": "contract-security_contract-bytecode-compare"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| mode | No | ||
| candidate | Yes | ||
| reference | Yes | ||
| bytecodeKind | No | ||
| immutableRanges | No | ||
| compilerMetadata | No | ||
| expectedDifferences | No | ||
| constructorArguments | No |