diff --git a/contracts/AccessController.sol b/contracts/AccessController.sol index 388c2495d..54a4fa22a 100644 --- a/contracts/AccessController.sol +++ b/contracts/AccessController.sol @@ -191,7 +191,15 @@ contract AccessController is IAccessController, Governable { permissions[_encodePermission(ipAccount, signer, to, func)] = permission; } - /// @dev encode permission to hash (bytes32) + /// @dev Encodes permission parameters into a hash (bytes32) to serve as a unique permission record ID. + /// This function is utilized both when setting permissions and checking permissions to uniquely identify them. + /// In addition to the four permission fields passed by the parameters (ipAccount, signer, to, func), + /// an additional field, "ipAccountOwner", is retrieved on-the-fly when encoding the permission. + /// @param ipAccount The IP account involved in the permission. + /// @param signer The account that signs the transaction. + /// @param to The recipient of the transaction. + /// @param func The function selector involved in the permission. + /// @return A bytes32 hash representing the unique ID of the permission record. function _encodePermission( address ipAccount, address signer,