From 74f68f712bd2d5a652f767c796ea693c986769d1 Mon Sep 17 00:00:00 2001 From: Giorgi Lagidze Date: Fri, 15 Nov 2024 15:11:11 +0400 Subject: [PATCH] inconsistent permission id naming --- contracts/src/plugin/Plugin.sol | 9 +++++---- contracts/test/plugin/plugin.ts | 2 +- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/contracts/src/plugin/Plugin.sol b/contracts/src/plugin/Plugin.sol index 49bb2ea0..d185849c 100644 --- a/contracts/src/plugin/Plugin.sol +++ b/contracts/src/plugin/Plugin.sol @@ -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. @@ -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); } diff --git a/contracts/test/plugin/plugin.ts b/contracts/test/plugin/plugin.ts index bfed205a..ee1c0eec 100644 --- a/contracts/test/plugin/plugin.ts +++ b/contracts/test/plugin/plugin.ts @@ -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') ); });