# Compare TON Contract Revisions

A TON contract upgrade can change how clients encode messages or how the contract reads stored data. Compare two local revisions and document the evidence for compatibility and migration decisions.

## Install

```bash
npx skillstore add flint-research/ton-diff
```

## Metadata

- Status: approved
- Slug: flint-research-ton-diff
- Skillstore revision: r1
- Version status: missing
- Tree hash: 9dbee3715361482220e6c016e447a1383c2556561bcd32de7912ce3dde965aba
- Author: flint-research
- GitHub username: flint-research
- Repository: https://github.com/flint-research/skills/tree/b739665d19cd1d924d41c680722e1372867a1bff/auditing/ton-audit/skills/ton-diff
- Ref: d715043e3196bdd213a9eb9e5f78632e50554733
- Supported tools: Claude, Codex, Claude Code
- Audit status: complete
- Agent install advisory: allowed
- Manual install advisory: allowed
- Artifact signature: available
- Audit attestation: unavailable
- Human verification: not\_verified
- Risk factors: external\_commands, network, filesystem
- Quality score: 73
- Public page: https://skillstore.pages.dev/skills/flint-research-ton-diff
- Manifest: https://skillstore.pages.dev/api/skills/flint-research-ton-diff/manifest

## Capabilities

- Compare corresponding TON source or ABI files from two authorized local revisions.
- Identify receiver changes and compare message tags and field order.
- Compare send modes and getter declarations.
- Trace state layout changes against stored data and relevant upgrades.
- Check differences against both revisions and report unsupported comparisons.
- Link differences to evidence and distinguish manual compatibility and migration conclusions.

## Use Cases

- Review interface changes before release: Compare receiver, getter, and send changes between the current contract and a release candidate.
- Check existing client encodings: Review changed message tags and field order to see whether existing client encodings still match the revised declarations.
- Review stored data during an upgrade: Compare serialized state layouts and document which differences require a manual migration decision.

## Prompt Templates

### List interface changes

```
Compare the two local TON revisions I provided. List changed receivers and getters, with evidence from both revisions.
```

### Check message compatibility

```
Compare message tags and field order in these matching ABIs. Check them against the supplied client encodings and flag missing evidence.
```

### Review state layout changes

```
Compare the serialized state layouts and trace the changes against the supplied stored data. Separate confirmed differences from manual migration conclusions.
```

### Assess upgrade readiness

```
Compare send modes, interface declarations, state layouts, and authority changes in these revisions. Cite evidence and list unsupported comparisons and unresolved compatibility questions.
```

## Limitations

- Requires two authorized local revisions with TON source on both sides, matching ABI families, or both.
- The documented CLI workflow requires Python 3.11 or later and access to the referenced helper.
- Does not cover bytecode-only comparisons or contracts on other chains.
- Does not certify compatibility or migration safety. These conclusions require manual review.

## Best Practices

- Identify the baseline and candidate clearly, and keep inputs within the authorized local workspace.
- Provide existing client encodings or state samples when compatibility depends on them.
- Cite evidence from both revisions and label conclusions that require manual verification.

## Anti Patterns

- Compare unrelated ABI families as if they represented the same interface.
- Use the skill for bytecode-only comparisons or contracts on a different chain.
- Treat a declaration difference as proof of a migration outcome.

## Security Audit

- Audited at: 2026-11-29T12:10:26.41\+00:00
- Summary: The command backticks are Markdown formatting, and the website link is attribution. The skill directs use of a Python helper outside the scanned directory, so that finding is retained pending verification. No evidence of prompt injection or data exfiltration was found in the reviewed file.

## Stats

- Views: 0
- Downloads: 0
- Favorites: 0
- Popularity score: 0
