Install the following dependencies:
cd frontend
npm install
cd ..
cd backend
pip install -r requirements.txt
If you want to do a clean deployment of the database run:
python backend/create_db.py
Ensure first that the url is correct in your .env file
# Run flask app on port 5000
cd frontend
npm run build
cd ..
cd backend
flask run
Run the following commands in two separate terminals:
# Run react app on port 3000
cd frontend
npm start
# Run flask app on port 5000
cd backend
flask run
Execute these commands from inside the frontend/
folder:
Starts the blockchain nodes (8546 for public one, 8545 for private one). It always resets the chains.
Deploys the contracts located in contracts/
on the private chain. The script needs to get updated when creating new contracts.
Runs the rollup script in the background (& for Linux). It will shut down automatically when the connection to the private chain ends. Rollups are logged in the scripts/rollup_logs.log
file.
git clone https://github.com/blockscout/blockscout.git
cd blockscout/docker-compose
docker-compose up --build
docker-compose -f hardhat-network.yml up -d
The explorer will be available on http://localhost.