Prerequisites
Before you begin working with Eco Routes Protocol, ensure you have the required tools installed.1
Install Node.js
Install Node Version Manager (nvm) and Node.js v18.20.3:Verify the installation:
2
Install Package Manager
Install Yarn package manager:Verify the installation:
3
Install Development Tools
Install Foundry for smart contract development (recommended):Alternatively, you can use Hardhat:
Foundry is recommended for the best development experience with Eco Routes, but Hardhat is also fully supported.
Project Setup
Once you have the prerequisites installed, set up the Eco Routes Protocol project.1
Clone the Repository
Clone the Eco Routes repository and navigate to the project directory:
2
Install Dependencies
Install all project dependencies using Yarn:This will install all required packages including OpenZeppelin contracts, Hyperlane libraries, and testing frameworks.
3
Build the Project
Compile all smart contracts:A successful build indicates your environment is properly configured.
4
Run Tests
Verify everything is working by running the test suite:All tests should pass, confirming your setup is complete.
Environment Configuration
For deployment and testing on live networks, configure your environment variables.1
Create .env File
Copy the example environment file:
2
Configure RPC Endpoints
Add your RPC endpoints to the
.env file:.env
3
Add Private Keys
Add your deployer private key for contract deployment:
.env
4
Add API Keys for Verification
Add Etherscan API keys for contract verification:
.env
Development Commands
Common commands for working with Eco Routes Protocol.Building
Testing
Code Quality
Local Development
For local testing and development, you can deploy contracts to a local chain.Next Steps
Creating Intents
Learn how to create and publish cross-chain intents
Fulfilling Intents
Become a solver and fulfill intents for rewards
ERC-7683 Integration
Use the standard ERC-7683 interface
Proving Intents
Understand cross-chain proof validation