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 guardable #109

Merged

Conversation

auryn-macmillan
Copy link
Member

@auryn-macmillan auryn-macmillan commented Feb 9, 2023

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 in exec and execAndReturnData calls, rather than being read from storage each time it is accessed.

The fix should also make each exec or execAndReturnData call a little more gas efficient.

Audit

TODO

Checklist

Prior to being merged, this PR must meet the following requirements.

This PR:

  • Adds addresses of the canonical deployments of the mastercopy for your module to deployments.json, along with addresses and ABI details to constants.ts. Ideally these should be deterministic deployments that can be easily replicated on other supported networks.
  • Includes an audit from a reputable auditor.

@auryn-macmillan auryn-macmillan added the bug Something isn't working label Feb 9, 2023
@auryn-macmillan auryn-macmillan self-assigned this Feb 9, 2023
@auryn-macmillan auryn-macmillan changed the base branch from master to add-setupModules()-function-to-Modifier.sol February 9, 2023 02:38
Comment on lines 28 to 30
function getGuard() external view returns (address _guard) {
return guard;
}
Copy link
Collaborator

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 👍

Copy link
Member Author

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.

@auryn-macmillan auryn-macmillan merged commit 66d8f6f into add-setupModules()-function-to-Modifier.sol Feb 16, 2023
@auryn-macmillan auryn-macmillan deleted the fix-guardable branch February 16, 2023 02:18
@github-actions github-actions bot locked and limited conversation to collaborators Feb 16, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants