currency | string | USD | National currency to represent gas costs in. Exchange rates are loaded at runtime from the coinmarketcap api. Available currency codes can be found here |
coinmarketcap | string | - | API key to use when fetching live token price data |
enabled | bool | true | Produce gas reports with hardhat test |
excludeAutoGeneratedGetters | bool | false | Exclude solc generated public state vars when reporting gas for pure and view methods. (Incurs a performance penalty on test startup when true ) ⚠️ SLOW ⚠️ |
excludeContracts | string[] | [] | Names of contracts to exclude from report. Ex: ["MyContract"] |
includeIntrinsicGas | bool | true | Include standard 21_000 + calldata bytes overhead in method gas usage data. (Setting to false can be useful for modelling contract infra that will never be called by an EOA) |
L1 | string | ethereum | Auto-configure reporter to emulate an L1 network. (See supported networks) |
L2 | string | - | Auto-configure reporter to emulate an L2 network (See supported networks) |
L1Etherscan | string | - | API key to use when fetching live gasPrice and baseFee data from an L1 network. (Optional, see Supported Networks) |
L2Etherscan | string | - | API key to use when fetching live gasPrice and blobBaseFee data from an L2 network (Optional, see Supported Networks) |
offline | bool | false | Turn off remote calls to fetch data |
optimismHardfork | string | ecotone | Optimism hardfork to emulate L1 & L2 gas costs for. |
proxyResolver | Class | - | User-defined class which helps reporter identify contract targets of proxied calls. (See Advanced Usage) |
remoteContracts | Array | - | List of forked-network deployed contracts to track execution costs for.(See Advanced Usage) |
reportPureAndViewMethods | bool | false | Track gas usage for methods invoked via eth_call . (Incurs a performance penalty that can be significant for large test suites) |
trackGasDeltas | bool | false | Track and report changes in gas usage between test runs. (Useful for gas golfing) |
:high_brightness: DISPLAY | | | |
currencyDisplayPrecision | number | 2 | Decimal precision to show nation state currency costs in |
darkMode | bool | false | Use colors better for dark backgrounds when printing to stdout |
forceTerminalOutput | bool | false | Write to terminal even when saving output to file |
forceTerminalOutputFormat | string | - | Table format to output forced terminal output in ("legacy" / "terminal" / "markdown") |
noColors | bool | false | Omit terminal color in output |
reportFormat | string | terminal | Report formats ("legacy" / "terminal" / "markdown") |
showMethodSig | bool | false | Display the complete function signature of methods. (Useful if you have overloaded methods) |
showUncalledMethods | bool | false | List all methods and deployments, even if no transactions were recorded for them |
suppressTerminalOutput | bool | false | Skip writing the table to stdout. (Useful if you only want to write JSON to file) |
:floppy_disk: OUTPUT | | | |
includeBytecodeInJSON | bool | false | Include bytecode and deployedBytecode blobs in JSON output |
outputFile | string | - | Relative path to a file to output text table to (instead of stdout) |
outputJSONFile | string | - | Relative path to a file to output gas data in JSON format to. (See Advanced Usage) |
outputJSON | bool | false | Write options, methods, deployment data in JSON format to file. (See Advanced Usage) |
rst | bool | false | Output with a reStructured text code-block directive. (Useful if you want to include report in ReadTheDocs or Sphinx docs) |
rstTitle | string | - | Title for reStructured text header |
:mag: LOW-LEVEL CONFIG | | | |
gasPrice | number | - | Gwei price per gas unit (Ex: 25 ). By default, this is fetched from live network when coinmarketcap option is defined |
baseFee | number | - | Gwei base fee per gas unit used to calculate L1 calldata costs for L2 transactions (Ex: 25 ). By default, this is fetched from live network when L2 & coinmarketcap options are defined |
baseFeePerByte | number | - | Gwei fee per byte used to calculate L1 calldata costs for Arbitrum transactions (Ex: 25 ). See arbitrum gas estimation docs for details. By default, this is fetched from live network when L2 is set to 'arbitrum' & coinmarketcap options are defined |
blobBaseFee | number | - | Gwei blob base fee per gas unit used to calculate post-EIP-7516 L1 calldata costs for L2 transactions (Ex: 25 ). By default, this is fetched from live network when L2 & coinmarketcap options are defined |
blobBaseFeeApi | string | - | URL to fetch live execution network blob base fee from. (By default, this is auto-configured based on the L1 or L2 setting) |
gasPriceApi | string | - | URL to fetch live execution network gas price from. (By default, this is auto-configured based on the L1 or L2 setting) |
getBlockApi | string | - | URL to fetch L1 block header from when simulating L2. (By default, this is auto-configured based on the L2 setting) |
opStackBaseFeeScalar | number | - | Scalar applied to L1 base fee when calculating L1 data cost (see Advanced Usage) |
opStackBlobBaseFeeScalar | number | - | Scalar applied to L1 blob base fee when calculating L1 data cost (see Advanced Usage) |
token | string | - | Network token gas fees are denominated in (ex:"ETH"). (By default, this is auto-configured based on the L1 or L2 setting) |
tokenPrice | string | - | Network token price per nation state currency unit. (To denominate costs in network token set this to "1" ) |