-
Notifications
You must be signed in to change notification settings - Fork 111
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 guardable #109
Fix guardable #109
Conversation
…new factory address)
contracts/guard/Guardable.sol
Outdated
function getGuard() external view returns (address _guard) { | ||
return guard; | ||
} |
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.
ok, now this needs a major version bump. but good to remove this obsolete getter 👍
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.
I realized that we can't remove this, otherwise it makes our guards incompatible with the Safe.
Upgrade-to-latest-oz
Fix a bug
Implementation
This PR fixes an issue with our current guard implementation, where it was possible for a transaction to disable the current guard and thus bypass the
guard.checkAfterExecution
call.To address this,
guard
is now buffered inexec
andexecAndReturnData
calls, rather than being read from storage each time it is accessed.The fix should also make each
exec
orexecAndReturnData
call a little more gas efficient.Audit
TODO
Checklist
Prior to being merged, this PR must meet the following requirements.
This PR: