Skip to content

Commit 67bfdc5

Browse files
committed
docs(readme): add some unsorted tips
1 parent 9c79e66 commit 67bfdc5

File tree

1 file changed

+22
-0
lines changed

1 file changed

+22
-0
lines changed

README.md

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,28 @@ Run to view commands:
1818
pnpm run
1919
```
2020

21+
## Some unsorted notes
22+
23+
### Commands
24+
25+
- `pnpm testh:vvv test/SomeContract.ts` and `pnpm testf -vvv --mc SomeContractTests` show details about events, calls, gas costs, etc.
26+
- `pnpm coverage:fs` show the coverage summary with branches for Foundry.
27+
28+
### Environment variables
29+
30+
The project can properly work without the \`.env\` file, but supports some variables (see `.env.details` for details). For example:
31+
32+
- `BAIL=true` to stop tests on the first failure.
33+
- `EVM_VERSION="default"` and `HARDFORK="default"` if you would not like to use Prague, but make Hardhat behave by default.
34+
- `VIA_IR=false` to disable IR optimization. You may need to also disable it in `.solcover.js` if compilation issues when running coverage.
35+
- `COINMARKETCAP_API_KEY` and `ETHERSCAN_API_KEY` if you would like to see gas costs in dollars when running `pnpm testh:gas`.
36+
37+
### VS Code
38+
39+
- The `Watch` button can show/hide highlighting of the code coverage in the contract files after running `pnpm coverage`. The button is in the lower left corner of the VS Code window and added by `ryanluker.vscode-coverage-gutters`.
40+
41+
- Open the context menu (right-click) in a contract file, after running `pnpm coverage`, and select "Coverage Gutters: Preview Coverage Report" (or press Ctrl+Shift+6) to open the coverage HTML page directly in VS Code.
42+
2143
## Troubleshooting
2244

2345
Run to clean up the project:

0 commit comments

Comments
 (0)