Skip to content

Remove unused ZOLTU_PROXY_ADDRESS constant and dead test import - #47

Merged
thedavidmeister merged 2 commits into
mainfrom
2026-08-19-issue-33
Aug 19, 2026
Merged

Remove unused ZOLTU_PROXY_ADDRESS constant and dead test import#47
thedavidmeister merged 2 commits into
mainfrom
2026-08-19-issue-33

Conversation

@thedavidmeister

Copy link
Copy Markdown
Contributor

What the issue asked

ZOLTU_PROXY_ADDRESS is declared in src/lib/LibDataContract.sol and re-exported through the test file's import list, but used by nothing anywhere. Issue #33 frames the triage: either exercise it (a deploy-via-Zoltu-proxy test) or remove the constant and the dead test import.

What this PR does

Removes the dead surface:

  • src/lib/LibDataContract.sol: deletes the ZOLTU_PROXY_ADDRESS constant and its NatSpec (@dev + upstream link).
  • test/lib/LibDataContract.t.sol: deletes ZOLTU_PROXY_ADDRESS from the import list.

The README's "Zoltu deterministic proxy, etc." sentence is untouched: it describes deployment options left to the caller and never referenced the constant, so it stays true after removal.

Closes #33

Consumer check

  • grep -rn ZOLTU_PROXY_ADDRESS src/ test/ on base: declaration + one import-list mention, zero uses.
  • GitHub-wide code search (gh search code ZOLTU_PROXY_ADDRESS, org-scoped and unscoped): only this repo's two files match. Caveat: code search indexes public repos' default branches only.
  • Git history: the only ever consumer was writeZoltu + testZoltu (PR test zoltu deploy #7), deliberately deleted with the whole write API in d449490 ("remove write functions", PR contract creation code #16). The constant is residue of that removal.

Lifecycle ledger (remove vs exercise)

  • Remove (picked): build cost 4 deleted lines + 1 edited import line; carrying cost zero; rework cost if Zoltu deployment support ever returns is trivial — the address is pinned in the upstream Zoltu README, and any such return would reintroduce a writeZoltu-shaped function anyway, which was itself deliberately removed.
  • Exercise (rejected): the library no longer has any write/deploy function, so a Zoltu test could only test the third-party proxy itself (via vm.etch of vendored Zoltu runtime bytecode or a forked network), not this library; build cost is a fork-dependent test, carrying cost is vendored third-party bytecode plus keeping a src constant whose only purpose is to be imported by a test — and it enshrines residue of an API the repo already ruled out. Issue guidance made this option conditional on finding a real consumer; none exists.

BREAKING

Removes the exported symbol ZOLTU_PROXY_ADDRESS from src/lib/LibDataContract.sol. No known consumers (see consumer check). Any unindexed consumer must inline the well-known upstream address 0x7A0D94F55792C434d74a40883C6ed8545E406D12 (https://github.com/Zoltu/deterministic-deployment-proxy) instead of importing it from this package.

Interaction with concurrent work

Issue #32 (dead write surface: WriteError, DataContractMemoryContainer) is being worked concurrently and edits the same test import list and src file; this diff is kept minimal (the import-list edit touches only the ZOLTU_PROXY_ADDRESS line and the trailing comma on WriteError) to minimize conflicts.

QA

  • Discriminating tests: n/a — pure dead-code removal, no behavior change; deadness is proven by the full suite compiling and passing (18/18) without the symbol, which would fail to compile if anything consumed it
  • Mutations applied: n/a — diff is deletion-only (an unused constant declaration and its import); no executable code added or modified, so there is no mutant surface
  • Oracle: grep -rn ZOLTU_PROXY_ADDRESS src/ test/ on base (declaration + import only), GitHub-wide gh search code (only this repo matches), and git history (sole consumer writeZoltu/testZoltu deleted in d449490)
  • Category check: issue asks exercise-or-remove after a consumer check; covered: consumer check (repo grep, org + global code search, git history), removal of the constant, its NatSpec, and the dead test import, BREAKING note for the removed export

The only consumer (writeZoltu + testZoltu, PR #7) was deleted with the
write API in d449490; the constant and its test-file import were residue.
GitHub-wide code search finds no external consumer.

Closes #33

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@thedavidmeister thedavidmeister self-assigned this Aug 19, 2026
@coderabbitai

coderabbitai Bot commented Aug 19, 2026

Copy link
Copy Markdown

Warning

Review limit reached

@thedavidmeister, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 45 minutes

Limit details: You’ve used the included review currently available.

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits within each organization.

For paid Pro and Pro+ reviews, CodeRabbit uses a developer's included PR review attempts over the past 7 days to set the current hourly allowance. At typical activity levels, the full plan allowance applies. Higher sustained activity can lower the allowance until earlier attempts leave the 7-day window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: 79684286-fed1-41b9-8f73-464b9f9e0f33

📥 Commits

Reviewing files that changed from the base of the PR and between 4cbac8b and 7e986c4.

📒 Files selected for processing (2)
  • src/lib/LibDataContract.sol
  • test/lib/LibDataContract.t.sol

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@thedavidmeister
thedavidmeister merged commit 01e329a into main Aug 19, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

ZOLTU_PROXY_ADDRESS is declared and re-exported but used by nothing

1 participant