Skip to main content

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.

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:
  1. Destination: The target chain ID where the intent will be executed
  2. Route: The execution instructions (calls to make, tokens needed, deadline)
  3. 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:
Get the vault address for an intent:
Check the reward status:

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
Always test your intents on testnet before deploying to mainnet. Ensure you understand the security implications of the calls you’re making.