Skip to content

Commit

Permalink
chore: add gas-report (#18)
Browse files Browse the repository at this point in the history
* chore: add gas-report
  • Loading branch information
3esmit authored Feb 26, 2024
1 parent 2b4f30c commit b711485
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 1 deletion.
18 changes: 18 additions & 0 deletions .gas-report
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
| script/Deploy.s.sol:Deploy contract | | | | | |
|-------------------------------------|-----------------|--------|--------|--------|---------|
| Deployment Cost | Deployment Size | | | | |
| 320782 | 2729 | | | | |
| Function Name | min | avg | median | max | # calls |
| run | 221942 | 221942 | 221942 | 221942 | 1 |


| src/Foo.sol:Foo contract | | | | | |
|--------------------------|-----------------|-----|--------|-----|---------|
| Deployment Cost | Deployment Size | | | | |
| 20275 | 131 | | | | |
| Function Name | min | avg | median | max | # calls |
| id | 235 | 235 | 235 | 235 | 1 |




1 change: 1 addition & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ Ensure you completed **all of the steps** below before submitting your pull requ

- [ ] Added natspec comments?
- [ ] Ran `forge snapshot`?
- [ ] Ran `pnpm gas-report`?
- [ ] Ran `pnpm lint`?
- [ ] Ran `forge test`?
- [ ] Ran `pnpm verify`?
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
"verify": "certoraRun certora/certora.conf",
"lint:sol": "forge fmt --check && pnpm solhint {script,src,test,certora}/**/*.sol",
"prettier:check": "prettier --check **/*.{json,md,yml} --ignore-path=.prettierignore",
"prettier:write": "prettier --write **/*.{json,md,yml} --ignore-path=.prettierignore"
"prettier:write": "prettier --write **/*.{json,md,yml} --ignore-path=.prettierignore",
"gas-report": "forge test --gas-report 2>&1 | (tee /dev/tty | awk '/Test result:/ {found=1; buffer=\"\"; next} found && !/Ran/ {buffer=buffer $0 ORS} /Ran/ {found=0} END {printf \"%s\", buffer}' > .gas-report)"
}
}

0 comments on commit b711485

Please sign in to comment.