A method of computing gas cost in USD for foundry users. Convert estimated function gas usage to 'USD'.
- Foundry Init
- Import Gastimate.sol into .sol
- Run startMeasuringGas("label") and stopMeasuringGas() before and after respective function calls to return gas cost in USD. The USD value is returned scaled by 1e2. A return value of 12 = $0.12, a return value of 4326 = $43.26. Currently gas estimates are off a bit compared to foundry's gas-report.
- Testing using mainnet fork. See makefile 'test-fork'
- Correct delta between price output compared to gas-report output