Skip to content

Commit

Permalink
chore: update solc test coverage
Browse files Browse the repository at this point in the history
  • Loading branch information
kiriyaga committed Dec 29, 2023
1 parent c07e3b5 commit 4069b8e
Show file tree
Hide file tree
Showing 24 changed files with 1,299 additions and 186 deletions.
6 changes: 4 additions & 2 deletions packages/hardhat-zksync-solc/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
"fmt": "yarn prettier --write",
"eslint": "eslint 'src/**/*.ts' 'test/**/*.ts'",
"prettier": "prettier 'src/**/*.ts' 'test/**/*.ts'",
"test": "c8 mocha test/tests.ts --no-timeout --exit",
"test": "c8 mocha --recursive \"test/tests/**/*.ts\" --exit",
"build": "tsc --build .",
"clean": "rimraf dist"
},
Expand Down Expand Up @@ -61,7 +61,9 @@
"rimraf": "^3.0.2",
"ts-node": "^10.6.0",
"typescript": "^5.1.6",
"c8": "^8.0.1"
"c8": "^8.0.1",
"sinon": "^16.0.0",
"sinon-chai": "^3.7.0"
},
"peerDependencies": {
"hardhat": "^2.19.2"
Expand Down
Binary file not shown.
Binary file not shown.
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
[ZoneTransfer]
ZoneId=3
ReferrerUrl=https://github.com/ethereum/solidity/releases
HostUrl=https://objects.githubusercontent.com/github-production-release-asset-2e65be/40892817/d8c0c93a-8522-4772-be33-c8cb04a26d5d?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAIWNJYAX4CSVEH53A%2F20231225%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20231225T225829Z&X-Amz-Expires=300&X-Amz-Signature=61e0d8865c9f98cd83643330f76ef3bb17b565f0d77aa45da8f5ca438d673973&X-Amz-SignedHeaders=host&actor_id=131957563&key_id=0&repo_id=40892817&response-content-disposition=attachment%3B%20filename%3Dsolc-macos&response-content-type=application%2Foctet-stream
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
[ZoneTransfer]
ZoneId=3
ReferrerUrl=https://github.com/matter-labs/zksolc-bin/releases
HostUrl=https://objects.githubusercontent.com/github-production-release-asset-2e65be/423900857/a181a32b-51d2-443d-9c35-101bc5898a91?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAIWNJYAX4CSVEH53A%2F20231225%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20231225T225424Z&X-Amz-Expires=300&X-Amz-Signature=b8068888dfde3a94f2627d1617a39d4117cedb8e47c1a93d087df2eb4b9af6f1&X-Amz-SignedHeaders=host&actor_id=131957563&key_id=0&repo_id=423900857&response-content-disposition=attachment%3B%20filename%3Dzksolc-macosx-arm64-v1.3.17&response-content-type=application%2Foctet-stream
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
// SPDX-License-Identifier: MIT

pragma solidity >=0.4.22 <0.9.0;

contract Greeter {

string greeting;
string bad;
constructor(string memory _greeting) {
greeting = _greeting;
bad = "baaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaad";
}

function greet() public view returns (string memory) {
return greeting;
}

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
import '../../../src/index';
import { HardhatUserConfig } from 'hardhat/config';

const config: HardhatUserConfig = {
zksolc: {
compilerSource: 'docker',
settings: {
experimental: {
dockerImage: "matterlabs/zksolc",
tag: "latest"
}
}
},
networks: {
hardhat: {
zksync: true,
}
},
solidity: {
version: '0.8.17'
},
};

export default config;
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
// SPDX-License-Identifier: MIT

pragma solidity >=0.4.22 <0.9.0;

contract Greeter {

string greeting;
string bad;
constructor(string memory _greeting) {
greeting = _greeting;
bad = "baaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaad";
}

function greet() public view returns (string memory) {
return greeting;
}

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
// SPDX-License-Identifier: MIT

pragma solidity >=0.4.22 <0.9.0;

contract Greeter2 {

string greeting;
string bad;
constructor(string memory _greeting) {
greeting = _greeting;
bad = "baaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaad";
}

function greet() public view returns (string memory) {
return greeting;
}

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
import '../../../src/index';
import { HardhatUserConfig } from 'hardhat/config';

const config: HardhatUserConfig = {
zksolc: {
compilerSource: 'binary',
},
networks: {
hardhat: {
zksync: true,
}
},
solidity: {
compilers: [
{
version: '0.8.17'
}
],
overrides: {
"contracts/Greeter2.sol": {
version: '0.8.16'
}
}
}
};

export default config;
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
// SPDX-License-Identifier: MIT

pragma solidity >=0.4.22 <0.9.0;

contract Greeter {

string greeting;
string bad;
constructor(string memory _greeting) {
greeting = _greeting;
bad = "baaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaad";
}

function greet() public view returns (string memory) {
return greeting;
}

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
// SPDX-License-Identifier: MIT

pragma solidity >=0.4.22 <0.9.0;

contract Greeter2 {

string greeting;
string bad;
constructor(string memory _greeting) {
greeting = _greeting;
bad = "baaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaad";
}

function greet() public view returns (string memory) {
return greeting;
}

}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
module.exports = require('../../common.config');
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
// SPDX-License-Identifier: MIT

pragma solidity >=0.4.22 <0.9.0;

contract Greeter {

string greeting;
string bad;
constructor(string memory _greeting) {
greeting = _greeting;
bad = "baaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaad";
}

function greet() public view returns (string memory) {
return greeting;
}

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
import '../../../src/index';
import { HardhatUserConfig } from 'hardhat/config';

const config: HardhatUserConfig = {
zksolc: {
compilerSource: 'binary',
},
networks: {
hardhat: {
zksync: false,
}
},
solidity: {
version: process.env.SOLC_VERSION || '0.8.17'
},
};

export default config;
Loading

0 comments on commit 4069b8e

Please sign in to comment.