Installation & Setup
This guide covers setting up the development environment to work with the EVM CCTP Contracts.Prerequisites
Before installing, ensure you have the following tools:- Git (for submodule management)
- Node.js and Yarn
- Foundry (recommended version: 0.2.0)
- Solidity compiler (version 0.7.6)
Quick Installation
Clone and Initialize Submodules
First, initialize and download all required libraries:This downloads dependencies like OpenZeppelin contracts and other libraries used by CCTP.
Install Foundry
Install Foundry CLI from the official website.For Linux and macOS:
To install a specific version of Foundry, see the versioning guide.
VSCode IDE Setup
For the best development experience in Visual Studio Code:Install Solidity Extension
Install the Solidity extension from the VSCode marketplace.
Configure Compiler Version
- Navigate to any
.solfile in the project - Right-click and select Solidity: Change global compiler version (Remote)
- Select version 0.7.6
The CCTP contracts are compiled with Solidity 0.7.6. Using a different version may cause compilation errors.
Install Solhint Extension
Verify Installation
Test that everything is set up correctly:Run Unit Tests
Log verbosity is controlled by the
-v flag. Use -vvvvv for maximum verbosity. Learn more in the Foundry documentation.Run Integration Tests
Alternative Installation: Docker + Foundry
If you prefer using Docker for a containerized environment:Development Tools
Testing
Linting
.sol files in the src and test directories.
Static Analysis
Run Mythril security analysis on specific contracts:Static analysis can take several minutes to complete.
Continuous Integration
The repository uses GitHub Actions for automated testing and linting. The workflow configuration is located in.github/workflows/ci.yml.
Security Scanning
Manually trigger Olympix.ai security scanning:- Navigate to the Actions tab on GitHub
- Select Olympix Scan from the left sidebar
- Choose the branch and click Run workflow
Troubleshooting
Submodule errors
Submodule errors
If you encounter missing dependencies, re-run:
Compiler version mismatch
Compiler version mismatch
Ensure you’re using Solidity 0.7.6. Check your VSCode settings or run:
Docker build failures on M1 Macs
Docker build failures on M1 Macs
This is a known issue with Foundry’s Docker image. Consider using Foundry directly via
foundryup instead of Docker.Test failures
Test failures
Ensure all dependencies are installed:
Next Steps
Quickstart
Execute your first cross-chain USDC transfer
Deployment Guide
Learn how to deploy CCTP contracts to your chain