- 
                Notifications
    You must be signed in to change notification settings 
- Fork 3.8k
Disable the guard upon ownership transfer #17808
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
          
     Merged
      
      
    
                
     Merged
            
            
          Conversation
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
    cf4a600    to
    3ffede7      
    Compare
  
    2ff3b8c    to
    9efa607      
    Compare
  
    3ffede7    to
    2f291e2      
    Compare
  
    Move semver to SaferSafes semver lock
37e90d6    to
    05aa13d      
    Compare
  
    6001ae5    to
    67bddc5      
    Compare
  
    It's no longer reused in the change ownership call.
              
                    mds1
  
              
              reviewed
              
                  
                    Oct 16, 2025 
                  
              
              
            
            
              
                    mds1
  
              
              reviewed
              
                  
                    Oct 16, 2025 
                  
              
              
            
            
              
                    mds1
  
              
              reviewed
              
                  
                    Oct 16, 2025 
                  
              
              
            
            
              
                    mds1
  
              
              reviewed
              
                  
                    Oct 16, 2025 
                  
              
              
            
            
              
                    mds1
  
              
              reviewed
              
                  
                    Oct 16, 2025 
                  
              
              
            
            
              
                    mds1
  
              
              reviewed
              
                  
                    Oct 16, 2025 
                  
              
              
            
            
              
                    alcueca
  
              
              approved these changes
              
                  
                    Oct 17, 2025 
                  
              
              
            
            
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.
Fine by me, I think this is the safest implementation.
              
                    mds1
  
              
              reviewed
              
                  
                    Oct 17, 2025 
                  
              
              
            
            
              
                    mds1
  
              
              approved these changes
              
                  
                    Oct 17, 2025 
                  
              
              
            
            
    
  ajsutton 
      pushed a commit
      that referenced
      this pull request
    
      Oct 20, 2025 
    
    
      
  
    
      
    
  
* Add SaferSafes as child of the module and guard * Add ISaferSafes * Test comment and assertion fixes * Improve comments * Make LivenessModule2 and TimelockGuard abstract Move semver to SaferSafes semver lock * fix test contract name * Move semver to SaferSafes * Disable the guard and module upon ownership transfer * Add _disableThisGuard function * Update tests * Add config resets * fmt * fix test_changeOwnershipToFallback_canRechallenge_succeeds * Simplify by clearing config directly * Put _disableThisGuard into child contract * Add timelockDelay reset on _disableThisGuard * semver-lock * Move _disableThisGuard logic into TimelockGuard * clear livenessSafeConfig at tend of _disableThisModule * Clarify use of SENTINEL_OWNER * Fix the ordering of the disableGuard and disableModule calls * semver-lock * remove unused imports * rename _disableThisGuard to _disableGuard * bump semver * Add test to remove unrelated guard * Add SENTINEL_MODULE constant * Clean up using ternary if * Reset cancellationThreshold to 0 on changeOwnership * Fix moduleFound if/else handling * Clear pending transactions * Pre-pr fixes * Add test contract to test name lint exclusions * fix name of test contract * Move _disableGuard impl into TimelockGuard * Add missing natspec * Add gas limit testing on changeOwnershipToFallback * Remove interfaces for abstract contracts * Move state changes out into internal _clearLivenessModule * Improve names on the internal _disableX methods * Add clearTimelockGuard function * Add _disableGuard helper to TLG tests * Limit number of transactions cancelled to 100 * Revert "Remove interfaces for abstract contracts" This reverts commit bd03288. * Move livenessModule2 address into TestUtils Reduces diff a bit * Reduce diff somewhat * Remove unused arg * Update packages/contracts-bedrock/src/safe/TimelockGuard.sol Co-authored-by: graphite-app[bot] <96075541+graphite-app[bot]@users.noreply.github.com> * Fix iface * update abi for iface fix * Do not clear or disable the module during ownership transfer * Fix inaccurate comment on _disableAndClearGuard * Further improve comment * remove unused import * fix test name * Do not clear guard during changeOwnershipToFallback * Remove unused SENTINEL_MODULE var * Remove dangling comment * Revert "Remove dangling comment" This reverts commit d266d12. * Fix whitespace * remove unnecessary internal _clearTimelockGuard function It's no longer reused in the change ownership call. * Address feedback * Add missing assertion * Move guard slot into constants * semver-lock * Remove LivenessModule from semver-lock * fix: fmt, semver-lock, unused imports * Remove unused variable * fix semver lock by resetting old LivenessModule * fix unused import --------- Co-authored-by: graphite-app[bot] <96075541+graphite-app[bot]@users.noreply.github.com>
  
    Sign up for free
    to join this conversation on GitHub.
    Already have an account?
    Sign in to comment
  
      
  Add this suggestion to a batch that can be applied as a single commit.
  This suggestion is invalid because no changes were made to the code.
  Suggestions cannot be applied while the pull request is closed.
  Suggestions cannot be applied while viewing a subset of changes.
  Only one suggestion per line can be applied in a batch.
  Add this suggestion to a batch that can be applied as a single commit.
  Applying suggestions on deleted lines is not supported.
  You must change the existing code in this line in order to create a valid suggestion.
  Outdated suggestions cannot be applied.
  This suggestion has been applied or marked resolved.
  Suggestions cannot be applied from pending reviews.
  Suggestions cannot be applied on multi-line comments.
  Suggestions cannot be applied while the pull request is queued to merge.
  Suggestion cannot be applied right now. Please check back later.
  
    
  
    
Summary
This PR adds the following functionality:
In this process, I also realized that we should expose a
clearTimelockGuard()function which parallelsclearLivenessModule()to: