Skip to content

fix: correct vm.label for user2 in Ethernaut.t.sol - #857

Open
PandaLee408 wants to merge 1 commit into
OpenZeppelin:masterfrom
PandaLee408:fix-user2-vm-label
Open

PandaLee408 wants to merge 1 commit into
OpenZeppelin:masterfrom
PandaLee408:fix-user2-vm-label

Conversation

@PandaLee408

Copy link
Copy Markdown

Summary

  • setUp() in contracts/test/Ethernaut.t.sol was labeling user (address 0) as "User 2" instead of labeling user2 (address 1), making forge trace output misleading (two addresses both showing as related to "User 1"/mislabeled).

Fix

  • Changed vm.label(user, "User 2") to vm.label(user2, "User 2").

Test plan

  • forge test --match-contract TestEthernaut -vv — all 7 tests pass

@github-actions

github-actions Bot commented Aug 25, 2026 •

Copy link
Copy Markdown
Contributor

All contributors have signed the CLA ✍️ ✅
Posted by the CLA Assistant Lite bot.

@PandaLee408

Copy link
Copy Markdown
Author

I confirm that I have read and hereby agree to the OpenZeppelin Contributor License Agreement

setUp() was mistakenly labeling `user` (address 0) as "User 2" instead
of labeling `user2` (address 1), which made trace output misleading.
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.

1 participant