From 0244cae919a21f34f8a47360ebdcf66ce72ba1a7 Mon Sep 17 00:00:00 2001 From: Kevin Ingersoll Date: Mon, 19 Jun 2023 12:50:22 +0100 Subject: [PATCH] update comment --- packages/cli/src/commands/gas-report.ts | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/packages/cli/src/commands/gas-report.ts b/packages/cli/src/commands/gas-report.ts index 737b546a0c..0631c3e1d4 100644 --- a/packages/cli/src/commands/gas-report.ts +++ b/packages/cli/src/commands/gas-report.ts @@ -7,18 +7,21 @@ import stripAnsi from "strip-ansi"; /** * Print the gas report to the console, save it to a file and compare it to a previous gas report if provided. - * Requires forge to be installed, and gas test files including `// !gasreport` comments, like this: + * + * Requires foundry to be installed. Inherit from GasReporter and use startGasReport/endGasReport to measure gas used. * * ```solidity - * contract GasTest is DSTestPlus { + * contract MyContractTest is Test, GasReporter { * function testBuffer() public pure { - * // !gasreport allocate a buffer + * startGasReport("allocate a buffer"); * Buffer buffer = Buffer_.allocate(32); + * endGasReport(); * * bytes32 value = keccak256("some data"); * - * // !gasreport append 32 bytes to a buffer + * startGasReport("append 32 bytes to a buffer"); * buffer.append(value); + * endGasReport(); * } * } * ```