Quickstart
This guide will help you set up your development environment and create your first cross-chain intent with Eco Routes.Prerequisites
Before you begin, ensure you have the following installed:1
Install Node.js
Install Node Version Manager (nvm) and Node.js v18.20.3:
2
Install Yarn
Install Yarn package manager:
3
Install Foundry
Install Foundry for smart contract development:
Hardhat is also supported as an alternative to Foundry.
Installation
There are two ways to use Eco Routes: from source or as an npm package.- From Source (Recommended)
- As NPM Package
1
Clone the repository
2
Install dependencies
3
Build the project
Create your first intent
Let’s create a simple cross-chain intent that transfers tokens from one chain to another.Understanding the intent structure
An intent consists of three main components:- Destination: The target chain ID where the intent will be executed
- Route: The execution instructions (calls to make, tokens needed, deadline)
- Reward: The incentives for solvers (reward tokens, deadline, prover address)
Example: Token transfer intent
Here’s how to create and fund an intent:Checking intent status
You can check if an intent is funded:Fulfilling an intent (Solver perspective)
Solvers execute intents on the destination chain:The
claimant is a bytes32 representation of the address that will claim rewards. This format enables cross-VM compatibility.Proving and withdrawing rewards
After fulfillment, the intent must be proven on the source chain:Testing your integration
Run the test suite to verify your setup:Next steps
Architecture
Learn how the Portal, Inbox, and Provers work together
Core concepts
Understand intents, vaults, and the protocol lifecycle