argotorg / argotorg/solidity

Switch gas report parsing from RST to native JSON output

Open
#16,373 0 comments 0 reactions 0 assignees View on GitHub
easy difficulty low effort low impact testing :hammer:
Dominant language
C++
Stars
25.7k
Forks
6.2k
Avg merge
2d 19h
Merged PRs (30d)
29

Description

Currently, our external tests use `hardhat-gas-reporter` with RST table output, which we then parse with [parse_eth_gas_report.py](https://github.com/ethereum/solidity/blob/v0.8.33/scripts/externalTests/parse_eth_gas_report.py) to convert to JSON. This approach is fragile:

1. RST parsing requires complex regex patterns and is an unnecessary intermediate step done when `hardhat-gas-reporter` didn't support JSON output
2. Recent updates to `hardhat-gas-reporter` v2 already required adjustments to handle number formatting changes

Since `hardhat-gas-reporter` v2, native JSON output is supported via the `outputJSON` option. We should switch to it.

Contributor guide

Open the contributing guide

Research direction

Start with scripts/externalTests/parse_eth_gas_report.py, then trace the external-test setup that invokes hardhat-gas-reporter and consumes its output. Run the affected external tests to establish the current behavior. Done means the tests use native JSON output, no longer depend on RST parsing, and still produce the expected gas data.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, python
Domain
testing, tooling
Issue type
Refactor
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.