Skip to content

Commit

Permalink
Update solidity, hardhat, slither CI (#632)
Browse files Browse the repository at this point in the history
* Update solidity, hardhat, slither CI

* Update solhint

* Fix coverage
  • Loading branch information
zajck committed May 30, 2023
1 parent da7d3b9 commit 13eea7a
Show file tree
Hide file tree
Showing 132 changed files with 14,907 additions and 31,043 deletions.
3 changes: 1 addition & 2 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -186,13 +186,12 @@ jobs:
run: |
cp .env.example .env
- name: Slither analyzer
uses: crytic/slither-action@v0.2.0
uses: crytic/slither-action@v0.3.0
id: slither
with:
node-version: 16
sarif: results.sarif
fail-on: none
slither-version: dev-workaround-action-48
- name: Upload SARIF file
uses: github/codeql-action/upload-sarif@v2
with:
Expand Down
2 changes: 1 addition & 1 deletion .solhint.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"max-line-length": "off",
"compiler-version": [
"error",
"0.8.9"
"0.8.18"
],
"func-name-mixedcase": "off",
"not-rely-on-time": "off",
Expand Down
2 changes: 1 addition & 1 deletion contracts/access/AccessControl.sol
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.7.0) (access/AccessControl.sol)

pragma solidity 0.8.9;
pragma solidity 0.8.18;

import "../interfaces/IAccessControl.sol";
import "../ext_libs/Strings.sol";
Expand Down
2 changes: 1 addition & 1 deletion contracts/access/AccessController.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: GPL-3.0-or-later
pragma solidity 0.8.9;
pragma solidity 0.8.18;

import "../domain/BosonConstants.sol";
import "./AccessControl.sol";
Expand Down
2 changes: 1 addition & 1 deletion contracts/diamond/DiamondLib.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: MIT
pragma solidity 0.8.9;
pragma solidity 0.8.18;

import { IAccessControl } from "../interfaces/IAccessControl.sol";
import { IDiamondCut } from "../interfaces/diamond/IDiamondCut.sol";
Expand Down
6 changes: 4 additions & 2 deletions contracts/diamond/JewelerLib.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: MIT
pragma solidity 0.8.9;
pragma solidity 0.8.18;

import { DiamondLib } from "./DiamondLib.sol";
import { IDiamondCut } from "../interfaces/diamond/IDiamondCut.sol";
Expand Down Expand Up @@ -284,7 +284,9 @@ library JewelerLib {
if (!success) {
if (error.length > 0) {
// bubble up the error
revert(string(error));
assembly {
revert(add(32, error), mload(error))
}
} else {
revert("LibDiamondCut: _init function reverted");
}
Expand Down
2 changes: 1 addition & 1 deletion contracts/diamond/ProtocolDiamond.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: MIT
pragma solidity 0.8.9;
pragma solidity 0.8.18;

import "../domain/BosonConstants.sol";
import { IAccessControl } from "../interfaces/IAccessControl.sol";
Expand Down
2 changes: 1 addition & 1 deletion contracts/diamond/facets/DiamondCutFacet.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: MIT
pragma solidity 0.8.9;
pragma solidity 0.8.18;

import "../../domain/BosonConstants.sol";
import { IDiamondCut } from "../../interfaces/diamond/IDiamondCut.sol";
Expand Down
2 changes: 1 addition & 1 deletion contracts/diamond/facets/DiamondLoupeFacet.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: MIT
pragma solidity 0.8.9;
pragma solidity 0.8.18;

import { IDiamondLoupe } from "../../interfaces/diamond/IDiamondLoupe.sol";
import { DiamondLib } from "../DiamondLib.sol";
Expand Down
2 changes: 1 addition & 1 deletion contracts/diamond/facets/ERC165Facet.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: MIT
pragma solidity 0.8.9;
pragma solidity 0.8.18;

import "../../domain/BosonConstants.sol";
import { DiamondLib } from "../DiamondLib.sol";
Expand Down
2 changes: 1 addition & 1 deletion contracts/domain/BosonConstants.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: GPL-3.0-or-later
pragma solidity 0.8.9;
pragma solidity 0.8.18;

// Access Control Roles
bytes32 constant ADMIN = keccak256("ADMIN"); // Role Admin
Expand Down
2 changes: 1 addition & 1 deletion contracts/domain/BosonTypes.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: GPL-3.0-or-later
pragma solidity 0.8.9;
pragma solidity 0.8.18;

/**
* @title BosonTypes
Expand Down
2 changes: 1 addition & 1 deletion contracts/example/SnapshotGate/SnapshotGate.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: GPL-3.0-or-later
pragma solidity ^0.8.9;
pragma solidity 0.8.18;

import { IBosonExchangeHandler } from "../../interfaces/handlers/IBosonExchangeHandler.sol";
import { IBosonOfferHandler } from "../../interfaces/handlers/IBosonOfferHandler.sol";
Expand Down
2 changes: 1 addition & 1 deletion contracts/example/SnapshotGate/support/ERC721.sol
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.7.0) (token/ERC721/ERC721.sol)

pragma solidity 0.8.9;
pragma solidity 0.8.18;

import "../../../interfaces/IERC721.sol";
import "../../../ext_libs/Address.sol";
Expand Down
2 changes: 1 addition & 1 deletion contracts/example/SnapshotGate/support/IERC721Metadata.sol
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (token/ERC721/extensions/IERC721Metadata.sol)

pragma solidity 0.8.9;
pragma solidity 0.8.18;

import "../../../interfaces/IERC721.sol";

Expand Down
2 changes: 1 addition & 1 deletion contracts/example/SnapshotGate/support/IERC721Receiver.sol
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.6.0) (token/ERC721/IERC721Receiver.sol)

pragma solidity 0.8.9;
pragma solidity 0.8.18;

/**
* @title ERC721 token receiver interface
Expand Down
2 changes: 1 addition & 1 deletion contracts/ext_libs/Address.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: MIT
pragma solidity 0.8.9;
pragma solidity 0.8.18;

/**
* @dev Collection of functions related to the address type
Expand Down
2 changes: 1 addition & 1 deletion contracts/ext_libs/Math.sol
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.7.0) (utils/math/Math.sol)

pragma solidity 0.8.9;
pragma solidity 0.8.18;

/**
* @dev Standard math utilities missing in the Solidity language.
Expand Down
2 changes: 1 addition & 1 deletion contracts/ext_libs/SafeERC20.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: MIT
pragma solidity 0.8.9;
pragma solidity 0.8.18;

import "../interfaces/IERC20.sol";
import "./Address.sol";
Expand Down
2 changes: 1 addition & 1 deletion contracts/ext_libs/Strings.sol
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.7.0) (utils/Strings.sol)

pragma solidity 0.8.9;
pragma solidity 0.8.18;

import "./Math.sol";

Expand Down
2 changes: 1 addition & 1 deletion contracts/interfaces/DAIAliases.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: MIT
pragma solidity 0.8.9;
pragma solidity 0.8.18;

/**
* @dev DAI specific aliases for ERC20 functions
Expand Down
2 changes: 1 addition & 1 deletion contracts/interfaces/IAccessControl.sol
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (access/IAccessControl.sol)

pragma solidity 0.8.9;
pragma solidity 0.8.18;

/**
* @dev External interface of AccessControl declared to support ERC165 detection.
Expand Down
2 changes: 1 addition & 1 deletion contracts/interfaces/IERC1155.sol
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.7.0) (token/ERC1155/IERC1155.sol)

pragma solidity 0.8.9;
pragma solidity 0.8.18;

import "./IERC165.sol";

Expand Down
2 changes: 1 addition & 1 deletion contracts/interfaces/IERC165.sol
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/introspection/IERC165.sol)

pragma solidity 0.8.9;
pragma solidity 0.8.18;

/**
* @dev Interface of the ERC165 standard, as defined in the
Expand Down
2 changes: 1 addition & 1 deletion contracts/interfaces/IERC20.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: MIT
pragma solidity 0.8.9;
pragma solidity 0.8.18;

/**
* @dev Interface of the ERC20 standard as defined in the EIP.
Expand Down
2 changes: 1 addition & 1 deletion contracts/interfaces/IERC20Metadata.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: MIT
pragma solidity 0.8.9;
pragma solidity 0.8.18;

import "./IERC20.sol";

Expand Down
2 changes: 1 addition & 1 deletion contracts/interfaces/IERC2981.sol
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.6.0) (interfaces/IERC2981.sol)

pragma solidity 0.8.9;
pragma solidity 0.8.18;

import "./IERC165.sol";

Expand Down
2 changes: 1 addition & 1 deletion contracts/interfaces/IERC721.sol
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (token/ERC721/IERC721.sol)

pragma solidity 0.8.9;
pragma solidity 0.8.18;

import "./IERC165.sol";

Expand Down
2 changes: 1 addition & 1 deletion contracts/interfaces/IInitializableVoucherClone.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: MIT
pragma solidity 0.8.9;
pragma solidity 0.8.18;

import "../domain/BosonTypes.sol";

Expand Down
2 changes: 1 addition & 1 deletion contracts/interfaces/ITwinToken.sol
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (token/ERC721/IERC721.sol)

pragma solidity 0.8.9;
pragma solidity 0.8.18;

import "./IERC165.sol";

Expand Down
2 changes: 1 addition & 1 deletion contracts/interfaces/clients/IBosonVoucher.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: GPL-3.0-or-later
pragma solidity 0.8.9;
pragma solidity 0.8.18;

import { IERC721Upgradeable } from "@openzeppelin/contracts-upgradeable/token/ERC721/IERC721Upgradeable.sol";
import { IERC721MetadataUpgradeable } from "@openzeppelin/contracts-upgradeable/token/ERC721/extensions/IERC721MetadataUpgradeable.sol";
Expand Down
2 changes: 1 addition & 1 deletion contracts/interfaces/clients/IClientExternalAddresses.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: GPL-3.0-or-later
pragma solidity 0.8.9;
pragma solidity 0.8.18;

import { IAccessControl } from "../IAccessControl.sol";
import { IClientExternalAddressesEvents } from "../events/IClientExternalAddressesEvents.sol";
Expand Down
2 changes: 1 addition & 1 deletion contracts/interfaces/diamond/IDiamondCut.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: MIT
pragma solidity 0.8.9;
pragma solidity 0.8.18;

/**
* @title IDiamondCut
Expand Down
2 changes: 1 addition & 1 deletion contracts/interfaces/diamond/IDiamondLoupe.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: MIT
pragma solidity 0.8.9;
pragma solidity 0.8.18;

/**
* @title IDiamondLoupe
Expand Down
2 changes: 1 addition & 1 deletion contracts/interfaces/diamond/IERC165Extended.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: MIT
pragma solidity 0.8.9;
pragma solidity 0.8.18;

/**
* @title IDiamondCut
Expand Down
2 changes: 1 addition & 1 deletion contracts/interfaces/events/IBosonAccountEvents.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: GPL-3.0-or-later
pragma solidity 0.8.9;
pragma solidity 0.8.18;

import { BosonTypes } from "../../domain/BosonTypes.sol";

Expand Down
2 changes: 1 addition & 1 deletion contracts/interfaces/events/IBosonBundleEvents.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: GPL-3.0-or-later
pragma solidity 0.8.9;
pragma solidity 0.8.18;

import { BosonTypes } from "../../domain/BosonTypes.sol";

Expand Down
2 changes: 1 addition & 1 deletion contracts/interfaces/events/IBosonConfigEvents.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: GPL-3.0-or-later
pragma solidity 0.8.9;
pragma solidity 0.8.18;

import { BosonTypes } from "../../domain/BosonTypes.sol";

Expand Down
2 changes: 1 addition & 1 deletion contracts/interfaces/events/IBosonDisputeEvents.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: GPL-3.0-or-later
pragma solidity 0.8.9;
pragma solidity 0.8.18;

import { BosonTypes } from "../../domain/BosonTypes.sol";

Expand Down
2 changes: 1 addition & 1 deletion contracts/interfaces/events/IBosonExchangeEvents.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: GPL-3.0-or-later
pragma solidity 0.8.9;
pragma solidity 0.8.18;

import { BosonTypes } from "../../domain/BosonTypes.sol";

Expand Down
2 changes: 1 addition & 1 deletion contracts/interfaces/events/IBosonFundsEvents.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: GPL-3.0-or-later
pragma solidity 0.8.9;
pragma solidity 0.8.18;

import { BosonTypes } from "../../domain/BosonTypes.sol";

Expand Down
2 changes: 1 addition & 1 deletion contracts/interfaces/events/IBosonGroupEvents.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: GPL-3.0-or-later
pragma solidity 0.8.9;
pragma solidity 0.8.18;

import { BosonTypes } from "../../domain/BosonTypes.sol";

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: GPL-3.0-or-later
pragma solidity 0.8.9;
pragma solidity 0.8.18;

/**
* @title IBosonMetaTransactionsEvents
Expand Down
2 changes: 1 addition & 1 deletion contracts/interfaces/events/IBosonOfferEvents.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: GPL-3.0-or-later
pragma solidity 0.8.9;
pragma solidity 0.8.18;

import { BosonTypes } from "../../domain/BosonTypes.sol";

Expand Down
2 changes: 1 addition & 1 deletion contracts/interfaces/events/IBosonPauseEvents.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: GPL-3.0-or-later
pragma solidity 0.8.9;
pragma solidity 0.8.18;

import { BosonTypes } from "../../domain/BosonTypes.sol";

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: GPL-3.0-or-later
pragma solidity 0.8.9;
pragma solidity 0.8.18;

/**
* @title IBosonInitializationEvents
Expand Down
2 changes: 1 addition & 1 deletion contracts/interfaces/events/IBosonTwinEvents.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: GPL-3.0-or-later
pragma solidity 0.8.9;
pragma solidity 0.8.18;

import { BosonTypes } from "../../domain/BosonTypes.sol";

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: GPL-3.0-or-later
pragma solidity 0.8.9;
pragma solidity 0.8.18;

/**
* @title IClientExternalAddressesEvents
Expand Down
2 changes: 1 addition & 1 deletion contracts/interfaces/handlers/IBosonAccountHandler.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: GPL-3.0-or-later
pragma solidity 0.8.9;
pragma solidity 0.8.18;

import { BosonTypes } from "../../domain/BosonTypes.sol";
import { IBosonAccountEvents } from "../events/IBosonAccountEvents.sol";
Expand Down
2 changes: 1 addition & 1 deletion contracts/interfaces/handlers/IBosonBundleHandler.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: GPL-3.0-or-later
pragma solidity 0.8.9;
pragma solidity 0.8.18;

import { BosonTypes } from "../../domain/BosonTypes.sol";
import { IBosonBundleEvents } from "../events/IBosonBundleEvents.sol";
Expand Down
Loading

0 comments on commit 13eea7a

Please sign in to comment.