Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: Solidity Pragma Downgrade #80

Merged
merged 8 commits into from
Sep 1, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
name: "CI"
on: ["pull_request"]
on:
push:
branches: [main, develop]
pull_request:
branches: [main, develop]
jobs:
tests:
name: "Tests"
Expand Down
6 changes: 5 additions & 1 deletion .github/workflows/coveralls.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
on: ["pull_request"]
name: Test Coveralls
on:
push:
branches: [main, develop]
pull_request:
branches: [main, develop]
jobs:
build:
name: Build
Expand Down
25 changes: 25 additions & 0 deletions .github/workflows/linter.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: "CI"
on:
push:
branches: [main, develop]
pull_request:
branches: [main, develop]
jobs:
tests:
name: "Tests"
runs-on: ubuntu-latest
needs: []
steps:
- name: "Checkout Repo"
uses: actions/checkout@master
- name: "Install Node"
uses: actions/setup-node@v2
with:
node-version: "14"
cache: "yarn"
- name: "Install JS Dependencies"
run: "yarn install --frozen-lockfile --dev"
- name: "Build"
run: "yarn build"
- name: "Lint"
run: "yarn lint"
8 changes: 8 additions & 0 deletions .solhint.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"plugins": ["prettier"],
"extends": "solhint:recommended",
"rules": {
"prettier/prettier": "error",
"compiler-version": ["error", "^0.8.4"]
}
}
2 changes: 1 addition & 1 deletion contracts/beacon-diamond/BeaconDiamond.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.14;
pragma solidity ^0.8.4;

/******************************************************************************\
* EIP-2535 Diamonds implementation that uses an external IDiamondLoupe to store facet addresses.
Expand Down
2 changes: 1 addition & 1 deletion contracts/beacon-diamond/libraries/LibBeaconDiamond.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.14;
pragma solidity ^0.8.4;

import {IDiamondLoupe} from "hardhat-deploy/solc_0.8/diamond/interfaces/IDiamondLoupe.sol";

Expand Down
10 changes: 5 additions & 5 deletions contracts/pco-license/facets/CFABasePCOFacet.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.14;
pragma solidity ^0.8.4;

import "../libraries/LibCFABasePCO.sol";
import "../interfaces/IBasePCO.sol";
Expand Down Expand Up @@ -125,7 +125,7 @@ contract CFABasePCOFacet is IBasePCO, CFABasePCOFacetModifiers {
/**
* @notice Current payer of license
*/
function payer() external view returns (address) {
function payer() external view override returns (address) {
LibCFABasePCO.Bid storage _currentBid = LibCFABasePCO._currentBid();
return _currentBid.bidder;
}
Expand All @@ -140,7 +140,7 @@ contract CFABasePCOFacet is IBasePCO, CFABasePCOFacetModifiers {
/**
* @notice Current price needed to purchase license
*/
function forSalePrice() external view returns (uint256) {
function forSalePrice() external view override returns (uint256) {
if (LibCFABasePCO._isPayerBidActive()) {
LibCFABasePCO.Bid storage _currentBid = LibCFABasePCO._currentBid();
return _currentBid.forSalePrice;
Expand All @@ -152,7 +152,7 @@ contract CFABasePCOFacet is IBasePCO, CFABasePCOFacetModifiers {
/**
* @notice License Id
*/
function licenseId() external view returns (uint256) {
function licenseId() external view override returns (uint256) {
LibCFABasePCO.DiamondStorage storage ds = LibCFABasePCO
.diamondStorage();
return ds.licenseId;
Expand All @@ -161,7 +161,7 @@ contract CFABasePCOFacet is IBasePCO, CFABasePCOFacetModifiers {
/**
* @notice License
*/
function license() external view returns (IERC721) {
function license() external view override returns (IERC721) {
LibCFABasePCO.DiamondStorage storage ds = LibCFABasePCO
.diamondStorage();
return ds.license;
Expand Down
4 changes: 3 additions & 1 deletion contracts/pco-license/facets/CFAPenaltyBidFacet.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.14;
pragma solidity ^0.8.4;

import "../libraries/LibCFABasePCO.sol";
import {CFABasePCOFacetModifiers} from "./CFABasePCOFacet.sol";
Expand Down Expand Up @@ -131,6 +131,7 @@ contract CFAPenaltyBidFacet is ICFABiddable, CFABasePCOFacetModifiers {
*/
function editBid(int96 newContributionRate, uint256 newForSalePrice)
external
override
onlyPayer
onlyIfNotPendingBid
{
Expand All @@ -147,6 +148,7 @@ contract CFAPenaltyBidFacet is ICFABiddable, CFABasePCOFacetModifiers {
*/
function placeBid(int96 newContributionRate, uint256 newForSalePrice)
external
override
onlyIfPayerBidActive
{
LibCFAPenaltyBid.Bid storage _pendingBid = LibCFAPenaltyBid
Expand Down
2 changes: 1 addition & 1 deletion contracts/pco-license/facets/CFAReclaimerFacet.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.14;
pragma solidity ^0.8.4;

import {CFABasePCOFacetModifiers} from "./CFABasePCOFacet.sol";
import {CFAv1Library} from "@superfluid-finance/ethereum-contracts/contracts/apps/CFAv1Library.sol";
Expand Down
144 changes: 0 additions & 144 deletions contracts/pco-license/facets/Reclaimer.sol

This file was deleted.

2 changes: 1 addition & 1 deletion contracts/pco-license/interfaces/IBasePCO.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.14;
pragma solidity ^0.8.4;
import "@openzeppelin/contracts/token/ERC721/IERC721.sol";

interface IBasePCO {
Expand Down
2 changes: 1 addition & 1 deletion contracts/pco-license/interfaces/ICFABiddable.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.14;
pragma solidity ^0.8.4;

import "../libraries/LibCFAPenaltyBid.sol";

Expand Down
2 changes: 1 addition & 1 deletion contracts/pco-license/libraries/LibCFABasePCO.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.14;
pragma solidity ^0.8.4;

import "../../registry/interfaces/IPCOLicenseParamsStore.sol";
import {CFAv1Library} from "@superfluid-finance/ethereum-contracts/contracts/apps/CFAv1Library.sol";
Expand Down
2 changes: 1 addition & 1 deletion contracts/pco-license/libraries/LibCFAPenaltyBid.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.14;
pragma solidity ^0.8.4;

import "../../registry/interfaces/IPCOLicenseParamsStore.sol";
import {CFAv1Library} from "@superfluid-finance/ethereum-contracts/contracts/apps/CFAv1Library.sol";
Expand Down
2 changes: 1 addition & 1 deletion contracts/pco-license/libraries/LibCFAReclaimer.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.14;
pragma solidity ^0.8.4;

import "../../registry/interfaces/IPCOLicenseParamsStore.sol";
import {CFAv1Library} from "@superfluid-finance/ethereum-contracts/contracts/apps/CFAv1Library.sol";
Expand Down
2 changes: 1 addition & 1 deletion contracts/registry/facets/ERC721Facet.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.14;
pragma solidity ^0.8.4;

import "../libraries/LibERC721.sol";
import "hardhat-deploy/solc_0.8/diamond/libraries/LibDiamond.sol";
Expand Down
2 changes: 1 addition & 1 deletion contracts/registry/facets/GeoWebParcelFacet.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.14;
pragma solidity ^0.8.4;

import "../libraries/LibGeoWebParcel.sol";

Expand Down
2 changes: 1 addition & 1 deletion contracts/registry/facets/GeoWebParcelFacet.test.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.14;
pragma solidity ^0.8.4;

import "../libraries/LibGeoWebParcel.sol";
import "./GeoWebParcelFacet.sol";
Expand Down
2 changes: 1 addition & 1 deletion contracts/registry/facets/PCOLicenseClaimerFacet.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.14;
pragma solidity ^0.8.4;

import "../libraries/LibPCOLicenseClaimer.sol";
import "../libraries/LibPCOLicenseParams.sol";
Expand Down
6 changes: 3 additions & 3 deletions contracts/registry/facets/PCOLicenseParamsFacet.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.14;
pragma solidity ^0.8.4;

import "../libraries/LibPCOLicenseParams.sol";
import "../interfaces/IPCOLicenseParamsStore.sol";
Expand Down Expand Up @@ -147,7 +147,7 @@ contract PCOLicenseParamsFacet is IPCOLicenseParamsStore {
}

/// @notice The numerator of the penalty rate.
function getPenaltyNumerator() external view returns (uint256) {
function getPenaltyNumerator() external view override returns (uint256) {
LibPCOLicenseParams.DiamondStorage storage ds = LibPCOLicenseParams
.diamondStorage();

Expand All @@ -164,7 +164,7 @@ contract PCOLicenseParamsFacet is IPCOLicenseParamsStore {
}

/// @notice The denominator of the penalty rate.
function getPenaltyDenominator() external view returns (uint256) {
function getPenaltyDenominator() external view override returns (uint256) {
LibPCOLicenseParams.DiamondStorage storage ds = LibPCOLicenseParams
.diamondStorage();

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

import {ISuperfluid} from "@superfluid-finance/ethereum-contracts/contracts/interfaces/superfluid/ISuperfluid.sol";
import {ISuperToken} from "@superfluid-finance/ethereum-contracts/contracts/interfaces/superfluid/ISuperToken.sol";
Expand Down
2 changes: 1 addition & 1 deletion contracts/registry/libraries/LibERC721.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.14;
pragma solidity ^0.8.4;

import "@openzeppelin/contracts/token/ERC721/IERC721Receiver.sol";
import "@openzeppelin/contracts/utils/Address.sol";
Expand Down
2 changes: 1 addition & 1 deletion contracts/registry/libraries/LibGeoWebCoordinate.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.14;
pragma solidity ^0.8.4;

/// @title LibGeoWebCoordinate is an unsigned 64-bit integer that contains x and y coordinates in the upper and lower 32 bits, respectively
library LibGeoWebCoordinate {
Expand Down
Loading