diff --git a/contracts/access/MintingAccessControl.sol b/contracts/access/MintingAccessControl.sol index d12695b4..8cf06574 100644 --- a/contracts/access/MintingAccessControl.sol +++ b/contracts/access/MintingAccessControl.sol @@ -3,7 +3,7 @@ pragma solidity 0.8.19; // solhint-disable no-unused-import -import {AccessControlEnumerable, AccessControl, IAccessControl} from "@openzeppelin/contracts/access/AccessControlEnumerable.sol"; +import {AccessControlEnumerable} from "@openzeppelin/contracts/access/AccessControlEnumerable.sol"; abstract contract MintingAccessControl is AccessControlEnumerable { /// @notice Role to mint tokens diff --git a/contracts/bridge/x/v4/CoreV4.sol b/contracts/bridge/x/v4/CoreV4.sol index 69f39ed6..bc643384 100644 --- a/contracts/bridge/x/v4/CoreV4.sol +++ b/contracts/bridge/x/v4/CoreV4.sol @@ -9,6 +9,7 @@ // the StarkEx contract ABI that was provided by StarkWare via slack. pragma solidity ^0.8.19; +// solhint-disable func-name-mixedcase interface CoreV4 { fallback() external payable; diff --git a/contracts/deployer/create/OwnableCreateDeploy.sol b/contracts/deployer/create/OwnableCreateDeploy.sol index 5f42ad71..26cb3f7c 100644 --- a/contracts/deployer/create/OwnableCreateDeploy.sol +++ b/contracts/deployer/create/OwnableCreateDeploy.sol @@ -24,8 +24,9 @@ contract OwnableCreateDeploy { // slither-disable-next-line locked-ether function deploy(bytes memory bytecode) external payable { - // solhint-disable-next-line custom-errors + // solhint-disable-next-line custom-errors, reason-string require(msg.sender == owner, "CreateDeploy: caller is not the owner"); + // solhint-disable no-inline-assembly assembly { if iszero(create(callvalue(), add(bytecode, 32), mload(bytecode))) { revert(0, 0) diff --git a/contracts/deployer/create2/OwnableCreate2Deployer.sol b/contracts/deployer/create2/OwnableCreate2Deployer.sol index bb3891da..07e9e37f 100644 --- a/contracts/deployer/create2/OwnableCreate2Deployer.sol +++ b/contracts/deployer/create2/OwnableCreate2Deployer.sol @@ -2,7 +2,7 @@ // SPDX-License-Identifier: Apache 2.0 pragma solidity 0.8.19; -import "@openzeppelin/contracts/access/Ownable.sol"; +import {Ownable} from "@openzeppelin/contracts/access/Ownable.sol"; import {Deployer} from "@axelar-network/axelar-gmp-sdk-solidity/contracts/deploy/Deployer.sol"; import {Create2} from "@axelar-network/axelar-gmp-sdk-solidity/contracts/deploy/Create2.sol"; diff --git a/contracts/deployer/create3/OwnableCreate3Deployer.sol b/contracts/deployer/create3/OwnableCreate3Deployer.sol index 1bc5bed5..ea5d67b4 100644 --- a/contracts/deployer/create3/OwnableCreate3Deployer.sol +++ b/contracts/deployer/create3/OwnableCreate3Deployer.sol @@ -2,7 +2,7 @@ // SPDX-License-Identifier: Apache 2.0 pragma solidity 0.8.19; -import "@openzeppelin/contracts/access/Ownable.sol"; +import {Ownable} from "@openzeppelin/contracts/access/Ownable.sol"; import {Deployer} from "@axelar-network/axelar-gmp-sdk-solidity/contracts/deploy/Deployer.sol"; import {OwnableCreate3} from "./OwnableCreate3.sol"; diff --git a/contracts/staking/StakeHolder.sol b/contracts/staking/StakeHolder.sol index 57901c8a..98f10daf 100644 --- a/contracts/staking/StakeHolder.sol +++ b/contracts/staking/StakeHolder.sol @@ -1,9 +1,9 @@ // Copyright (c) Immutable Pty Ltd 2018 - 2024 // SPDX-License-Identifier: Apache 2 -pragma solidity ^0.8.20; +pragma solidity ^0.8.19; import {UUPSUpgradeable} from "openzeppelin-contracts-upgradeable-4.9.3/proxy/utils/UUPSUpgradeable.sol"; -import {AccessControlEnumerableUpgradeable, IAccessControlUpgradeable, AccessControlUpgradeable} from "openzeppelin-contracts-upgradeable-4.9.3/access/AccessControlEnumerableUpgradeable.sol"; +import {AccessControlEnumerableUpgradeable} from "openzeppelin-contracts-upgradeable-4.9.3/access/AccessControlEnumerableUpgradeable.sol"; /// @notice Struct to combine an account and an amount. struct AccountAmount { diff --git a/contracts/token/erc1155/abstract/ERC1155Permit.sol b/contracts/token/erc1155/abstract/ERC1155Permit.sol index f804a047..1dc60e78 100644 --- a/contracts/token/erc1155/abstract/ERC1155Permit.sol +++ b/contracts/token/erc1155/abstract/ERC1155Permit.sol @@ -2,22 +2,23 @@ // SPDX-License-Identifier: Apache 2.0 pragma solidity 0.8.19; -import "@openzeppelin/contracts/token/ERC1155/extensions/ERC1155Burnable.sol"; -import "@openzeppelin/contracts/utils/cryptography/EIP712.sol"; -import "@openzeppelin/contracts/interfaces/IERC1271.sol"; -import "solidity-bytes-utils/contracts/BytesLib.sol"; -import "./IERC1155Permit.sol"; +import {ERC1155Burnable, ERC1155} from "@openzeppelin/contracts/token/ERC1155/extensions/ERC1155Burnable.sol"; +import {EIP712, ECDSA} from "@openzeppelin/contracts/utils/cryptography/EIP712.sol"; +import {IERC1271} from "@openzeppelin/contracts/interfaces/IERC1271.sol"; +import {BytesLib} from "solidity-bytes-utils/contracts/BytesLib.sol"; +import {IERC1155Permit} from "./IERC1155Permit.sol"; import {IImmutableERC1155Errors} from "../../../errors/Errors.sol"; abstract contract ERC1155Permit is ERC1155Burnable, EIP712, IERC1155Permit, IImmutableERC1155Errors { bytes32 private immutable _PERMIT_TYPEHASH = keccak256("Permit(address owner,address spender,bool approved,uint256 nonce,uint256 deadline)"); - mapping(address => uint256) private _nonces; + mapping(address account => uint256 nonce) private _nonces; constructor(string memory name, string memory uri) ERC1155(uri) EIP712(name, "1") {} function permit(address owner, address spender, bool approved, uint256 deadline, bytes memory sig) external { + // solhint-disable-next-line not-rely-on-time if (deadline < block.timestamp) { revert PermitExpired(); } @@ -67,6 +68,7 @@ abstract contract ERC1155Permit is ERC1155Burnable, EIP712, IERC1155Permit, IImm * @notice Returns the domain separator used in the encoding of the signature for permits, as defined by EIP-712 * @return the bytes32 domain separator */ + // solhint-disable-next-line func-name-mixedcase function DOMAIN_SEPARATOR() external view override returns (bytes32) { return _domainSeparatorV4(); } diff --git a/contracts/token/erc1155/abstract/ImmutableERC1155Base.sol b/contracts/token/erc1155/abstract/ImmutableERC1155Base.sol index 92212571..c298e3f7 100644 --- a/contracts/token/erc1155/abstract/ImmutableERC1155Base.sol +++ b/contracts/token/erc1155/abstract/ImmutableERC1155Base.sol @@ -2,7 +2,7 @@ // SPDX-License-Identifier: Apache 2.0 pragma solidity 0.8.19; -import {ERC1155, ERC1155Permit} from "../../../token/erc1155/abstract/ERC1155Permit.sol"; +import {ERC1155Permit, ERC1155} from "../../../token/erc1155/abstract/ERC1155Permit.sol"; // Allowlist import {ERC2981} from "@openzeppelin/contracts/token/common/ERC2981.sol"; diff --git a/contracts/token/erc20/preset/ImmutableERC20MinterBurnerPermit.sol b/contracts/token/erc20/preset/ImmutableERC20MinterBurnerPermit.sol index e9ed7948..16bff296 100644 --- a/contracts/token/erc20/preset/ImmutableERC20MinterBurnerPermit.sol +++ b/contracts/token/erc20/preset/ImmutableERC20MinterBurnerPermit.sol @@ -5,7 +5,8 @@ pragma solidity 0.8.19; import {ERC20Permit, ERC20} from "@openzeppelin/contracts/token/ERC20/extensions/ERC20Permit.sol"; import {ERC20Burnable} from "@openzeppelin/contracts/token/ERC20/extensions/ERC20Burnable.sol"; import {ERC20Capped} from "@openzeppelin/contracts/token/ERC20/extensions/ERC20Capped.sol"; -import {MintingAccessControl, AccessControl, IAccessControl} from "../../../access/MintingAccessControl.sol"; +import {AccessControl, IAccessControl} from "@openzeppelin/contracts/access/AccessControl.sol"; +import {MintingAccessControl} from "../../../access/MintingAccessControl.sol"; import {IImmutableERC20Errors} from "./Errors.sol"; /** diff --git a/contracts/trading/seaport/zones/immutable-signed-zone/v2/interfaces/SIP6Interface.sol b/contracts/trading/seaport/zones/immutable-signed-zone/v2/interfaces/SIP6Interface.sol index 2bc63899..3739500c 100644 --- a/contracts/trading/seaport/zones/immutable-signed-zone/v2/interfaces/SIP6Interface.sol +++ b/contracts/trading/seaport/zones/immutable-signed-zone/v2/interfaces/SIP6Interface.sol @@ -4,11 +4,11 @@ // solhint-disable compiler-version pragma solidity ^0.8.17; -import {Schema} from "seaport-types/src/lib/ConsiderationStructs.sol"; import {SIP6EventsAndErrors} from "./SIP6EventsAndErrors.sol"; /** * @dev SIP-6: Multi-Zone ExtraData * https://github.com/ProjectOpenSea/SIPs/blob/main/SIPS/sip-6.md */ +// solhint-disable no-empty-blocks interface SIP6Interface is SIP6EventsAndErrors {}