Welcome to Part 3 of the Echidna streaming series. This part has two sections:
- Uni-V2: This directory contains the logic of the Uniswap V2 Codebase. In the workshop we mainly examined the pair contracts, however feel free to investigate the router (part 4 will cover it more in detail).
- Crytic: This directory shows how to use Echidna on the Uniswap V2 Core contracts. You can use the setup as a template, try making your own tests!
The slides for this part can be found here.
The video presentation for this part can be found on YouTube. For the updates to testSwap()
, please look at the Youtube link in part4.
Because Uniswap V2 is a Hardhat project, before being able to fuzz it with Echidna, you have to install its dependencies.
Run the following commands:
git clone git@github.com:crytic/echidna-streaming-series
cd part3
npm install
echidna-test . --contract EchidnaTest --config contracts/crytic/config.yaml