-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
cb5d5db
commit cfd02c3
Showing
1 changed file
with
32 additions
and
0 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
// SPDX-License-Identifier: AGPL-3.0 | ||
pragma solidity ^0.8.18; | ||
|
||
import {Governance} from "@periphery/utils/Governance.sol"; | ||
|
||
contract InitGov { | ||
address public constant multisig = | ||
0x33333333D5eFb92f19a5F94a43456b3cec2797AE; | ||
|
||
address public constant EOA = 0xD7392bcc3D3611adF1793fDdaAAB4770772AC35A; | ||
|
||
modifier onlyGov() { | ||
_checkGov(); | ||
_; | ||
} | ||
|
||
// Default to 0x33 ms as gov if deployed. But backs up to an EOA if not. | ||
function _checkGov() internal view { | ||
if (multiSig.code.length != 0) { | ||
require(msg.sender == multisig, "!gov"); | ||
} else { | ||
require(msg.sender == eoa, "!gov"); | ||
} | ||
} | ||
|
||
function transferGovernance( | ||
address _contract, | ||
address _newOwner | ||
) external onlyGov { | ||
Governance(_contract).transferGovernance(_newOwner); | ||
} | ||
} |