Skip to content

Installation

dev-mondoshawan edited this page May 6, 2026 · 2 revisions

Installation

Complete guide to installing and configuring ScarpShield on your local machine.

PyPI version


Prerequisites

Before you begin, ensure you have the following installed:

Requirement Version Notes
Python 3.11+ Required for async features and type hints
pip Latest Usually bundled with Python
git Latest For cloning the repository

Verify your Python version:

python --version

Step 1: Install from PyPI (Recommended)

The fastest way to get ScarpShield is via pip:

pip install scarpshield

After installation, the scarpshield CLI is available globally:

scarpshield --version

What Gets Installed

Package Version Purpose
web3 >= 6.0.0 Ethereum RPC interaction and event decoding
typer >= 0.9.0 Rich CLI interface with commands and options
flask >= 3.0.0 Web dashboard server

Alternative: Development Install

If you want to run from source or contribute:

git clone https://github.com/RunTimeAdmin/ScarpShield.git
cd ScarpShield
pip install -r requirements.txt

Step 3: Initialize Configuration

Option A: Use the CLI Init Command

The recommended way to generate a fresh configuration file:

scarpshield init

This creates a config.json in the project root with sensible defaults:

  • Pre-configured RPC endpoints for Ethereum, Polygon, BSC, Arbitrum, and Base
  • Console alerts enabled by default
  • Email, Discord, Slack, and Telegram alerts disabled by default
  • 15-second polling interval

Option B: Copy the Example Config

If you prefer to edit the config manually:

cp config.example.json config.json

Then open config.json in your editor and customize the values.


Step 4: Environment Variables

ScarpShield supports loading credentials from environment variables for better security (they take priority over values in config.json).

4a. Copy the Example .env File

cp .env.example .env

4b. Fill in Your Values

Open .env and edit the following variables:

Variable Description Example
SCARPSHIELD_SMTP_HOST SMTP server hostname smtp.gmail.com
SCARPSHIELD_SMTP_PORT SMTP server port 587
SCARPSHIELD_SMTP_USER SMTP username alerts@yourdomain.com
SCARPSHIELD_SMTP_PASSWORD SMTP password or app-specific password your-app-password
SCARPSHIELD_EMAIL_FROM Sender email address alerts@yourdomain.com
SCARPSHIELD_EMAIL_TO Comma-separated recipient addresses admin@yourdomain.com,ops@yourdomain.com
SCARPSHIELD_DISCORD_WEBHOOK_URL Discord webhook URL https://discord.com/api/webhooks/...
SCARPSHIELD_SLACK_WEBHOOK_URL Slack incoming webhook URL https://hooks.slack.com/services/...
SCARPSHIELD_TELEGRAM_BOT_TOKEN Telegram Bot API token 123456:ABC-DEF1234ghIkl-zyx57W2v1u123ew11
SCARPSHIELD_TELEGRAM_CHAT_ID Telegram chat or channel ID -1001234567890

Tip: For Gmail, use an App Password instead of your regular password. Enable 2FA first.


Verify Installation

Run the status command to confirm everything is working:

scarpshield status

Expected output:

==================================================
  ScarpShield v1.0.1
  Powered by CounterScarp.io
==================================================
  Contracts:  0
  Alerts:     console
  Poll rate:  15s
  Chains:     none

If you see this output, ScarpShield is installed and ready to use.


Upgrading

To update to the latest version:

pip install --upgrade scarpshield

Review the GitHub releases page for any breaking changes before upgrading.


Next Steps

Clone this wiki locally