Installation

Automatic Installation

source <(curl -s https://raw.githubusercontent.com/NodersUA/Scripts/main/starknet)

Manual Installation

# Update the repositories
apt update && apt upgrade -y
# Install Docker
if ! [ -x "$(command -v docker)" ]; then
curl -fsSL https://get.docker.com -o get-docker.sh
sh get-docker.sh
sudo usermod -aG docker $USER
docker --version
else
echo $(docker --version)
fi
# Install Docker Compose
if ! [ -x "$(command -v docker-compose)" ]; then
sudo curl -L "https://github.com/docker/compose/releases/download/v2.2.3/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose 
sudo chmod +x /usr/local/bin/docker-compose 
sudo ln -s /usr/local/bin/docker-compose /usr/bin/docker-compose
docker-compose --version
else
echo $(docker-compose --version)
fi
# Set the variables
STARKNET_RPC=<your_ethereum_mainnet_rpc>
echo 'export STARKNET_RPC='$STARKNET_RPC >> $HOME/.bash_profile
source $HOME/.bash_profile

Get ethereum_mainnet_rpc on one of Alchemy and Infura services

# Create a directory
mkdir -p $HOME/pathfinder
# Start the pathfinder container
sudo docker run \
  --name pathfinder \
  --restart unless-stopped \
  --detach \
  -p 9545:9545 \
  --user "$(id -u):$(id -g)" \
  -e RUST_LOG=info \
  -e PATHFINDER_ETHEREUM_API_URL=$STARKNET_RPC \
  -v $HOME/pathfinder:/usr/share/pathfinder/data \
  eqlabs/pathfinder
# Check logs
sudo docker logs -fn100 pathfinder

Last updated

Was this helpful?