From 7a815018598122c2bc90104d8945b96a0fdb2ce1 Mon Sep 17 00:00:00 2001 From: Neeraj Kashyap Date: Thu, 2 Feb 2023 16:23:41 -0800 Subject: [PATCH] Trying to fix tests in CI --- .github/workflows/game7ctl.lint.yml | 8 +++++--- contracts/diamond/Diamond.sol | 2 +- contracts/facets/DiamondCutFacet.sol | 2 +- contracts/facets/DiamondLoupeFacet.sol | 2 +- contracts/facets/InventoryFacet.sol | 2 +- contracts/facets/OwnershipFacet.sol | 2 +- contracts/interfaces/IDiamond.sol | 2 +- contracts/interfaces/IDiamondCut.sol | 2 +- contracts/interfaces/IDiamondLoupe.sol | 2 +- contracts/interfaces/IERC165.sol | 2 +- contracts/interfaces/IERC173.sol | 2 +- contracts/interfaces/IInventory.sol | 2 +- contracts/libraries/LibDiamond.sol | 2 +- contracts/libraries/LibInventory.sol | 2 +- contracts/mock/MockERC1155.sol | 2 +- contracts/mock/MockERC20.sol | 2 +- contracts/mock/MockERC721.sol | 2 +- contracts/mock/MockTerminus.sol | 2 +- contracts/mock/ShibaERC721.sol | 2 +- 19 files changed, 23 insertions(+), 21 deletions(-) diff --git a/.github/workflows/game7ctl.lint.yml b/.github/workflows/game7ctl.lint.yml index 4504d1b..12ecc81 100644 --- a/.github/workflows/game7ctl.lint.yml +++ b/.github/workflows/game7ctl.lint.yml @@ -13,12 +13,14 @@ jobs: - uses: actions/checkout@v2 - uses: actions/setup-python@v2 with: - python-version: "3.10" + python-version: "3.9" - name: Upgrade pip and setuptools run: pip install --upgrade pip setuptools - - name: Install black + - name: Install dependencies (including dev dependencies) working-directory: game7ctl/ - run: pip install black + env: + BROWNIE_LIB: 1 + run: pip install -e ".[dev]" - name: Black syntax check working-directory: game7ctl/ run: black --check game7ctl diff --git a/contracts/diamond/Diamond.sol b/contracts/diamond/Diamond.sol index 285f2b9..e72f61d 100644 --- a/contracts/diamond/Diamond.sol +++ b/contracts/diamond/Diamond.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -pragma solidity ^0.8.0; +pragma solidity 0.8.17; // Adapted from the Diamond 3 reference implementation by Nick Mudge: // https://github.com/mudgen/diamond-3-hardhat diff --git a/contracts/facets/DiamondCutFacet.sol b/contracts/facets/DiamondCutFacet.sol index f6fd15e..7a9baa5 100644 --- a/contracts/facets/DiamondCutFacet.sol +++ b/contracts/facets/DiamondCutFacet.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -pragma solidity ^0.8.0; +pragma solidity 0.8.17; // Adapted from the Diamond 3 reference implementation by Nick Mudge: // https://github.com/mudgen/diamond-3-hardhat diff --git a/contracts/facets/DiamondLoupeFacet.sol b/contracts/facets/DiamondLoupeFacet.sol index 6e67fc0..a6b65ef 100644 --- a/contracts/facets/DiamondLoupeFacet.sol +++ b/contracts/facets/DiamondLoupeFacet.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -pragma solidity ^0.8.0; +pragma solidity 0.8.17; // Adapted from the Diamond 3 reference implementation by Nick Mudge: // https://github.com/mudgen/diamond-3-hardhat diff --git a/contracts/facets/InventoryFacet.sol b/contracts/facets/InventoryFacet.sol index 4cc1b90..64f91a7 100644 --- a/contracts/facets/InventoryFacet.sol +++ b/contracts/facets/InventoryFacet.sol @@ -5,7 +5,7 @@ * GitHub: https://github.com/G7DAO/contracts */ -pragma solidity ^0.8.0; +pragma solidity 0.8.17; import {TerminusPermissions} from "@moonstream/contracts/terminus/TerminusPermissions.sol"; import {DiamondReentrancyGuard} from "@moonstream-engine/contracts/diamond/security/DiamondReentrancyGuard.sol"; diff --git a/contracts/facets/OwnershipFacet.sol b/contracts/facets/OwnershipFacet.sol index 4427236..8889f58 100644 --- a/contracts/facets/OwnershipFacet.sol +++ b/contracts/facets/OwnershipFacet.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -pragma solidity ^0.8.0; +pragma solidity 0.8.17; import {LibDiamond} from "../libraries/LibDiamond.sol"; import {IERC173} from "../interfaces/IERC173.sol"; diff --git a/contracts/interfaces/IDiamond.sol b/contracts/interfaces/IDiamond.sol index bb1fd45..7c0f7d0 100644 --- a/contracts/interfaces/IDiamond.sol +++ b/contracts/interfaces/IDiamond.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -pragma solidity ^0.8.0; +pragma solidity 0.8.17; interface IDiamond { fallback() external payable; diff --git a/contracts/interfaces/IDiamondCut.sol b/contracts/interfaces/IDiamondCut.sol index c63042d..b889dd4 100644 --- a/contracts/interfaces/IDiamondCut.sol +++ b/contracts/interfaces/IDiamondCut.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -pragma solidity ^0.8.0; +pragma solidity 0.8.17; // Adapted from the Diamond 3 reference implementation by Nick Mudge: // https://github.com/mudgen/diamond-3-hardhat diff --git a/contracts/interfaces/IDiamondLoupe.sol b/contracts/interfaces/IDiamondLoupe.sol index 353df81..6cbecaf 100644 --- a/contracts/interfaces/IDiamondLoupe.sol +++ b/contracts/interfaces/IDiamondLoupe.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -pragma solidity ^0.8.0; +pragma solidity 0.8.17; // Adapted from the Diamond 3 reference implementation by Nick Mudge: // https://github.com/mudgen/diamond-3-hardhat diff --git a/contracts/interfaces/IERC165.sol b/contracts/interfaces/IERC165.sol index 04b7bcc..64b099d 100644 --- a/contracts/interfaces/IERC165.sol +++ b/contracts/interfaces/IERC165.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -pragma solidity ^0.8.0; +pragma solidity 0.8.17; interface IERC165 { /// @notice Query if a contract implements an interface diff --git a/contracts/interfaces/IERC173.sol b/contracts/interfaces/IERC173.sol index 20ca767..9ca5003 100644 --- a/contracts/interfaces/IERC173.sol +++ b/contracts/interfaces/IERC173.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -pragma solidity ^0.8.0; +pragma solidity 0.8.17; /// @title ERC-173 Contract Ownership Standard interface IERC173 { diff --git a/contracts/interfaces/IInventory.sol b/contracts/interfaces/IInventory.sol index 0e58ba4..f5ec4a5 100644 --- a/contracts/interfaces/IInventory.sol +++ b/contracts/interfaces/IInventory.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -pragma solidity ^0.8.0; +pragma solidity 0.8.17; import "../libraries/LibInventory.sol"; diff --git a/contracts/libraries/LibDiamond.sol b/contracts/libraries/LibDiamond.sol index 5f0c982..a439e11 100644 --- a/contracts/libraries/LibDiamond.sol +++ b/contracts/libraries/LibDiamond.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -pragma solidity ^0.8.0; +pragma solidity 0.8.17; // Adapted from the Diamond 3 reference implementation by Nick Mudge: // https://github.com/mudgen/diamond-3-hardhat diff --git a/contracts/libraries/LibInventory.sol b/contracts/libraries/LibInventory.sol index 3f5bc44..7dd0963 100644 --- a/contracts/libraries/LibInventory.sol +++ b/contracts/libraries/LibInventory.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -pragma solidity ^0.8.0; +pragma solidity 0.8.17; /** LibInventory defines the storage structure used by the Inventory contract as a facet for an EIP-2535 Diamond diff --git a/contracts/mock/MockERC1155.sol b/contracts/mock/MockERC1155.sol index f14c7cb..762fcdb 100644 --- a/contracts/mock/MockERC1155.sol +++ b/contracts/mock/MockERC1155.sol @@ -1,6 +1,6 @@ // SPDX-License-Identifier: UNLICENSED ///@notice This contract is for mock for WETH token. -pragma solidity ^0.8.0; +pragma solidity 0.8.17; import "@openzeppelin-contracts/contracts/token/ERC1155/extensions/ERC1155Burnable.sol"; diff --git a/contracts/mock/MockERC20.sol b/contracts/mock/MockERC20.sol index ec4af50..c81e46f 100644 --- a/contracts/mock/MockERC20.sol +++ b/contracts/mock/MockERC20.sol @@ -1,6 +1,6 @@ // SPDX-License-Identifier: UNLICENSED ///@notice This contract is for mock for WETH token. -pragma solidity ^0.8.0; +pragma solidity 0.8.17; import "@openzeppelin-contracts/contracts/token/ERC20/ERC20.sol"; import "@openzeppelin-contracts/contracts/token/ERC20/extensions/ERC20Burnable.sol"; diff --git a/contracts/mock/MockERC721.sol b/contracts/mock/MockERC721.sol index cf9aec5..3a21f16 100644 --- a/contracts/mock/MockERC721.sol +++ b/contracts/mock/MockERC721.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: UNLICENSED -pragma solidity ^0.8.0; +pragma solidity 0.8.17; import "@openzeppelin-contracts/contracts/token/ERC721/extensions/ERC721Enumerable.sol"; diff --git a/contracts/mock/MockTerminus.sol b/contracts/mock/MockTerminus.sol index c014b20..ee09321 100644 --- a/contracts/mock/MockTerminus.sol +++ b/contracts/mock/MockTerminus.sol @@ -1,6 +1,6 @@ // SPDX-License-Identifier: UNLICENSED ///@notice This contract is for mock for terminus token (used only for cli generation). -pragma solidity ^0.8.0; +pragma solidity 0.8.17; import "@moonstream/contracts/terminus/TerminusFacet.sol"; diff --git a/contracts/mock/ShibaERC721.sol b/contracts/mock/ShibaERC721.sol index b189d72..95c9bac 100644 --- a/contracts/mock/ShibaERC721.sol +++ b/contracts/mock/ShibaERC721.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: UNLICENSED -pragma solidity ^0.8.0; +pragma solidity 0.8.17; import "@openzeppelin-contracts/contracts/token/ERC721/extensions/ERC721URIStorage.sol"; import "@openzeppelin-contracts/contracts/token/ERC721/ERC721.sol";