Skip to content

Commit

Permalink
Fix solhint issues
Browse files Browse the repository at this point in the history
drinkcoffee committed Oct 22, 2024
1 parent d44dcb5 commit 30ba129
Showing 10 changed files with 20 additions and 15 deletions.
2 changes: 1 addition & 1 deletion contracts/access/MintingAccessControl.sol
Original file line number Diff line number Diff line change
@@ -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
1 change: 1 addition & 0 deletions contracts/bridge/x/v4/CoreV4.sol
Original file line number Diff line number Diff line change
@@ -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;

3 changes: 2 additions & 1 deletion contracts/deployer/create/OwnableCreateDeploy.sol
Original file line number Diff line number Diff line change
@@ -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)
2 changes: 1 addition & 1 deletion contracts/deployer/create2/OwnableCreate2Deployer.sol
Original file line number Diff line number Diff line change
@@ -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";

2 changes: 1 addition & 1 deletion contracts/deployer/create3/OwnableCreate3Deployer.sol
Original file line number Diff line number Diff line change
@@ -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";
4 changes: 2 additions & 2 deletions contracts/staking/StakeHolder.sol
Original file line number Diff line number Diff line change
@@ -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 {
14 changes: 8 additions & 6 deletions contracts/token/erc1155/abstract/ERC1155Permit.sol
Original file line number Diff line number Diff line change
@@ -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();
}
2 changes: 1 addition & 1 deletion contracts/token/erc1155/abstract/ImmutableERC1155Base.sol
Original file line number Diff line number Diff line change
@@ -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";
Original file line number Diff line number Diff line change
@@ -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";

/**
Original file line number Diff line number Diff line change
@@ -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 {}

0 comments on commit 30ba129

Please sign in to comment.