Skip to content

Commit

Permalink
chore: bump solc to 0.8.20
Browse files Browse the repository at this point in the history
  • Loading branch information
kevin-fruitful committed Oct 18, 2023
1 parent 7ad7528 commit 1d62edb
Show file tree
Hide file tree
Showing 113 changed files with 240 additions and 118 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/npm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ jobs:
always-auth: true

- name: Install solc
run: svm install 0.7.6 && svm install 0.8.17 && svm use 0.8.17
run: svm install 0.7.6 && svm install 0.8.20 && svm use 0.8.20

- name: Fix ownership
run: git config --global --add safe.directory /__w/contracts-v3/contracts-v3
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:
submodules: recursive

- name: Install solc
run: svm install 0.7.6 && svm install 0.8.17 && svm use 0.8.17
run: svm install 0.7.6 && svm install 0.8.20 && svm use 0.8.20

- name: Fix ownership
run: git config --global --add safe.directory /__w/contracts-v3/contracts-v3
Expand Down Expand Up @@ -92,4 +92,4 @@ jobs:
# echo "> $(jq --raw-output '.returns.cut.value' broadcast/SmartDeploy.s.sol/5/dry-run/hash-latest.json || echo "Not Available")" >> $GITHUB_STEP_SUMMARY

# echo " - sepolia \`$(jq --raw-output '.returns.upgradeHash.value' broadcast/SmartDeploy.s.sol/11155111/dry-run/hash-latest.json || echo "Not Available")\`" >> $GITHUB_STEP_SUMMARY
# echo "> $(jq --raw-output '.returns.cut.value' broadcast/SmartDeploy.s.sol/11155111/dry-run/hash-latest.json || echo "Not Available") >> $GITHUB_STEP_SUMMARY
# echo "> $(jq --raw-output '.returns.cut.value' broadcast/SmartDeploy.s.sol/11155111/dry-run/hash-latest.json || echo "Not Available") >> $GITHUB_STEP_SUMMARY
2 changes: 1 addition & 1 deletion .github/workflows/upgrade-goerli-diamond.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
token: ${{ secrets.GITHUB_TOKEN }}

- name: Install solc
run: svm install 0.8.17 && svm use 0.8.17
run: svm install 0.8.20 && svm use 0.8.20

- name: Fix ownership
run: git config --global --add safe.directory /__w/contracts-v3/contracts-v3
Expand Down
2 changes: 1 addition & 1 deletion cli-tools/prep-upgrade.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ const filePath = process.argv[2]; // get the file path from CLI argument

const generateS03UpgradeDiamond = (facetCuts, updateStateAddress) => {
let script = `// SPDX-License-Identifier: MIT
pragma solidity 0.8.17;
pragma solidity 0.8.20;
/// ------------------------------------------------------------------------------------------------------------
///
Expand Down
2 changes: 1 addition & 1 deletion foundry.toml
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ fs_permissions = [
]

[profile.test]
solc = '0.8.17'
solc = '0.8.20'
auto_detect_solc = false
optimizer = false
ffi = true
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -48,12 +48,12 @@
"glob": "^8.0.3",
"prettier": "^2.7.1",
"prettier-plugin-solidity": "^1.0.0-beta.19",
"solc": "0.8.17",
"solc": "0.8.20",
"solhint": "^3.3.7",
"solidity-coverage": "^0.7.21",
"solidity-docgen": "^0.5.17"
},
"dependencies": {
"yarn": "^1.22.19"
}
}
}
2 changes: 1 addition & 1 deletion script/AddSupportedExternalToken.s.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: MIT
pragma solidity 0.8.17;
pragma solidity 0.8.20;

import "forge-std/Script.sol";
import { INayms, IDiamondCut } from "src/diamonds/nayms/INayms.sol";
Expand Down
2 changes: 1 addition & 1 deletion script/CheckBytecode.s.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: MIT
pragma solidity 0.8.17;
pragma solidity 0.8.20;

import { INayms } from "src/diamonds/nayms/INayms.sol";
import "script/utils/DeploymentHelpers.sol";
Expand Down
2 changes: 1 addition & 1 deletion script/CodeRecon.s.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: MIT
pragma solidity 0.8.17;
pragma solidity 0.8.20;

import { strings } from "lib/solidity-stringutils/src/strings.sol";
import { IDiamondLoupe } from "src/diamonds/shared/interfaces/IDiamondLoupe.sol";
Expand Down
2 changes: 1 addition & 1 deletion script/CreateEntity.s.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: MIT
pragma solidity 0.8.17;
pragma solidity 0.8.20;

import "forge-std/Script.sol";
import { INayms, IDiamondCut } from "src/diamonds/nayms/INayms.sol";
Expand Down
2 changes: 1 addition & 1 deletion script/UpdateCommissions.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// // SPDX-License-Identifier: MIT
// pragma solidity 0.8.17;
// pragma solidity 0.8.20;

// import "forge-std/console2.sol";
// import "forge-std/Script.sol";
Expand Down
2 changes: 1 addition & 1 deletion script/deployment/DeployERC20.s.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: MIT
pragma solidity 0.8.17;
pragma solidity 0.8.20;

/// @notice Quickly deploy a mock ERC20 token, for testing only!

Expand Down
2 changes: 1 addition & 1 deletion script/deployment/DiamondChecker.s.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: MIT
pragma solidity 0.8.17;
pragma solidity 0.8.20;

import { IDiamondCut } from "src/diamonds/nayms/INayms.sol";
import "script/utils/DeploymentHelpers.sol";
Expand Down
2 changes: 1 addition & 1 deletion script/deployment/GenerateInterfaces.s.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: MIT
pragma solidity 0.8.17;
pragma solidity 0.8.20;

import "script/utils/DeploymentHelpers.sol";
import "script/utils/LibGeneratedNaymsFacetHelpers.sol";
Expand Down
2 changes: 1 addition & 1 deletion script/deployment/ReplaceDiamondCut.s.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: MIT
pragma solidity 0.8.17;
pragma solidity 0.8.20;

import "script/utils/DeploymentHelpers.sol";

Expand Down
2 changes: 1 addition & 1 deletion script/deployment/ReplaceOwnershipFacet.s.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: MIT
pragma solidity 0.8.17;
pragma solidity 0.8.20;

import "script/utils/DeploymentHelpers.sol";

Expand Down
11 changes: 9 additions & 2 deletions script/deployment/S01DeployContract.s.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: MIT
pragma solidity 0.8.17;
pragma solidity 0.8.20;

import { IDiamondCut } from "src/diamonds/nayms/INayms.sol";
import "script/utils/DeploymentHelpers.sol";
Expand All @@ -9,7 +9,14 @@ import "script/utils/DeploymentHelpers.sol";
/// note The upgradeHash returned here is only correct for upgrading a single facet, and assuming all methods are `replaced`. If we were to add and/or remove methods, we would need to add them to the `cut` array.

contract S01DeployContract is DeploymentHelpers {
function run(string calldata contractName) external returns (IDiamondCut.FacetCut[] memory cut, bytes32 upgradeHash, bytes32 upgradeHashOld) {
function run(string calldata contractName)
external
returns (
IDiamondCut.FacetCut[] memory cut,
bytes32 upgradeHash,
bytes32 upgradeHashOld
)
{
address deployer = msg.sender;
vm.label(deployer, "S01DeployContract deployer");
vm.startBroadcast(deployer);
Expand Down
2 changes: 1 addition & 1 deletion script/deployment/S02ScheduleUpgrade.s.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: MIT
pragma solidity 0.8.17;
pragma solidity 0.8.20;

import "script/utils/DeploymentHelpers.sol";

Expand Down
2 changes: 1 addition & 1 deletion script/deployment/SmartDeploy.s.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: MIT
pragma solidity 0.8.17;
pragma solidity 0.8.20;

import "../utils/DeploymentHelpers.sol";

Expand Down
2 changes: 1 addition & 1 deletion script/legacy/IAdminFacet-17276760.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: MIT
pragma solidity 0.8.17;
pragma solidity 0.8.20;

/// @dev IAdminFacet used during mainnet block 17276760

Expand Down
2 changes: 1 addition & 1 deletion script/legacy/IMarketFacet-17334000.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: MIT
pragma solidity 0.8.17;
pragma solidity 0.8.20;

/// @dev IMarketFacet at block 17334000, prior to fee updates

Expand Down
2 changes: 1 addition & 1 deletion script/utils/DeploymentHelpers.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: MIT
pragma solidity 0.8.17;
pragma solidity 0.8.20;

import "forge-std/Test.sol";
import { strings } from "lib/solidity-stringutils/src/strings.sol";
Expand Down
2 changes: 1 addition & 1 deletion src/diamonds/nayms/AppStorage.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: MIT
pragma solidity 0.8.17;
pragma solidity 0.8.20;

/// @notice storage for nayms v3 decentralized insurance platform

Expand Down
2 changes: 1 addition & 1 deletion src/diamonds/nayms/INayms.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: MIT
pragma solidity 0.8.17;
pragma solidity 0.8.20;

// solhint-disable no-empty-blocks

Expand Down
2 changes: 1 addition & 1 deletion src/diamonds/nayms/InitDiamond.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: MIT
pragma solidity 0.8.17;
pragma solidity 0.8.20;

import { AppStorage, LibAppStorage } from "./AppStorage.sol";
import { LibHelpers } from "./libs/LibHelpers.sol";
Expand Down
2 changes: 1 addition & 1 deletion src/diamonds/nayms/Modifiers.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: MIT
pragma solidity 0.8.17;
pragma solidity 0.8.20;

/// @notice modifiers

Expand Down
2 changes: 1 addition & 1 deletion src/diamonds/nayms/Nayms.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: MIT
pragma solidity 0.8.17;
pragma solidity 0.8.20;

/******************************************************************************\
* Author: Nick Mudge <[email protected]> (https://twitter.com/mudgen)
Expand Down
2 changes: 1 addition & 1 deletion src/diamonds/nayms/facets/ACLFacet.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: MIT
pragma solidity 0.8.17;
pragma solidity 0.8.20;

import { LibAdmin } from "../libs/LibAdmin.sol";
import { LibACL, LibHelpers } from "../libs/LibACL.sol";
Expand Down
2 changes: 1 addition & 1 deletion src/diamonds/nayms/facets/AdminFacet.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: MIT
pragma solidity 0.8.17;
pragma solidity 0.8.20;

import { AppStorage, LibAppStorage } from "../AppStorage.sol";
import { Modifiers } from "../Modifiers.sol";
Expand Down
2 changes: 1 addition & 1 deletion src/diamonds/nayms/facets/EntityFacet.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: MIT
pragma solidity 0.8.17;
pragma solidity 0.8.20;

import { Entity, SimplePolicy, Stakeholders, FeeSchedule } from "../AppStorage.sol";
import { Modifiers } from "../Modifiers.sol";
Expand Down
2 changes: 1 addition & 1 deletion src/diamonds/nayms/facets/GovernanceFacet.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: MIT
pragma solidity 0.8.17;
pragma solidity 0.8.20;

import { LibAdmin } from "../libs/LibAdmin.sol";
import { LibConstants as LC } from "../libs/LibConstants.sol";
Expand Down
2 changes: 1 addition & 1 deletion src/diamonds/nayms/facets/MarketFacet.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: MIT
pragma solidity 0.8.17;
pragma solidity 0.8.20;

import { Modifiers } from "../Modifiers.sol";
import { CalculatedFees, MarketInfo } from "../AppStorage.sol";
Expand Down
2 changes: 1 addition & 1 deletion src/diamonds/nayms/facets/NaymsTokenFacet.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: MIT
pragma solidity 0.8.17;
pragma solidity 0.8.20;

import { INaymsTokenFacet } from "../interfaces/INaymsTokenFacet.sol";
import { LibNaymsToken } from "../libs/LibNaymsToken.sol";
Expand Down
2 changes: 1 addition & 1 deletion src/diamonds/nayms/facets/SimplePolicyFacet.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: MIT
pragma solidity 0.8.17;
pragma solidity 0.8.20;

import { Modifiers } from "../Modifiers.sol";
import { SimplePolicyInfo, SimplePolicy, CalculatedFees } from "../AppStorage.sol";
Expand Down
2 changes: 1 addition & 1 deletion src/diamonds/nayms/facets/SystemFacet.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: MIT
pragma solidity 0.8.17;
pragma solidity 0.8.20;

import { LibConstants as LC } from "../libs/LibConstants.sol";
import { Modifiers } from "../Modifiers.sol";
Expand Down
2 changes: 1 addition & 1 deletion src/diamonds/nayms/facets/TokenizedVaultFacet.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: MIT
pragma solidity 0.8.17;
pragma solidity 0.8.20;

import { Modifiers } from "../Modifiers.sol";
import { LibConstants as LC } from "../libs/LibConstants.sol";
Expand Down
2 changes: 1 addition & 1 deletion src/diamonds/nayms/facets/TokenizedVaultIOFacet.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: MIT
pragma solidity 0.8.17;
pragma solidity 0.8.20;

import { Modifiers } from "../Modifiers.sol";
import { LibTokenizedVaultIO } from "../libs/LibTokenizedVaultIO.sol";
Expand Down
2 changes: 1 addition & 1 deletion src/diamonds/nayms/facets/UserFacet.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: MIT
pragma solidity 0.8.17;
pragma solidity 0.8.20;

import { LibConstants as LC } from "../libs/LibConstants.sol";
import { Modifiers } from "../Modifiers.sol";
Expand Down
2 changes: 1 addition & 1 deletion src/diamonds/nayms/interfaces/CustomErrors.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: MIT
pragma solidity 0.8.17;
pragma solidity 0.8.20;

/// @dev The Nayms Diamond (proxy contract) owner (address) must be mutually exclusive with the system admin role.
error OwnerCannotBeSystemAdmin();
Expand Down
2 changes: 1 addition & 1 deletion src/diamonds/nayms/interfaces/FreeStructs.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: MIT
pragma solidity 0.8.17;
pragma solidity 0.8.20;

struct MarketInfo {
bytes32 creator; // entity ID
Expand Down
2 changes: 1 addition & 1 deletion src/diamonds/nayms/interfaces/IACLFacet.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: MIT
pragma solidity 0.8.17;
pragma solidity 0.8.20;

/**
* @title Access Control List
Expand Down
2 changes: 1 addition & 1 deletion src/diamonds/nayms/interfaces/IAdminFacet.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: MIT
pragma solidity 0.8.17;
pragma solidity 0.8.20;

import { FeeSchedule } from "./FreeStructs.sol";

Expand Down
2 changes: 1 addition & 1 deletion src/diamonds/nayms/interfaces/IEntityFacet.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: MIT
pragma solidity 0.8.17;
pragma solidity 0.8.20;

import { FeeSchedule, SimplePolicy, Entity, Stakeholders } from "./FreeStructs.sol";

Expand Down
2 changes: 1 addition & 1 deletion src/diamonds/nayms/interfaces/IGovernanceFacet.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: MIT
pragma solidity 0.8.17;
pragma solidity 0.8.20;

interface IGovernanceFacet {
/**
Expand Down
2 changes: 1 addition & 1 deletion src/diamonds/nayms/interfaces/IMarketFacet.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: MIT
pragma solidity 0.8.17;
pragma solidity 0.8.20;

import { MarketInfo } from "./FreeStructs.sol";

Expand Down
2 changes: 1 addition & 1 deletion src/diamonds/nayms/interfaces/INaymsTokenFacet.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: MIT
pragma solidity 0.8.17;
pragma solidity 0.8.20;

/**
* @title Nayms token facet.
Expand Down
2 changes: 1 addition & 1 deletion src/diamonds/nayms/interfaces/ISimplePolicyFacet.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: MIT
pragma solidity 0.8.17;
pragma solidity 0.8.20;

import { SimplePolicyInfo, SimplePolicy, CalculatedFees } from "./FreeStructs.sol";

Expand Down
2 changes: 1 addition & 1 deletion src/diamonds/nayms/interfaces/ISystemFacet.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: MIT
pragma solidity 0.8.17;
pragma solidity 0.8.20;

import { Entity } from "./FreeStructs.sol";

Expand Down
2 changes: 1 addition & 1 deletion src/diamonds/nayms/interfaces/ITokenizedVaultFacet.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: MIT
pragma solidity 0.8.17;
pragma solidity 0.8.20;

interface ITokenizedVaultFacet {
/**
Expand Down
2 changes: 1 addition & 1 deletion src/diamonds/nayms/interfaces/ITokenizedVaultIOFacet.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: MIT
pragma solidity 0.8.17;
pragma solidity 0.8.20;

/**
* @title Token Vault IO
Expand Down
2 changes: 1 addition & 1 deletion src/diamonds/nayms/interfaces/IUserFacet.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: MIT
pragma solidity 0.8.17;
pragma solidity 0.8.20;

/**
* @title Users
Expand Down
Loading

0 comments on commit 1d62edb

Please sign in to comment.