foundry-rs / foundry-rs/foundry

feature: l2 gas estimations

Open
#11,237 1 comment 0 reactions 0 assignees View on GitHub
T-feature T-to-discuss
Dominant language
Rust
Stars
10.6k
Forks
2.6k
Avg merge
16h 38m
Merged PRs (30d)
511

Description

### Component

Other (please describe), Forge

### Describe the feature you would like

in foundry today we have gas estimates, but only the l1 gas used. would love to be able to also see l2 gas/calldata costs to be able to more accurately make decisions between using calldata vs state

Ideal workflow would be something like ‘forge X —function FN_SEL --chain X` and it outputs a usd value, maybe also a breakdown of calldata cost vs gas cost on L2s

### Additional context

Alchemy has a benchmarks repo but done in hardhat, would be nice to be able to use foundry for such flows https://github.com/alchemyplatform/aa-benchmarks/

Contributor guide

Open the contributing guide

Research direction

Start by reviewing Forge's existing gas-estimation workflow and the linked Alchemy aa-benchmarks repository, which uses Hardhat. Define how the proposed `forge X --function FN_SEL --chain X` flow would obtain L2 gas and calldata costs, and consider the requested USD output and cost breakdown as the completion criteria.

Written by the indexing model from the issue text.

Assessment

Tech stack
blockchain, rust
Domain
blockchain, cli, tooling
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.