-
Notifications
You must be signed in to change notification settings - Fork 48
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
[DRAFT] Fixing prank: no longer override the sender on lower frames #609
base: main
Are you sure you want to change the base?
Conversation
Related to #608
@elopez could you maybe review? Maybe it'd be useful to add more tests in |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Overall it looks good to me! I left you a few suggestions to make resetCaller state more consistent
let from = fromMaybe vm.state.contract vm.config.overrideCaller | ||
let from = fromMaybe vm.state.contract vm.state.overrideCaller | ||
resetCaller <- use $ #state % #resetCaller | ||
when resetCaller $ assign (#state % #overrideCaller) Nothing |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should probably also set resetCaller to False at the same time
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
having this on callChecks feels a bit odd to me, should it maybe live on delegateCall instead?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmmm... yeah, we could set resetCaller
in delegateCall
. However, the let from = ..
needs to be here of course. Wanna have a go at putting it in delegateCall
? Just create a PR on top of this PR :)
Co-authored-by: Emilio López <2642849+elopez@users.noreply.github.com>
Co-authored-by: Emilio López <2642849+elopez@users.noreply.github.com>
Co-authored-by: Emilio López <2642849+elopez@users.noreply.github.com>
Co-authored-by: Emilio López <2642849+elopez@users.noreply.github.com>
Co-authored-by: Emilio López <2642849+elopez@users.noreply.github.com>
Co-authored-by: Emilio López <2642849+elopez@users.noreply.github.com>
Co-authored-by: Emilio López <2642849+elopez@users.noreply.github.com>
Description
As per #608 there is an issue with prank. It keeps overriding the sender on lower frames as well. This should not happen.
Checklist