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

EVM: respect vm.prank during calls to create #564

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open

Conversation

d-xo
Copy link
Collaborator

@d-xo d-xo commented Sep 20, 2024

Description

Updates our prank implementation to match foundrys. prank is now respected during contract creation.

Checklist

  • tested locally
  • added automated tests
  • updated the docs
  • updated the changelog

address usr = address(1312);
vm.prank(usr);
target = new Owned();
assert(target.owner() == usr);
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

We should check that it changes back afterwards...

Comment on lines +841 to +842
resetCaller <- use (#config % #resetCaller)
when (resetCaller) $ assign (#config % #overrideCaller) Nothing
Copy link
Collaborator

Choose a reason for hiding this comment

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

Can you explain for me what these two lines do?

Copy link
Collaborator

@msooseth msooseth left a comment

Choose a reason for hiding this comment

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

lgtm

@blishko
Copy link
Collaborator

blishko commented Sep 30, 2024

I think the current state of this PR is that the original issue has been fixed, but the badVault test still exhibits some unexpected behaviour. Is that right, @d-xo?

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.

3 participants