Skip to content

Commit

Permalink
Merge pull request #761 from ebtc-protocol/feat/auth-cleanup
Browse files Browse the repository at this point in the history
Auth cleanup
  • Loading branch information
dapp-whisperer authored Jan 22, 2024
2 parents f00957c + 3ca9360 commit 7bc30c0
Showing 1 changed file with 0 additions and 15 deletions.
15 changes: 0 additions & 15 deletions packages/contracts/contracts/Dependencies/AuthNoOwner.sol
Original file line number Diff line number Diff line change
Expand Up @@ -35,21 +35,6 @@ contract AuthNoOwner {
return (address(auth) != address(0) && auth.canCall(user, address(this), functionSig));
}

function setAuthority(address newAuthority) public virtual {
// We check if the caller is the owner first because we want to ensure they can
// always swap out the authority even if it's reverting or using up a lot of gas.
require(_authority.canCall(msg.sender, address(this), msg.sig));

_authority = Authority(newAuthority);

// Once authority is set once via any means, ensure it is initialized
if (!_authorityInitialized) {
_authorityInitialized = true;
}

emit AuthorityUpdated(msg.sender, Authority(newAuthority));
}

/// @notice Changed constructor to initialize to allow flexiblity of constructor vs initializer use
/// @notice sets authorityInitiailzed flag to ensure only one use of
function _initializeAuthority(address newAuthority) internal {
Expand Down

0 comments on commit 7bc30c0

Please sign in to comment.