Contract Bytecode Compare API
Compare two caller-supplied EVM bytecodes. Exact and normalized comparisons report hashes, lengths, similarity, and differing byte ranges. No network calls are made.
Compare 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.
Decode two caller-supplied EVM bytecodes, or two instruction lists, into opcodes and compare the instruction sequence. Similarity ignores PUSH immediates. The risk delta counts CALL, SSTORE, CREATE, DELEGATECALL, CALLCODE, and SELFDESTRUCT. A high similarity is not proof that the contracts behave the same. No chain is queried.