This repository contains the Router Contracts for the Zup Protocol.
Router Contracts are all contracts used to deposit into liquidity pools from other DEXes.
-
Foundry
- To know if Foundry is installed, run
forge --versionyou should see a response likeforge x.x.x. - If Foundry is not installed, head over to Foundry Installation
- To know if Foundry is installed, run
-
Slither
- To know if Slither is installed, run
slither --versionyou should see a response likex.x.x. - If Slither is not installed, head over to How to install slither
- To know if Slither is installed, run
-
Node.js
- To know if Node.js is installed, run
node --versionyou should see a response likevX.X.X. - If Node.js is not installed, head over to How to install Node.js
- To know if Node.js is installed, run
-
Yarn
- To know if Yarn is installed, run
yarn --versionyou should see a response likeyarn x.x.x. - If Yarn is not installed, head over to Yarn installation
- To know if Yarn is installed, run
- Clone the repository
- Run
yarn && forge installto install all the packages used by the project - Nothing more! All done ⚡️
To run all the tests, just open your terminal and type:
yarn testit will run the unit, fuzz and fork tests.
It’s not recommended to run it every time you want to test something specific, as it will also run the fork tests, which take a lot of time and needs internet. Instead you can just run the tests you want to test using forge test --mt {TEST_NAME}. If you want to run a specific group of tests, you can use the commands below:
To run only the unit tests:
yarn testunitTo run only the Fuzz tests:
yarn testfuzzTo run only the Fork tests (needs internet connection):
yarn testforkTo run the slither static analysis, just open your terminal and type:
yarn analyze-
Every commit should follow the Conventional Commits format (
<type>[optional scope]: <description>). In other case, the commit will be rejected -
Commits to the main branch are not allowed by default. Pull requests should be opened and then merged into the main branch