diff --git a/.prettierignore b/.prettierignore index cf5eb8c1b..6e4263ae9 100644 --- a/.prettierignore +++ b/.prettierignore @@ -1,7 +1,6 @@ build coverage out -lib assets node_modules .next diff --git a/contracts/AccessController.sol b/contracts/AccessController.sol index 57f454421..fc11863cc 100644 --- a/contracts/AccessController.sol +++ b/contracts/AccessController.sol @@ -124,6 +124,7 @@ contract AccessController is IAccessController, Governable { /// @param to_ The recipient of the transaction. /// @param func_ The function selector. /// @return True if the function call is allowed, false otherwise. + // solhint-disable code-complexity function checkPermission( address ipAccount_, address signer_, diff --git a/contracts/IPAccountImpl.sol b/contracts/IPAccountImpl.sol index 84c6683a8..5446fb777 100644 --- a/contracts/IPAccountImpl.sol +++ b/contracts/IPAccountImpl.sol @@ -185,5 +185,4 @@ contract IPAccountImpl is IERC165, IIPAccount { } } } - } diff --git a/contracts/governance/Governable.sol b/contracts/governance/Governable.sol index 214784aac..439918864 100644 --- a/contracts/governance/Governable.sol +++ b/contracts/governance/Governable.sol @@ -7,6 +7,7 @@ import { IGovernance } from "contracts/interfaces/governance/IGovernance.sol"; import { IGovernable } from "../interfaces/governance/IGovernable.sol"; import { ERC165Checker } from "@openzeppelin/contracts/utils/introspection/ERC165Checker.sol"; import { GovernanceLib } from "contracts/lib/GovernanceLib.sol"; + /// @title Governable /// @dev All contracts managed by governance should inherit from this contract. abstract contract Governable is IGovernable { @@ -15,7 +16,7 @@ abstract contract Governable is IGovernable { /// @dev Ensures that the function is called by the protocol admin. modifier onlyProtocolAdmin() { - if(!IGovernance(governance).hasRole(GovernanceLib.PROTOCOL_ADMIN, msg.sender)) { + if (!IGovernance(governance).hasRole(GovernanceLib.PROTOCOL_ADMIN, msg.sender)) { revert Errors.Governance__OnlyProtocolAdmin(); } _; diff --git a/contracts/lib/Errors.sol b/contracts/lib/Errors.sol index b1e1848fa..2ce1269d8 100644 --- a/contracts/lib/Errors.sol +++ b/contracts/lib/Errors.sol @@ -22,7 +22,6 @@ library Errors { error IPAccount__InvalidSignature(); error IPAccount__ExpiredSignature(); - //////////////////////////////////////////////////////////////////////////// // Module // //////////////////////////////////////////////////////////////////////////// diff --git a/contracts/lib/GovernanceLib.sol b/contracts/lib/GovernanceLib.sol index ae01de17e..f51c987bc 100644 --- a/contracts/lib/GovernanceLib.sol +++ b/contracts/lib/GovernanceLib.sol @@ -5,12 +5,11 @@ pragma solidity ^0.8.23; /// @title Governance /// @dev This library provides types for Story Protocol Governance. library GovernanceLib { - bytes32 public constant PROTOCOL_ADMIN = bytes32(0); - /// @notice An enum containing the different states the protocol can be in. - /// @param Unpaused The unpaused state. - /// @param Paused The paused state. + /// @notice An enum containing the different states the protocol can be in. + /// @param Unpaused The unpaused state. + /// @param Paused The paused state. enum ProtocolState { Unpaused, Paused diff --git a/contracts/lib/Licensing.sol b/contracts/lib/Licensing.sol index f80c5443e..8241139d1 100644 --- a/contracts/lib/Licensing.sol +++ b/contracts/lib/Licensing.sol @@ -5,8 +5,6 @@ import { IParamVerifier } from "../interfaces/licensing/IParamVerifier.sol"; import { Errors } from "./Errors.sol"; library Licensing { - - /// Identifies a license parameter (term) from a license framework struct Parameter { /// Contract that must check if the condition of the paremeter is set diff --git a/contracts/registries/LicenseRegistry.sol b/contracts/registries/LicenseRegistry.sol index 870a6a819..52e950317 100644 --- a/contracts/registries/LicenseRegistry.sol +++ b/contracts/registries/LicenseRegistry.sol @@ -439,7 +439,8 @@ contract LicenseRegistry is ERC1155, ILicenseRegistry { uint256[] memory ids, uint256[] memory values ) internal virtual override { - // We are interested in transfers, minting and burning are checked in mintLicense and linkIpToParent respectively. + // We are interested in transfers, minting and burning are checked in mintLicense and linkIpToParent + // respectively. if (from != address(0) && to != address(0)) { for (uint256 i = 0; i < ids.length; i++) { // Verify transfer params