Skip to content

Commit

Permalink
docs: revert strings config (#330)
Browse files Browse the repository at this point in the history
* Update forge-build.md

* Update compiler-options.md

* Update src/reference/forge/compiler-options.md

Co-authored-by: 0xvv <public_double_v@protonmail.com>

* Update src/reference/forge/forge-build.md

Co-authored-by: 0xvv <public_double_v@protonmail.com>

* chore: nits

Co-authored-by: 0xvv <public_double_v@protonmail.com>
Co-authored-by: Bjerg <onbjerg@users.noreply.github.com>
  • Loading branch information
3 people authored May 30, 2022
1 parent d4b89fa commit 0415613
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/reference/forge/compiler-options.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@
`--via-ir`
&nbsp;&nbsp;&nbsp;&nbsp;Use the Yul intermediate representation compilation pipeline.

`--revert-strings
&nbsp;&nbsp;&nbsp;&nbsp;How to treat revert and require reason strings.

`--use` *solc_version*
&nbsp;&nbsp;&nbsp;&nbsp;Specify the solc version, or a path to a local solc, to build with.

Expand Down
8 changes: 8 additions & 0 deletions src/reference/forge/forge-build.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit 0415613

Please sign in to comment.