惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

F
Full Disclosure
Recorded Future
Recorded Future
T
Tenable Blog
S
Securelist
C
CERT Recently Published Vulnerability Notes
T
Threatpost
S
Schneier on Security
A
Arctic Wolf
The Hacker News
The Hacker News
C
CXSECURITY Database RSS Feed - CXSecurity.com
Know Your Adversary
Know Your Adversary
P
Privacy International News Feed
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
The Register - Security
The Register - Security
Cisco Talos Blog
Cisco Talos Blog
AWS News Blog
AWS News Blog
K
Kaspersky official blog
T
True Tiger Recordings
T
Threat Research - Cisco Blogs
V
Vulnerabilities – Threatpost
P
Palo Alto Networks Blog
T
The Exploit Database - CXSecurity.com
小众软件
小众软件
B
Blog
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
Microsoft Azure Blog
Microsoft Azure Blog
Cyberwarzone
Cyberwarzone
C
Cybersecurity and Infrastructure Security Agency CISA
T
Tor Project blog
Spread Privacy
Spread Privacy
Malwarebytes
Malwarebytes
P
Proofpoint News Feed
F
Fox-IT International blog
F
Fortinet All Blogs
P
Privacy & Cybersecurity Law Blog
G
GRAHAM CLULEY
量子位
Latest news
Latest news
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
博客园 - 叶小钗
Project Zero
Project Zero
T
Tailwind CSS Blog
N
Netflix TechBlog - Medium
Martin Fowler
Martin Fowler
IntelliJ IDEA : IntelliJ IDEA – the Leading IDE for Professional Development in Java and Kotlin | The JetBrains Blog
IntelliJ IDEA : IntelliJ IDEA – the Leading IDE for Professional Development in Java and Kotlin | The JetBrains Blog
I
Intezer
博客园_首页
腾讯CDC
H
Hackread – Cybersecurity News, Data Breaches, AI and More
D
Darknet – Hacking Tools, Hacker News & Cyber Security

DEV Community

An Intelligence Briefing for the Port of Rotterdam, from a Single Prompt How I Built Semantic Discussion Clustering Without Embeddings (and Why It Was Good Enough) I Built a Real-Time Simulation Game in a Single HTML File (Without React or Custom JavaScript) I Got Tired of SNMP Dev Hell, So I Built Trishul SNMP Suite 98. RAG: Give Your AI Access to Your Documents Why Getting a Tech Job Right Now Feels Broken? The Container Runtime Nobody Told You About (And Four Others) The Singleton Labyrinth Build your first MCP server in TypeScript: the 2026 setup that takes 30 minutes. Vectr — Code Intelligence AI Tool Veltrix Was Killing Us With YAML 5 PostgreSQL locking behaviors that trip people up Beyond Monolithic AI: How to Build a Pluggable "Brain" Architecture for Autonomous Agents The Operational Cost of JWT Lifecycle Management: Overlooked Details Mastering Structured JSON Outputs with Gemini API ATR Implements the Detection Layer the NSA Identified as Missing in MCP I tried both Cursor and Antigravity(1.20) - Switching Context - which one is better? Negative Lookups in Bf-Tree: Caching Things That Don't Exist My Struggles as a Software Engineer in 2026 Why Hybrid Metaheuristics Still Beat “Smarter” AI in Real-World Optimization Cómo destacar como JR DEV en tu equipo I got tired of guessing which model holds my VRAM, so I built a tiny dashboard Qwen Is Not Yet Ready to Power Local OpenClaw Deployments Top 7 Featured DEV Posts of the Week Why I got frustrated with AI job search tools and built my own 10 Best Open-Source AI Agents for 2026 Contract Analysis Will Replace Legal Gatekeeping AWS Cloud Shell with Antigravity CLI Building Reliable Event Delivery for XRPL Applications AMTP: HTTP for the Agentic Web — A New Markdown-First Protocol for AI Agents LLM Security Vulnerabilities Engineers Need to Know in 2026 Shared Build Cache: Makes Sense for the Independent Developer? Live Lessons From Running a 5-Minute Polymarket Crypto Bot Cómo Evaluar Agentes IA: Tutorial de LLM-as-Judge Day 2 of Python Learning 🐍 I built a local-first Apple Health recovery briefing that shows its math I Built a REST Microservice With a Database in 3 Files — and Wrote Zero Code 10 Avro Schema Mistakes Even Experienced Developer Do Commit: Refactor background workers and logging pipeline GitHub Actions vs Jenkins vs GitLab CI: A Developer's Honest Comparison (2026) Clean Architecture in MongoDB + C#: Why is the Repository Pattern Alone Not Enough? I Tested 10 More Models. Five Brand New Families Debuted. None Scored Below 75%. I Almost Quit Coding to Become a Welder Understanding Reinforcement Learning with Human Feedback Part 6: How the Reward Model Trains the Original Model # Level Up Your Portfolio with Wowfolio.in: Free, Customizable, Type Inhabitation in Lean: Why “Hello {name}” Can Become a Theorem Mastering Context in Go: A Senior Engineer’s Playbook for Lifecycle Management Solana Transactions Through a Backend Developer’s Eye Agent as a Tool Call: Claude Code's Fork-Exec Pattern How I wired Stripe subscriptions to Supabase in Next.js 15 (the parts tutorials skip) Introduction to A2A and Agent Search Why Doesn't Linux Break Every Week? The "AI" Label Is Losing Its Meaning, and Companies Are the Ones Diluting It Bucky Fuller's To-Do List: Can AI Finally Solve the World's Cataloged Problems? My $10/Month VPS Gets 659 SSH Attacks per Day — Here's What 4 Weeks of Running an Autonomous AI Has Taught Me About Infrastructure Speed Up Your WordPress Site in 30 Minutes: A No-Plugin Performance Guide Breaking Code: The Addiction Nobody in Tech Will Admit To Nobody Reads AI Safety Papers. But 649 People Upvoted a Letter to an LLM. The Pope wrote about me Je vibe-coded app werkt. Maar kan hij ook live? The Event Store That Survived Black Friday Without a Single 5xx Audit-trail-by-construction: a thesis for spec-driven AI coding Day 8 - Sparse embedding - RAG How we made our Mac launcher feel instant by killing slow providers How we made our Mac launcher feel instant by killing slow providers Enterprise AI Agent Orchestration Patterns How to build your first MCP server in 10 minutes Claude Code's plan mode is prompt engineering, not hard enforcement Built a C# AI Agent That Researches Errors and Suggests Fixes From Shell Scripts to MCP Servers: How SEO Broke My Brain (in a Good Way) AI Agent Platform Buyer's Guide: 12 Questions to Ask Before You Sign 🦋 I Built a Living Terminal Animation with Hermes Agent — Here's How It Went. AI Agents Are Coming for Your WordPress Admin Panel, and That's Not a Bad Thing Tailscale + k3s in a 2‑node homelab: why I use Tailscale ONLY for the control plane When NOT to Use AI Agents: A Realistic Framework Human-in-the-Loop Patterns for High-Stakes AI Agent Decisions LLM Cost Optimization for Agent Workflows: A Practical Guide An Evolving Strategy for Knowledge Work: From Human-In-the-Loop to Human-Before-the-Loop Why I Wake Up at 5am to Run (And Why You Might Want To) I Scanned 260 Packages that your are using and Found 43 With Security Vulnerabilities The Easiest Way to Implement Theme Toggling in React 19 using next-themes & Tailwind CSS v4 AI skill testing: yes, your prompts need regression tests Why We Built AnToAnt: Designing Software Before Writing Code How I Built an End-to-End HR Attrition Dashboard Using MySQL & Power BI Why Hytale Treasure Hunt Engines Stumble Before 1,000 Concurrent Diggers: What Veltrix Does Not Document How to Implement Dark/Light Mode with No Flickers in Next.js Building My First Solana Transfer CLI Tool | #100DaysOfSolana What Is OAuth Token Exchange? CLI wrapper for Cloudflare Tunnel with Zero Trust Your Agent Acts Without Checking Your Error Budget — That's the Failure Mode Nobody Is Tracking The Death of the Junior Developer Is Greatly Exaggerated How I Built a Programmatic SEO Site with 16,750 Pages Using FastAPI and PostgreSQL Toward a Standard Model for Agent Memory I Applied SLA Concepts to My Email Inbox — Here's What I Learned Building the Chrome Extension How Spring Data JPA, JPA, and Hibernate work together What useOptimistic Actually Saves You The Vibe Tax: How Unvalidated AI Code Is Flooding the Market and Driving Up Technical Debt Building My First MCP Server with Claude and Python Azure Blob Storage for Beginners: Private Access, SAS Tokens & Cost Savings Explained I'm building a TypeScript data grid where config reads like English
Check Wallet Balances Across 4 Chains with Zero Dependencies — chain_balance.py
neuralmint · 2026-05-27 · via DEV Community

neuralmint

TL;DR: A single-file Python CLI tool that checks native and token balances across Solana, Ethereum, BSC, and Polygon using public RPC endpoints. No pip install required. Just Python 3 and a wallet address.

GitHub: https://github.com/neuralmint/multichain-balance-cli


Why Another Balance Checker?

Most multi-chain balance checkers fall into two categories:

  1. Web dashboards — nice UI but no CLI, no scripting, no automation
  2. Heavy SDKs — ethers.js, web3.py, solana-py — each requires its own install, its own API keys, its own learning curve

I wanted something I could run on any server with Python 3, pipe into jq, drop into a cron job, and never worry about dependency rot. The result is a single 278-line Python file that works out of the box.

What It Does

# Check all 4 chains at once
python3 chain_balance.py --address 0x742d35Cc6634C0532925a3b844Bc1dC3E92bBbb7

# Just Solana
python3 chain_balance.py --address 4TGyiYBjaYhFFPNYyCoJjf16ctUsWVBiMR1FXQxEfhWi --chains solana

# JSON mode for jq/shell pipelines
python3 chain_balance.py --address 0x... --chains eth,polygon --json | jq '.results[].native'

# Silent mode for cron jobs
python3 chain_balance.py --address 0x... --quiet --json > report.json

Enter fullscreen mode Exit fullscreen mode

Supported Chains

Chain Native Token RPC Endpoint
Solana SOL api.mainnet-beta.solana.com
Ethereum ETH ethereum-rpc.publicnode.com
BSC BNB bsc-dataseed1.binance.org
Polygon MATIC polygon-rpc.com

Token Coverage

For each EVM chain, it checks the top 5 tokens by market cap:

  • Ethereum: USDT, USDC, LINK, UNI, DAI
  • BSC: USDT, USDC, BUSD, WBNB, CAKE
  • Polygon: USDT, USDC, WMATIC, LINK, WETH
  • Solana: All SPL tokens via getTokenAccountsByOwner (auto-discovers any token you hold)

How It Works

Pure JSON-RPC 2.0 calls over HTTPS using Python's stdlib urllib. No HTTP library, no Web3 SDK, no Solana SDK:

def rpc_call(url, method, params):
    payload = json.dumps({
        "jsonrpc": "2.0", "id": 1,
        "method": method, "params": params,
    }).encode()
    req = urllib.request.Request(url, data=payload, headers={"Content-Type": "application/json"})
    with urllib.request.urlopen(req, timeout=15) as resp:
        return json.loads(resp.read().decode()).get("result")

Enter fullscreen mode Exit fullscreen mode

For Solana, it uses getTokenAccountsByOwner with the Token program ID to discover all SPL tokens in the wallet — not just a hardcoded list.

Example Output

════════════════════════════════════════════════════════
  Multi-Chain Balance Report
  Address: 0x742d35Cc6634C0532925a3b844Bc1dC3E92bBbb7
════════════════════════════════════════════════════════

  ┌── SOLANA ────────────────────────────────
  │ Native: 0.000000 SOL
  │ (no token balances found)
  └─────────────────────────────────────────────

  ┌── ETH ────────────────────────────────────
  │ Native: 0.000000 ETH
  └─────────────────────────────────────────────

Enter fullscreen mode Exit fullscreen mode

Use Cases

  • Cron job monitoring: Check your wallet daily, email if balance drops below threshold
  • Portfolio dashboard: Pipe --json into a shell script that builds a dashboard
  • Swap pre-flight: Check you have enough gas tokens before sending a transaction
  • CI/CD health check: Verify a faucet wallet still has funds

Tips

If this tool saves you time or money, tips are appreciated:

  • SOL: 4TGyiYBjaYhFFPNYyCoJjf16ctUsWVBiMR1FXQxEfhWi
  • ETH/ERC-20: 0xe07f177E0725c11EEc8BeA34C5b5193CaF2a1A6a

What's Next

This is part of the neuralmint CLI Tools series. Previous tools in the series:

  • wallet_tracker.py — transaction history tracker
  • token_info.py — token metadata lookup
  • crypto_sentiment.py — sentiment analysis from social feeds
  • crypto_news.py — crypto news aggregator

All tools are single-file, MIT-licensed, and zero-dependency.


Built with Python 3 stdlib. No npm, no pip, no bloat.