foundry icon indicating copy to clipboard operation
foundry copied to clipboard

feat(`snapshots`): track internal gas usage

Open PaulRBerg opened this issue 2 years ago • 4 comments

Component

Forge

Describe the feature you would like

I would like to have gas reports for free functions, e.g.

function min(uint x, uint y) pure returns (uint) {
    return x < y ? x : y;
}

Passing --gas-report to Forge doesn't generate a report. The only solution as of now is to wrap my free functions in an intermediary mock contract used specifically for testing.

PaulRBerg avatar Nov 25 '22 14:11 PaulRBerg