diff --git a/src/reference/forge/compiler-options.md b/src/reference/forge/compiler-options.md index bca998c3a..8bce08333 100644 --- a/src/reference/forge/compiler-options.md +++ b/src/reference/forge/compiler-options.md @@ -9,6 +9,9 @@ `--via-ir`     Use the Yul intermediate representation compilation pipeline. +`--revert-strings +    How to treat revert and require reason strings. + `--use` *solc_version*     Specify the solc version, or a path to a local solc, to build with. diff --git a/src/reference/forge/forge-build.md b/src/reference/forge/forge-build.md index e76b3631b..59198c930 100644 --- a/src/reference/forge/forge-build.md +++ b/src/reference/forge/forge-build.md @@ -87,6 +87,14 @@ optimizerSteps = 'dhfoDgvulfnTUtnIf' See the [compiler input description documentation](https://docs.soliditylang.org/en/latest/using-the-compiler.html#compiler-input-and-output-json-description) for more information on available settings (specifically `settings.optimizer.details`). +#### Revert Strings + +You can control how revert strings are generated by the compiler. By default, only user supplied revert strings are included in the bytecode, but there are other options: + +- `strip`: Removes all revert strings (if possible, i.e. if literals are used) keeping side-effects. +- `debug`: Injects strings for compiler-generated internal reverts, implemented for ABI encoders V1 and V2 for now. +- `verboseDebug`: Appends further information to user-supplied revert strings (not yet implemented). + #### Additional Model Checker settings [Solidity's built-in model checker](https://docs.soliditylang.org/en/latest/smtchecker.html#tutorial) is an opt-in module that can be enabled via the `ModelChecker` object.