Prerequisites
Before you begin, ensure you have the following installed:Foundry
The Flash-Loan Router is built with Foundry, a blazing fast Ethereum development toolkit. Install Foundry using:Foundry requires a working Rust installation. If you encounter issues, visit Foundry’s installation guide.
Git
Ensure Git is installed for cloning the repository:Installation Steps
1
Clone the repository
Clone the Flash-Loan Router repository from GitHub:
2
Install dependencies
Install Foundry dependencies (Forge automatically manages Solidity dependencies):This will install all required libraries specified in the project configuration.
3
Set up environment variables
Copy the example environment file and configure it:Edit the
.env file with your configuration:4
Build the project
Compile all smart contracts:This compiles all Solidity contracts using the settings defined in
foundry.toml:- Solidity version: 0.8.28
- EVM version: Cancun
- Optimizer runs: 1,000,000
5
Verify installation
Run the test suite to ensure everything is set up correctly:To exclude tests requiring an internet connection:If all tests pass, your installation is complete!
Compiler Configuration
The project uses the following Foundry configuration (foundry.toml):
The high optimizer run count (1,000,000) is configured for gas-efficient production deployment, prioritizing execution cost over deployment cost.
Next Steps
Now that you have the Flash-Loan Router installed, you can:- Follow the Quickstart Guide to build and test the contracts
- Learn about deployment to deploy contracts to a network
- Explore the Architecture to understand the design