gas-report output to console + save filter output

This commit is contained in:
Ricardo Guilherme Schmidt
2023-09-19 10:23:14 -03:00
parent 6bf228162d
commit aa8cee3b8f

View File

@@ -21,7 +21,7 @@
],
"private": true,
"scripts": {
"gas-report": "forge test --gas-report | awk '/Test result:/ {found=1; buffer=\"\"; next} found && !/Ran/ {buffer=buffer $0 ORS} /Ran/ {found=0} END {printf \"%s\", buffer}' > .gas-report",
"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)",
"clean": "rm -rf cache out",
"lint": "pnpm lint:sol && pnpm prettier:check",
"lint:sol": "forge fmt --check && pnpm solhint {script,src,test}/**/*.sol",