Skip to content

fix(invariant): exclude default addresses from senders #8118

New issue

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

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

Already on GitHub? # to your account

Merged
merged 2 commits into from
Jun 8, 2024

Conversation

grandizzy
Copy link
Collaborator

Motivation

Closes #4163

Solution

  • exclude CHEATCODE_ADDRESS, HARDHAT_CONSOLE_ADDRESS and DEFAULT_CREATE2_DEPLOYER from senders

@grandizzy grandizzy marked this pull request as ready for review June 8, 2024 14:20
Copy link
Member

@mattsse mattsse left a comment

Choose a reason for hiding this comment

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

lgtm

Comment on lines 500 to 504
excluded_senders.extend(vec![
CHEATCODE_ADDRESS,
HARDHAT_CONSOLE_ADDRESS,
DEFAULT_CREATE2_DEPLOYER,
]);
Copy link
Member

Choose a reason for hiding this comment

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

I think we can use an array here

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

yep, changed

@grandizzy grandizzy merged commit 91b1292 into foundry-rs:master Jun 8, 2024
19 checks passed
@grandizzy grandizzy deleted the issue-4163 branch June 8, 2024 15:03
excluded_senders.extend([
CHEATCODE_ADDRESS,
HARDHAT_CONSOLE_ADDRESS,
DEFAULT_CREATE2_DEPLOYER,
Copy link
Member

Choose a reason for hiding this comment

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

We should consider having a const for these addresses since we reference them individually in a lot of places

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Built-in contracts like vm and the create2 factory should be excluded senders in invariants
3 participants