Remove orphan account mocks not referenced by any guide#242
Conversation
`MyAccountEIP7702.sol` and `MyFactoryAccount.sol` under `contracts/mocks/docs/account/` are not referenced by any `.adoc` guide in this repo. They are referenced only by solidity guides (`accounts.adoc`, `eoa-delegation.adoc` in openzeppelin-contracts). Because `prepare-docs.sh` copies every `contracts/mocks/docs/**/*.sol` into the docs site's shared `examples/` directory, having a divergent copy here overwrites solidity's version on every community-contracts docs regen, breaking those solidity guides. Removing them here keeps the canonical version in openzeppelin-contracts and prevents the regen pipeline from clobbering unrelated examples.
|
Important Review skippedAuto incremental reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
WalkthroughTwo mock contract files are removed from ChangesMock Contract Removals
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~3 minutes Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
`MyAccountEIP7702.sol` and `MyFactoryAccount.sol` are referenced only by solidity guides (accounts.adoc, eoa-delegation.adoc), but `prepare-docs.sh` blindly copies every `contracts/mocks/docs/**/*.sol` into the shared `examples/` dir, so community's divergent copies were clobbering solidity's. The community-side fix is OpenZeppelin/openzeppelin-community-contracts#242.
Removing MyFactoryAccount.sol dropped Clones (and transitively Create2) from the compilation graph, which broke tests that rely on the hardhat-exposed $Create2 artifact.
Summary
Two example mocks under
contracts/mocks/docs/account/are not referenced by any.adocguide in this repo:contracts/mocks/docs/account/MyAccountEIP7702.solcontracts/mocks/docs/account/MyFactoryAccount.solThey are referenced only by solidity guides (
accounts.adoc,eoa-delegation.adoc) inopenzeppelin-contracts.Why this matters
scripts/prepare-docs.shcopies everycontracts/mocks/docs/**/*.solinto the docs site's sharedexamples/directory. Because the version of these files in this repo diverges from solidity's (different signatures, missing checks), every community-contracts docs regen clobbers solidity's canonical version and breaks the contracts/5.x guides.Concrete example surfaced by docs PR #154: community's
MyFactoryAccount.solchangespredictAddress(callData)→predictAddress(salt, callData), but the contracts/5.x/accounts.mdx prose was written for the 1-arg form.Deleting them here keeps the canonical version in solidity and stops the regen pipeline from clobbering unrelated examples.
Test plan
examples/account/MyAccountEIP7702.solandMyFactoryAccount.solare no longer touchedSummary by CodeRabbit