gas_calculations
in the root folder of the directory (same level as the src
folder) and ensure that you have the right permissions settings set in your foundry.toml
file:
instance.log4337Gas("identifier")
before a UserOperation
is executed. This will log the gas used for the UserOperation
and use the identifier as the filename for the gas report. Make sure to use a unique identifier for each UserOp, otherwise the gas reports will be overwritten. For example:
gas_calculations
folder in the root of the project. A gas report will look like this:
(diff: ...)
that shows the difference, in gas units between the calculations.
totalGasUsed * gasPrice
totalGasUsed * l2GasPrice + callDataGasUsed * l1GasPrice