Skip to content

Commit

Permalink
Merge pull request #324 from crytic/fix-delegatecall-coverage
Browse files Browse the repository at this point in the history
Removed note about delegatecall lack of coverage
  • Loading branch information
montyly authored Aug 17, 2023
2 parents 0755d3a + 752aefa commit cdeb5aa
Showing 1 changed file with 0 additions and 13 deletions.
13 changes: 0 additions & 13 deletions program-analysis/echidna/advanced/working-with-libraries.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,19 +60,6 @@ We can use the coverage report to verify that function using the library (`getBa
30 | | }
```

However, the code of the library itself will not have their coverage displayed correctly:

```
6 | | library ConvertLib{
7 | | function convert(uint amount, uint conversionRate) public pure returns (uint convertedAmount)
8 | | {
9 | | return amount * conversionRate;
10 | | }
11 | | }
```

This is caused by the usage of `delegatecall` to execute contract code and [unfortunately we do not have a workaround for it right now](https://github.com/crytic/echidna/issues/1042).

## Summary

Working with libraries in Echidna is supported. It involves to deploy the library to a particular address using `deployContracts` and then asking `crytic-compile` to link the bytecode with the same address using `--compile-libraries` command line.

0 comments on commit cdeb5aa

Please sign in to comment.