For an overview of the mechanics and implemented mathematics in TenderSwap, check following sources:
This is a list of the most frequently needed commands.
Build the contracts:
forge buildDelete the build artifacts and cache directories:
forge cleanCompile the contracts:
forge buildGet a test coverage report:
forge coverageDeployments and upgrades can through the SwapFactory contract for indexing purposes on the Tenderize Subgraph.
TenderSwap can also be deployed standlone following the same pattern as the SwapFactory contract.
Factory::deploy requires an implementation address. Each pool will have its own implementation contract where
constants or immutables can be specified for each pool. While this adds operational overhead and complexity for
potential upgrades, it significantly improves the gas cost of functions that use these parameters.
Format the contracts:
forge fmtor
yarn lint:solFormat other files:
yarn prettier:writeGet a gas report:
forge test --gas-reportLint the contracts:
pnpm lintRun the tests:
forge test- Foundry uses git submodules to manage dependencies. For detailed instructions on working with dependencies, please refer to the guide in the book
- You don't have to create a
.envfile, but filling in the environment variables may be useful when debugging and testing against a fork.
- abigger87/femplate
- cleanunicorn/ethereum-smartcontract-template
- foundry-rs/forge-template
- FrankieIsLost/forge-template
This project is licensed under MIT.