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:
# Install nvm (Node Version Manager)curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.5/install.sh | bash# Install and use Node.js v18.20.3nvm install v18.20.3nvm use v18.20.3
Verify the installation:
node --version# Should output: v18.20.3
2
Install Package Manager
Install Yarn package manager:
npm install -g yarn@1.22.19
Verify the installation:
yarn --version# Should output: 1.22.19
3
Install Development Tools
Install Foundry for smart contract development (recommended):
# Run all testsyarn test# Run Foundry testsforge test# Run with coverageyarn coverage# Run specific test fileforge test --match-contract IntentSourceTest# Run with detailed outputforge test -vvv# Run specific test functionforge test --match-test testPublishAndFund
For local testing and development, you can deploy contracts to a local chain.
# Start local development chain (in a separate terminal)anvil# Deploy contracts locallyforge script script/Deploy.s.sol --broadcast --rpc-url localhost# Run tests against deployed contractsforge test --rpc-url localhost