gas_report
Runs tests on a Foundry zkSync project and produces a gas usage report with aggregate gas values for zkSync contracts.
Instructions
Run tests and generate a gas usage report (forge test --zksync --gas-report). Note: zkSync gas values are aggregate-only (no computation/pubdata breakdown).
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"projectPath": "<projectPath>"
},
"name": "gas_report"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| projectPath | Yes | Absolute path to the foundry project directory | |
| profile | No | Foundry profile to use (maps to FOUNDRY_PROFILE env var). Selects a [profile.<name>] section from foundry.toml, e.g. 'zksync', 'ci', 'production'. | |
| filter | No | Regex passed to --match-test to filter which test functions run | |
| contractFilter | No | Regex passed to --match-contract to filter which contracts appear in the report | |
| pathFilter | No | Glob passed to --match-path to filter which test files run |