forked from aragon/osx-plugin-template-hardhat
-
Notifications
You must be signed in to change notification settings - Fork 0
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
Showing
2 changed files
with
8 additions
and
16 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 |
---|---|---|
|
@@ -8,7 +8,7 @@ import {IMembership} from "@aragon/osx-commons-contracts/src/plugin/extensions/m | |
|
||
// solhint-disable-next-line max-line-length | ||
import {ProposalUpgradeable} from "@aragon/osx-commons-contracts/src/plugin/extensions/proposal/ProposalUpgradeable.sol"; | ||
import {PluginUUPSUpgradeable} from "@aragon/osx-commons-contracts/src/plugin/PluginUUPSUpgradeable.sol"; | ||
import {PluginCloneable} from "@aragon/osx-commons-contracts/src/plugin/PluginCloneable.sol"; | ||
import {IDAO} from "@aragon/osx-commons-contracts/src/dao/IDAO.sol"; | ||
import {IProposal} from "@aragon/osx-commons-contracts/src/plugin/extensions/proposal/IProposal.sol"; | ||
import {IExecutor, Action} from "@aragon/osx-commons-contracts/src/executors/IExecutor.sol"; | ||
Check warning on line 14 in packages/contracts/src/Admin.sol GitHub Actions / checks
Check warning on line 14 in packages/contracts/src/Admin.sol GitHub Actions / formatting-linting / checks
|
||
|
@@ -18,7 +18,7 @@ import {IExecutor, Action} from "@aragon/osx-commons-contracts/src/executors/IEx | |
/// @notice The admin governance plugin giving execution permission on the DAO to a single address. | ||
/// @dev v1.2 (Release 1, Build 2) | ||
/// @custom:security-contact [email protected] | ||
contract Admin is IMembership, PluginUUPSUpgradeable, ProposalUpgradeable { | ||
contract Admin is IMembership, PluginCloneable, ProposalUpgradeable { | ||
using SafeCastUpgradeable for uint256; | ||
|
||
/// @notice The [ERC-165](https://eips.ethereum.org/EIPS/eip-165) interface ID of the contract. | ||
|
@@ -34,7 +34,7 @@ contract Admin is IMembership, PluginUUPSUpgradeable, ProposalUpgradeable { | |
/// @param _dao The associated DAO. | ||
/// @dev This method is required to support [ERC-1167](https://eips.ethereum.org/EIPS/eip-1167). | ||
function initialize(IDAO _dao, TargetConfig calldata _targetConfig) external initializer { | ||
__PluginUUPSUpgradeable_init(_dao); | ||
__PluginCloneable_init(_dao); | ||
|
||
_setTargetConfig(_targetConfig); | ||
|
||
|
@@ -46,7 +46,7 @@ contract Admin is IMembership, PluginUUPSUpgradeable, ProposalUpgradeable { | |
/// @return Returns `true` if the interface is supported. | ||
function supportsInterface( | ||
bytes4 _interfaceId | ||
) public view override(PluginUUPSUpgradeable, ProposalUpgradeable) returns (bool) { | ||
) public view override(PluginCloneable, ProposalUpgradeable) returns (bool) { | ||
return | ||
_interfaceId == ADMIN_INTERFACE_ID || | ||
_interfaceId == type(IMembership).interfaceId || | ||
|
@@ -149,12 +149,4 @@ contract Admin is IMembership, PluginUUPSUpgradeable, ProposalUpgradeable { | |
|
||
emit ProposalExecuted(proposalId); | ||
} | ||
|
||
/// @notice Internal method authorizing the upgrade of the contract via the [upgradeability mechanism for UUPS proxies](https://docs.openzeppelin.com/contracts/4.x/api/proxy#UUPSUpgradeable) (see [ERC-1822](https://eips.ethereum.org/EIPS/eip-1822)). | ||
/// @dev The Upgradeability disabled. | ||
function _authorizeUpgrade( | ||
address | ||
) internal virtual override auth(UPGRADE_PLUGIN_PERMISSION_ID) { | ||
revert NotAllowedOperation(); | ||
} | ||
} |
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