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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file scarpshield-1.0.2.tar.gz.
File metadata
- Download URL: scarpshield-1.0.2.tar.gz
- Upload date:
- Size: 52.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1af977d7fb7b27ac7754ed0e9e3b092296a5d4fa6c522888360cacb0151fd8d7
|
|
| MD5 |
8e997b135adf2aa2f701ebf66e4b4ca3
|
|
| BLAKE2b-256 |
9183585d2b86cd5d1bb668a618a128d953ca61f81d48d5d02ead85c4fac5febf
|
File details
Details for the file scarpshield-1.0.2-py3-none-any.whl.
File metadata
- Download URL: scarpshield-1.0.2-py3-none-any.whl
- Upload date:
- Size: 62.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
bbab3d0364a396b43703358975ac57bee62d532060c95baf75d2dd18bc92ac69
|
|
| MD5 |
ff21443857559309a638fa18b26b0370
|
|
| BLAKE2b-256 |
522cb2aafad580b654cab45681b80586581286c570675a305c1da65245e9062d
|