--output-mode files
option. One use case for this mode is to run the user test suite on the instrumented code. For example lets assume we have these 2 files:Foo.instrumented.sol
and __scribble_ReentrancyUtils.sol
.Foo.instrumented.sol
is the instrumented counterpart ofFoo.sol
, and __scribble_ReentrancyUtils.sol
contains a helper contract. Now a user can manually swap Foo.instrumented.sol
with Foo.sol,
re-build their contracts and run tests on the instrumented contracts, and later swap the originals back. However these steps are tedious, which is why scribble
automates them with the --arm
and --disarm
options. We can add the --arm
option when instrumenting like so:Foo.sol
- Foo.instrumented.sol
Foo.sol
as Foo.original.sol
Foo.sol
with Foo.instrumented.sol
md.json
that is used to keep track of what files were modifies for disarming.--disarm
instead of --arm
:--instrumentation-metadata-file
option. Scribble will automatically detect the project root (the nearest parent folder with a package.json) and place the instrumentation metadata file there). If a project root is not detected, scribble will throw an error asking you to specify --instrumentation-metadata-file
explicitly.