Skip to content

feat(snapshots): track internal gas usage #3766

@PaulRBerg

Description

@PaulRBerg

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.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

Status

Completed

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions