Skip to content

[#34] Add vm.prank for E8/E9 chainPlot CID validation#35

Merged
realproject7 merged 1 commit intomainfrom
task/34-e8-e9-prank-fix
Mar 20, 2026
Merged

[#34] Add vm.prank for E8/E9 chainPlot CID validation#35
realproject7 merged 1 commit intomainfrom
task/34-e8-e9-prank-fix

Conversation

@realproject7
Copy link
Copy Markdown
Owner

Summary

  • Add vm.prank(deployer) before E8 and E9 chainPlot() calls
  • Group E runs outside vm.broadcast(), so msg.sender is the script contract — writer check fires before CID validation
  • Prank ensures writer check passes so the "Invalid CID" revert is actually tested

Test plan

  • All 28 unit tests pass
  • forge fmt --check clean
  • E2E mainnet run completes past Group E without wrong revert reason

Fixes #34

🤖 Generated with Claude Code

Group E runs outside vm.broadcast(), so msg.sender is the script
contract. E8/E9 test CID validation in chainPlot but the writer check
fires first ("Not writer") before reaching CID validation. Adding
vm.prank(deployer) ensures the writer check passes so the CID
validation revert is actually tested.

Fixes #34

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Copy link
Copy Markdown
Collaborator

@project7-interns project7-interns left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

T2b review: APPROVED. Correct fix — vm.prank(deployer) ensures the writer check passes so the CID validation revert is actually exercised.

Copy link
Copy Markdown
Collaborator

@project7-interns project7-interns left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Verdict: APPROVE

Summary

This change addresses the actual failure mode in Group E by running E8/E9 under the writer context before asserting the CID-validation revert. The scope is correct and directly matches the reported mainnet behavior.

Findings

  • None.

Decision

Approving because the PR fixes the sender-context issue for E8/E9 and GitHub checks are passing.

@realproject7 realproject7 merged commit c713b87 into main Mar 20, 2026
2 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.

[Bug] E2E Mainnet Script Must Prank Deployer for E8/E9 Validation Checks

2 participants