Skip to content

Commit

Permalink
inconsistent permission id naming
Browse files Browse the repository at this point in the history
  • Loading branch information
novaknole committed Nov 15, 2024
1 parent 1fe8349 commit 74f68f7
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
9 changes: 5 additions & 4 deletions contracts/src/plugin/Plugin.sol
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,9 @@ abstract contract Plugin is IPlugin, ERC165, DaoAuthorizable, ProtocolVersion {
/// @notice Thrown when `delegatecall` fails.
error DelegateCallFailed();

/// @notice The ID of the permission required to call the `setTarget` function.
bytes32 public constant SET_TARGET_PERMISSION_ID = keccak256("SET_TARGET_PERMISSION");
/// @notice The ID of the permission required to call the `setTargetConfig` function.
bytes32 public constant SET_TARGET_CONFIG_PERMISSION_ID =
keccak256("SET_TARGET_CONFIG_PERMISSION");

/// @notice Constructs the plugin by storing the associated DAO.
/// @param _dao The DAO contract.
Expand Down Expand Up @@ -63,11 +64,11 @@ abstract contract Plugin is IPlugin, ERC165, DaoAuthorizable, ProtocolVersion {
}

/// @dev Sets the target to a new target (`newTarget`).
/// The caller must have the `SET_TARGET_PERMISSION_ID` permission.
/// The caller must have the `SET_TARGET_CONFIG_PERMISSION_ID` permission.
/// @param _targetConfig The target Config containing the address and operation type.
function setTargetConfig(
TargetConfig calldata _targetConfig
) public auth(SET_TARGET_PERMISSION_ID) {
) public auth(SET_TARGET_CONFIG_PERMISSION_ID) {
_setTargetConfig(_targetConfig);
}

Expand Down
2 changes: 1 addition & 1 deletion contracts/test/plugin/plugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ describe('Plugin', function () {
daoMock.address,
plugin.address,
deployer.address,
ethers.utils.id('SET_TARGET_PERMISSION')
ethers.utils.id('SET_TARGET_CONFIG_PERMISSION')
);
});

Expand Down

0 comments on commit 74f68f7

Please sign in to comment.