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
Install dependencies
Install Foundry dependencies (Forge automatically manages Solidity dependencies):This will install all required libraries specified in the project configuration.
Set up environment variables
Copy the example environment file and configure it:Edit the
.env file with your configuration: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
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