Say Hello to Eventra.
Eventra AI is a lightweight, AI-powered SDK Agent designed to monitor the Base blockchain. It allows developers to track real-time events like token transfers, contract calls, and stake updates while sending actionable alerts through a Telegram bot. Build eventra today and customize it anyway you like. Simple code, multiple use cases.
CA :
Real-Time Monitoring: Stay updated on the latest Base blockchain activities.
Introduction.
# Base Event Watcher with Telegram Bot
This project is an AI-based event watcher for the base blockchain that notifies users of blockchain events via a Telegram bot.
---
## Features- Real-time tracking of base events (token transfers, contract calls, stake updates).- AI-based filtering of events to prioritize actionable updates.- Telegram bot for managing subscriptions and receiving notifications.
---
## Accesibility
- To use the bot presented, a minimum supply will be required. Additionally, the latest features will be available in early access to the largest holders, giving them priority to explore new updates before others. Please ensure you have the necessary amount to access and fully utilize its features.
---
Token Holding Tiers
Tier 1 (0.01%): Access to basic features
--
Tier 2 (0.2%): Access to premium features
--
Tier 3 (1%): Early access to new features & VIP group access
--
ai processor
import numpy as npfrom sklearn.ensemble import IsolationForest
def process_events(events): data = np.array(events) model = IsolationForest(n_estimators=100, contamination=0.1) predictions = model.fit_predict(data) return [event for i, event in enumerate(events) if predictions[i] == 1]
Database
from sqlalchemy import create_engine, Column, Integer, String, Table, MetaDatafrom sqlalchemy.orm import sessionmaker
# Database ConfigurationDATABASE_URL = "postgresql://username:password@localhost:5432/base_event_watcher"engine = create_engine(DATABASE_URL)SessionLocal = sessionmaker(bind=engine)
# Define tablesmetadata = MetaData()subscriptions = Table( "subscriptions", metadata, Column("id", Integer, primary_key=True), Column("chat_id", String, nullable=False), Column("wallet_address", String, nullable=False),)
# Create tables if they don't existmetadata.create_all(engine)
# Helper functiondef add_subscription(chat_id, wallet_address): with engine.connect() as conn: conn.execute(subscriptions.insert().values(chat_id=chat_id, wallet_address=wallet_address))
Event Listener
from base.rpc.async_api import AsyncClientfrom base.publickey import PublicKeyimport asyncio
async def monitor_wallet(wallet_address, callback): client = AsyncClient("https://api.mainnet-beta.base.com") public_key = PublicKey(wallet_address)
async for log in client.logs_subscribe(public_key): await callback(log.result)
async def main(callback): # Add wallets to monitor wallets_to_monitor = ["YOUR_WALLET_ADDRESS_HERE"] tasks = [monitor_wallet(wallet, callback) for wallet in wallets_to_monitor] await asyncio.gather(*tasks)
Telegram bot (bot.py)
from telegram.ext import Updater, CommandHandlerfrom backend.database import add_subscription
# Load Bot Tokenfrom config import TELEGRAM_BOT_TOKEN
def start(update, context): update.message.reply_text("Welcome! Use /subscribe <wallet> to start monitoring events.")
def subscribe(update, context): if len(context.args) < 1: update.message.reply_text("Usage: /subscribe <wallet_address>") return
wallet = context.args[0] chat_id = update.effective_chat.id
# Save to database add_subscription(chat_id, wallet) update.message.reply_text(f"Subscribed to wallet: {wallet}")
def run_bot(): updater = Updater(TELEGRAM_BOT_TOKEN) dispatcher = updater.dispatcher
dispatcher.add_handler(CommandHandler("start", start)) dispatcher.add_handler(CommandHandler("subscribe", subscribe))
updater.start_polling() updater.idle()
if __name__ == "__main__": run_bot()
Telegram bot (config.py)
TELEGRAM_BOT_TOKEN = "YOUR_TELEGRAM_BOT_TOKEN"DATABASE_URL = "postgresql://username:password@localhost:5432/base_event_watcher"base_RPC_URL = "https://api.mainnet-beta.base.com"
Customize Eventra.
Your code and ideas here….