generated from aragon/osx-plugin-template-hardhat
-
Notifications
You must be signed in to change notification settings - Fork 1
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
6 changed files
with
126 additions
and
33 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
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
21 changes: 21 additions & 0 deletions
21
packages/contracts/src/test/TestMemberAccessExecuteCondition.sol
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,21 @@ | ||
// SPDX-License-Identifier: AGPL-3.0-or-later | ||
|
||
pragma solidity 0.8.17; | ||
|
||
import {IDAO} from "@aragon/osx/core/dao/IDAO.sol"; | ||
import {MemberAccessExecuteCondition} from "../conditions/MemberAccessExecuteCondition.sol"; | ||
|
||
/// @notice The condition associated with `TestSharedPlugin` | ||
contract TestMemberAccessExecuteCondition is MemberAccessExecuteCondition { | ||
constructor(address _targetContract) MemberAccessExecuteCondition(_targetContract) {} | ||
|
||
function getSelector(bytes memory _data) public pure returns (bytes4 selector) { | ||
return super._getSelector(_data); | ||
} | ||
|
||
function decodeAddRemoveMemberCalldata( | ||
bytes memory _data | ||
) public pure returns (bytes4 sig, address account) { | ||
return super._decodeAddRemoveMemberCalldata(_data); | ||
} | ||
} |
43 changes: 43 additions & 0 deletions
43
packages/contracts/src/test/TestOnlyPluginUpgraderCondition.sol
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,43 @@ | ||
// SPDX-License-Identifier: AGPL-3.0-or-later | ||
|
||
pragma solidity 0.8.17; | ||
|
||
import {DAO} from "@aragon/osx/core/dao/DAO.sol"; | ||
import {PluginSetupProcessor} from "@aragon/osx/framework/plugin/setup/PluginSetupProcessor.sol"; | ||
import {OnlyPluginUpgraderCondition} from "../conditions/OnlyPluginUpgraderCondition.sol"; | ||
|
||
/// @notice The condition associated with `TestSharedPlugin` | ||
contract TestOnlyPluginUpgraderCondition is OnlyPluginUpgraderCondition { | ||
constructor( | ||
DAO _dao, | ||
PluginSetupProcessor _psp, | ||
address[] memory _targetPluginAddresses | ||
) OnlyPluginUpgraderCondition(_dao, _psp, _targetPluginAddresses) {} | ||
|
||
function getSelector(bytes memory _data) public pure returns (bytes4 selector) { | ||
return super._getSelector(_data); | ||
} | ||
|
||
function decodeGrantRevokeCalldata( | ||
bytes memory _data | ||
) public pure returns (bytes4 selector, address where, address who, bytes32 permissionId) { | ||
return super._decodeGrantRevokeCalldata(_data); | ||
} | ||
|
||
function decodeApplyUpdateCalldata( | ||
bytes memory _data | ||
) public pure returns (bytes4 selector, address daoAddress, address targetPluginAddress) { | ||
return super._decodeApplyUpdateCalldata(_data); | ||
} | ||
|
||
function isValidGrantRevokeCalldata( | ||
bytes memory _grantData, | ||
bytes memory _revokeData | ||
) public view returns (bool) { | ||
return super._isValidGrantRevokeCalldata(_grantData, _revokeData); | ||
} | ||
|
||
function isValidApplyUpdateCalldata(bytes memory _data) public view returns (bool) { | ||
return super._isValidApplyUpdateCalldata(_data); | ||
} | ||
} |
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
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