Skip to content

Commit

Permalink
Merge branch 'master' of github.com:helix-bridge/contracts
Browse files Browse the repository at this point in the history
  • Loading branch information
xiaoch05 committed May 10, 2024
2 parents b6809e8 + ed6e1e9 commit 77d89f5
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions helix-contract/contracts/utils/AccessController.sol
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ contract AccessController {
address public operator;
address public pendingDao;

event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);

modifier onlyDao() {
require(msg.sender == dao, "!dao");
_;
Expand All @@ -33,10 +35,12 @@ contract AccessController {
}

function acceptOwnership() external {
address oldDao = dao;
address newDao = msg.sender;
require(pendingDao == newDao, "!pendingDao");
delete pendingDao;
dao = newDao;
emit OwnershipTransferred(oldDao, newDao);
}
}

0 comments on commit 77d89f5

Please sign in to comment.