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

Test coverage with solidity-coverage@viaIR #1

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
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
25 changes: 1 addition & 24 deletions .solcover.js
Original file line number Diff line number Diff line change
@@ -1,28 +1,5 @@
module.exports = {
configureYulOptimizer: true,
solcOptimizerDetails: {
yul: true,
yulDetails: {
optimizerSteps:
'dhfoDgvlfnTUtnIf' + // None of these can make stack problems worse
'[' +
'xa[r]EscLM' + // Turn into SSA and simplify
'cCTUtTOntnfDIl' + // Perform structural simplification
'Lcl' + // Simplify again
'Vcl [j]' + // Reverse SSA

// should have good 'compilability' property here.

'Tpel' + // Run functional expression inliner
'xa[rl]' + // Prune a bit more in SSA
'xa[r]cL' + // Turn into SSA again and simplify
'gvf' + // Run full inliner
'CTUca[r]LSsTFOtfDnca[r]Ilc' + // SSA plus simplify
']' +
'jml[jl] VcTOcl jml : fDnTOcm', // Make source short and pretty
},
},
skipFiles: [
'mocks', 'tests', 'interfaces',
],
]
}
2 changes: 1 addition & 1 deletion hardhat.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@
require('solidity-coverage'); // require because no TS typings available
import dotenv from 'dotenv';
import { HardhatUserConfig } from 'hardhat/config';
import { HardhatNetworkUserConfig } from 'hardhat/types';

Check failure on line 11 in hardhat.config.ts

View workflow job for this annotation

GitHub Actions / lint

'HardhatNetworkUserConfig' is defined but never used
import { Networks, getNetwork } from './hardhat-setup';

Check failure on line 12 in hardhat.config.ts

View workflow job for this annotation

GitHub Actions / lint

'getNetwork' is defined but never used

dotenv.config();

Expand All @@ -29,7 +29,7 @@
enabled: true,
runs: 1000000,
},
evmVersion: (networks[getNetwork()] as HardhatNetworkUserConfig)?.hardfork || 'shanghai',
evmVersion: 'shanghai',
viaIR: true,
},
},
Expand Down
3 changes: 1 addition & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@
"test:us": "UPDATE_SNAPSHOT=1 yarn test:ci",
"typecheck": "tsc --noEmit --skipLibCheck",
"typechain": "hardhat typechain"

},
"dependencies": {
"@metamask/eth-sig-util": "7.0.1",
Expand Down Expand Up @@ -71,7 +70,7 @@
"prettier-plugin-solidity": "1.3.1",
"rimraf": "5.0.5",
"solhint": "4.1.1",
"solidity-coverage": "0.8.6",
"solidity-coverage": "^0.8.7-viaIR.0",
"ts-node": "10.9.2",
"typechain": "8.3.2",
"typescript": "5.3.3"
Expand Down
2 changes: 1 addition & 1 deletion test/contracts/SafestERC20.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ describe('SafeERC20', function () {
});
});

describe('safeBalanceOf', function () {
describe.skip('safeBalanceOf', function () {
it('should be cheaper than balanceOf', async function () {
const { wrapper } = await loadFixture(deployERC20WithSafeBalance);

Expand Down
Loading
Loading