Skip to content

Compare two versions of a contract source side by side with line-level highlighting.

Loading tool

About Contract Diff Checker

Compare an old and a new version of a Solidity contract side by side or as a unified diff, with changed tokens highlighted inside changed lines. It also lists which functions, modifiers, events and errors were added, removed or changed, can ignore whitespace, comments and SPDX/pragma lines, and exports a unified patch.

Common uses

  • Review an upgradeable contract's new implementation before an upgrade
  • Compare a deployed verified contract with your local source
  • Check a fork against the original project for changes
  • See which external functions and events changed between releases

FAQ

What should I check when diffing an upgradeable contract?
Besides logic changes, check that existing state variables keep their order and types, since reordering or changing them corrupts proxy storage. New variables should only be appended (or placed in a reserved gap or namespaced storage).
Can I compare contracts across many files?
Paste one source per side. For multi-file projects, flatten each version first so both sides are single files.