Skip to main content

Free, self-hosted smart contract monitoring. Real-time alerts when something happens on-chain.

Project description

ScarpShield

Official self-hosted monitoring tool for CounterScarp.io

Lightweight. Private. Runs on your machine. Get real-time alerts for your smart contracts via Email, Discord, Slack, Telegram, or console.

Quick Start

# Install dependencies
pip install -r requirements.txt

# Initialize config (or copy config.example.json to config.json)
python main.py init

# Add a contract
python main.py add 0xYourContractAddress --chain ethereum --label "My Token"

# Configure alerts (pick one or more)
python main.py setup-email
python main.py setup-discord
python main.py setup-slack
python main.py setup-telegram

# Start monitoring
python main.py start

CLI Commands

Command Description
add <address> Add a contract (flags: --chain, --label)
remove <address> Remove a contract
list Show all monitored contracts
start Start the monitoring loop
status Show config summary
alerts Show alert channel status
enable-alert <channel> Enable a channel
disable-alert <channel> Disable a channel
setup-email Configure SMTP email alerts
setup-discord Configure Discord webhook
setup-slack Configure Slack webhook
setup-telegram Configure Telegram bot
gui Launch the web dashboard (flags: --port, --host, --no-browser)
test-alerts Send a test alert to all enabled channels
init Create default config.json

Web Dashboard

ScarpShield now includes a polished web GUI featuring the CounterScarp.io dark cyberpunk theme.

Launch it with:

python main.py gui

Options:

  • --port — Port to run on (default: 8050)
  • --host — Host to bind to (default: 127.0.0.1)
  • --no-browser — Skip auto-opening the browser

By default, the dashboard runs at http://127.0.0.1:8050.

Features:

  • Dashboard — Real-time monitoring overview with live event feed (SSE), alert channel status, and contract summary
  • Contracts — Add, remove, and manage monitored contracts with chain and label editing
  • Alerts — Enable/disable channels and configure Email, Discord, Slack, and Telegram settings inline
  • Settings — Edit global config (RPC endpoints, API keys, polling interval) with validation
  • Logs — Browse the event history with filtering, and export logs to JSON

Alert Channels

  • Console — always on, prints to terminal
  • Email — SMTP (Gmail, Outlook, custom)
  • Discord — webhook integration
  • Slack — webhook integration
  • Telegram — bot API (optional)

Supported Chains

Ethereum, Polygon, BSC, Arbitrum, Base (add custom RPCs in config.json)

What It Monitors

  • ERC-20 Transfer events
  • Approval events
  • OwnershipTransferred events
  • Admin function calls (pause, transferOwnership, upgradeTo, etc.)

Config

All runtime settings are stored in config.json. To get started, copy config.example.json to config.json and edit the values, or use python main.py init to generate one automatically.

Requirements

  • Python 3.11+
  • web3, typer

Roadmap

ScarpShield is under active development. Planned features:

  • Solana Monitoring — SPL token transfers, program log subscriptions, and account change detection via Solana RPC
  • Multi-chain Dashboard — Unified view across all monitored chains with chain-specific filtering
  • Persistent Event Storage — SQLite/PostgreSQL backend for event history beyond in-memory buffer
  • Custom Event Signatures — User-defined event ABIs for monitoring non-standard contracts
  • Webhook Alert Channel — Generic outbound webhook for custom integrations
  • Rate Limit Management — Per-provider RPC quota tracking and automatic failover
  • Docker Container — Official Docker image for one-command deployment
  • CounterScarp.io Integration — Direct integration with CounterScarp scanning results for pre+post deployment coverage

Have a feature request? Open an issue.

Security

To report a vulnerability, please see our Security Policy. Do not open public issues for security concerns.

Support

If ScarpShield helps protect your contracts, consider sponsoring the project to support continued development.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

scarpshield-1.0.3.tar.gz (54.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

scarpshield-1.0.3-py3-none-any.whl (65.0 kB view details)

Uploaded Python 3

File details

Details for the file scarpshield-1.0.3.tar.gz.

File metadata

  • Download URL: scarpshield-1.0.3.tar.gz
  • Upload date:
  • Size: 54.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for scarpshield-1.0.3.tar.gz
Algorithm Hash digest
SHA256 0e41d41920cbe0c2c84e111409c0687e88fd809b642b757ae4cddcf469df4aeb
MD5 e286b5e02fab1df3e05864baeb5bb0b8
BLAKE2b-256 2ee794194d2f3ca4a1b89cc598d39de7af107817cd98a430f4033ef1fe2509f1

See more details on using hashes here.

File details

Details for the file scarpshield-1.0.3-py3-none-any.whl.

File metadata

  • Download URL: scarpshield-1.0.3-py3-none-any.whl
  • Upload date:
  • Size: 65.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for scarpshield-1.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 efdf3563a188ba63d6f4532e2f1166af416466c9c591663e73900dff1a44fd26
MD5 a81f7871648a38d0d4b847ad8b12dff9
BLAKE2b-256 d76d9bd65160112ab7fda4cc6b4a9938fa27b0839cf851ae3e802a63f7afd3e8

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page