Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix DEFAULT_TEST_CONTRACT #649

Closed

Conversation

CodeSandwich
Copy link
Contributor

@CodeSandwich CodeSandwich commented Jan 31, 2025

The test contracts have a different address than the one in the constant. I tried printing address(this) in 2 separate tests and they were all showing this address. It makes sense because the msg.sender and tx.origin were always DEFAULT_SENDER in the constructors, setUps and the test functions, and the new DEFAULT_TEST_CONTRACT can be obtained by calculating the CREATE address for DEFAULT_SENDER and nonce 1.

@zerosnacks zerosnacks self-requested a review February 4, 2025 11:18
Copy link
Member

@zerosnacks zerosnacks left a comment

Choose a reason for hiding this comment

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

@CodeSandwich
Copy link
Contributor Author

You're right, this is all correct and the address doesn't need to be fixed; I simply didn't understand what it means. IMO the current docs are just wrong and need to be fixed, but I'll do it in a separate PR.

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.

2 participants