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

Upgrade solidity version in tests to 0.8.x #843

Merged
merged 13 commits into from
Feb 2, 2024
Merged
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -54,10 +54,10 @@
"ethereum-waffle": "^3.4.0",
"ethers": "^5.5.3",
"ganache-cli": "6.12.2",
"hardhat": "^2.17.3",
"hardhat": "^2.19.5",
"hardhat-gas-reporter": "^1.0.1",
"nyc": "^14.1.1",
"solc": "^0.7.5"
"solc": "0.8.24"
},
"peerDependencies": {
"hardhat": "^2.11.0"
Expand Down
2 changes: 1 addition & 1 deletion test/sources/generic/assets/SimpleError.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// This contract should throw a parse error in instrumentSolidity.js
pragma solidity ^0.7.0;
pragma solidity >=0.8.0 <0.9.0;

contract SimpleError {
uint x = 0;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
pragma solidity ^0.7.0;
pragma solidity >=0.8.0 <0.9.0;

import "./../B/ContractB2.sol";

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
pragma solidity ^0.7.0;
pragma solidity >=0.8.0 <0.9.0;


contract ContractB {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ module.exports={
}
},
solidity: {
version: "0.7.3"
version: "0.8.17"
},
paths: {
sources: './contracts/A'
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
pragma solidity ^0.7.0;
pragma solidity >=0.8.0 <0.9.0;


contract ContractA {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
pragma solidity ^0.7.0;
pragma solidity >=0.8.0 <0.9.0;


contract ContractB {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
pragma solidity ^0.7.0;
pragma solidity >=0.8.0 <0.9.0;


contract ContractC {
Expand Down
2 changes: 1 addition & 1 deletion test/sources/projects/ganache-solcoverjs/hardhat.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ require(__dirname + "/../plugins/nomiclabs.plugin");

module.exports = {
solidity: {
version: "0.7.3"
version: "0.8.17"
},
networks: {
coverage: {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
pragma solidity ^0.7.0;
pragma solidity >=0.8.0 <0.9.0;


contract ContractA {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ require(__dirname + "/../plugins/nomiclabs.plugin");

module.exports = {
solidity: {
version: "0.7.3"
version: "0.8.17"
},
logger: process.env.SILENT ? { log: () => {} } : console,
};
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
pragma solidity ^0.7.0;
pragma solidity >=0.8.0 <0.9.0;


contract ContractA {
Expand Down
2 changes: 1 addition & 1 deletion test/sources/projects/hardhat-reset/hardhat.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ if (!process.env.ALCHEMY_TOKEN){

module.exports = {
solidity: {
version: "0.7.0"
version: "0.8.17"
},
networks: {
hardhat: {
Expand Down
2 changes: 1 addition & 1 deletion test/sources/projects/import-paths/hardhat.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ require(__dirname + "/../plugins/nomiclabs.plugin");

module.exports = {
solidity: {
version: "0.7.3"
version: "0.8.17"
},
logger: process.env.SILENT ? { log: () => {} } : console,
};
2 changes: 1 addition & 1 deletion test/sources/projects/libraries/contracts/CLibrary.sol
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
pragma solidity ^0.7.0;
pragma solidity >=0.8.0 <0.9.0;

library CLibrary {
uint constant x = 1;
Expand Down
2 changes: 1 addition & 1 deletion test/sources/projects/libraries/contracts/PureView.sol
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
pragma solidity ^0.7.0;
pragma solidity >=0.8.0 <0.9.0;

contract PureView {

Expand Down
2 changes: 1 addition & 1 deletion test/sources/projects/libraries/contracts/UsesPure.sol
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
pragma solidity ^0.7.0;
pragma solidity >=0.8.0 <0.9.0;

import "./_Interface.sol";
import "./PureView.sol";
Expand Down
2 changes: 1 addition & 1 deletion test/sources/projects/libraries/contracts/_Interface.sol
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
pragma solidity ^0.7.0;
pragma solidity >=0.8.0 <0.9.0;

interface _Interface {
function stare(uint a, uint b) external;
Expand Down
2 changes: 1 addition & 1 deletion test/sources/projects/libraries/hardhat.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ require(__dirname + "/../plugins/nomiclabs.plugin");

module.exports = {
solidity: {
version: "0.7.3"
version: "0.8.17"
},
logger: process.env.SILENT ? { log: () => {} } : console,
};
2 changes: 1 addition & 1 deletion test/sources/projects/matrix/contracts/MatrixA.sol
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
pragma solidity ^0.7.0;
pragma solidity >=0.8.0 <0.9.0;


contract MatrixA {
Expand Down
2 changes: 1 addition & 1 deletion test/sources/projects/matrix/contracts/MatrixB.sol
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
pragma solidity ^0.7.0;
pragma solidity >=0.8.0 <0.9.0;


contract MatrixB {
Expand Down
2 changes: 1 addition & 1 deletion test/sources/projects/matrix/hardhat.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ require(__dirname + "/../plugins/nomiclabs.plugin");

module.exports={
solidity: {
version: "0.7.3"
version: "0.8.17"
},
logger: process.env.SILENT ? { log: () => {} } : console,
};
2 changes: 1 addition & 1 deletion test/sources/projects/matrix/truffle-config.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ module.exports = {
mocha: {},
compilers: {
solc: {
version: "0.7.3"
version: "0.8.17"
}
},
logger: process.env.SILENT ? { log: () => {} } : console,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
pragma solidity ^0.7.0;
pragma solidity >=0.8.0 <0.9.0;


contract ContractA {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
pragma solidity ^0.7.0;
pragma solidity >=0.8.0 <0.9.0;


contract ContractB {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
pragma solidity ^0.7.0;
pragma solidity >=0.8.0 <0.9.0;


contract ContractC {
Expand Down
2 changes: 1 addition & 1 deletion test/sources/projects/multiple-suites/hardhat.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ module.exports={
}
},
solidity: {
version: "0.7.3"
version: "0.8.17"
},
logger: process.env.SILENT ? { log: () => {} } : console,
};
2 changes: 1 addition & 1 deletion test/sources/projects/no-sources/hardhat.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ require(__dirname + "/../plugins/nomiclabs.plugin");

module.exports = {
solidity: {
version: "0.7.3"
version: "0.8.17"
},
logger: process.env.SILENT ? { log: () => {} } : console,
};
2 changes: 1 addition & 1 deletion test/sources/projects/parallel/contracts/ContractA.sol
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
pragma solidity ^0.7.0;
pragma solidity >=0.8.0 <0.9.0;


contract ContractA {
Expand Down
2 changes: 1 addition & 1 deletion test/sources/projects/skipping/contracts/ContractA.sol
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
pragma solidity ^0.7.0;
pragma solidity >=0.8.0 <0.9.0;


contract ContractA {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
pragma solidity ^0.7.0;
pragma solidity >=0.8.0 <0.9.0;


contract ContractB {
Expand Down
2 changes: 1 addition & 1 deletion test/sources/projects/skipping/hardhat.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ require(__dirname + "/../plugins/nomiclabs.plugin");

module.exports = {
solidity: {
version: "0.7.3"
version: "0.8.17"
},
logger: process.env.SILENT ? { log: () => {} } : console,
};
1 change: 0 additions & 1 deletion test/sources/projects/solc-8/contracts/Abstract_solc8.sol
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
// SPDX-License-Identifier: MIT
pragma solidity >=0.8.0 <0.9.0;

abstract contract ContractB {
Expand Down
1 change: 0 additions & 1 deletion test/sources/projects/solc-8/contracts/Contract_solc8.sol
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
// SPDX-License-Identifier: MIT
pragma solidity >=0.8.0 <0.9.0;
pragma abicoder v2;

Expand Down
1 change: 0 additions & 1 deletion test/sources/projects/solc-8/contracts/Library_solc8.sol
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
// SPDX-License-Identifier: MIT
pragma solidity >=0.8.0 <0.9.0;

library Library_solc8 {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
pragma solidity ^0.7.0;
pragma solidity >=0.8.0 <0.9.0;


contract Contract_OR {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
pragma solidity ^0.7.0;
pragma solidity >=0.8.0 <0.9.0;


contract Contract_ternary {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ require(__dirname + "/../plugins/nomiclabs.plugin");

module.exports = {
solidity: {
version: "0.7.3"
version: "0.8.17"
},
logger: process.env.SILENT ? { log: () => {} } : console,
};
2 changes: 1 addition & 1 deletion test/sources/projects/test-files/contracts/ContractA.sol
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
pragma solidity ^0.7.0;
pragma solidity >=0.8.0 <0.9.0;


contract ContractA {
Expand Down
2 changes: 1 addition & 1 deletion test/sources/projects/test-files/contracts/ContractB.sol
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
pragma solidity ^0.7.0;
pragma solidity >=0.8.0 <0.9.0;


contract ContractB {
Expand Down
2 changes: 1 addition & 1 deletion test/sources/projects/test-files/contracts/ContractC.sol
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
pragma solidity ^0.7.0;
pragma solidity >=0.8.0 <0.9.0;


contract ContractC {
Expand Down
23 changes: 0 additions & 23 deletions test/sources/projects/test-files/contracts/Migrations.sol

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
pragma solidity ^0.7.0;
pragma solidity >=0.8.0 <0.9.0;


contract OtherContractA {
Expand Down
2 changes: 1 addition & 1 deletion test/sources/projects/test-files/hardhat.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ require(__dirname + "/../plugins/nomiclabs.plugin");

module.exports = {
solidity: {
version: "0.7.3"
version: "0.8.17"
},
logger: process.env.SILENT ? { log: () => {} } : console,
};
2 changes: 1 addition & 1 deletion test/sources/projects/tests-folder/contracts/ContractA.sol
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
pragma solidity ^0.7.0;
pragma solidity >=0.8.0 <0.9.0;


contract ContractA {
Expand Down
2 changes: 1 addition & 1 deletion test/sources/projects/tests-folder/contracts/ContractB.sol
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
pragma solidity ^0.7.0;
pragma solidity >=0.8.0 <0.9.0;


contract ContractB {
Expand Down
2 changes: 1 addition & 1 deletion test/sources/projects/tests-folder/contracts/ContractC.sol
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
pragma solidity ^0.7.0;
pragma solidity >=0.8.0 <0.9.0;


contract ContractC {
Expand Down
2 changes: 1 addition & 1 deletion test/sources/projects/tests-folder/hardhat.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ require(__dirname + "/../plugins/nomiclabs.plugin");

module.exports = {
solidity: {
version: "0.7.3"
version: "0.8.17"
},
logger: process.env.SILENT ? { log: () => {} } : console,
};
2 changes: 1 addition & 1 deletion test/sources/solidity/contracts/app/Empty.sol
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
pragma solidity ^0.7.0;
pragma solidity >=0.8.0 <0.9.0;

contract Empty {
}
2 changes: 1 addition & 1 deletion test/sources/solidity/contracts/app/Events.sol
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
pragma solidity ^0.7.0;
pragma solidity >=0.8.0 <0.9.0;

contract Events {
uint x = 0;
Expand Down
2 changes: 1 addition & 1 deletion test/sources/solidity/contracts/app/Expensive.sol
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// Block gas limit is: 0x47e7c4
// Should throw out of gas on unmodified truffle
// Should pass solcover truffle
pragma solidity ^0.7.0;
pragma solidity >=0.8.0 <0.9.0;

contract Expensive {
mapping (uint => address) map;
Expand Down
2 changes: 1 addition & 1 deletion test/sources/solidity/contracts/app/Migrations.sol
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
pragma solidity ^0.7.0;
pragma solidity >=0.8.0 <0.9.0;

contract Migrations {
address public owner;
Expand Down
2 changes: 1 addition & 1 deletion test/sources/solidity/contracts/app/Modified.sol
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
pragma solidity ^0.7.0;
pragma solidity >=0.8.0 <0.9.0;

contract Modified {
uint counter;
Expand Down
2 changes: 1 addition & 1 deletion test/sources/solidity/contracts/app/OnlyCall.sol
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* This contract contains a single function that is accessed using method.call
* With an unpatched testrpc it should not generate any events.
*/
pragma solidity ^0.7.0;
pragma solidity >=0.8.0 <0.9.0;

contract OnlyCall {
function addTwo(uint val) public pure returns (uint){
Expand Down
Loading