Solana Week 2: From Terminal Logs to a Live Browser Dashboard

Published: (May 2, 2026 at 02:48 PM EDT)
3 min read
Source: Dev.to

Source: Dev.to

Public Database

Before starting, I expected blockchain data to be cryptic and hard to reach. The reality is that Solana feels like a globally distributed public database. In a traditional app, your data is tucked away in a private SQL or NoSQL database managed by a backend server. On Solana, everything is an account and accounts are public by default; anyone with an RPC connection can read the state of an account at any time.

Terminal vs. Browser

My week was a game of two halves: working in the terminal and building in the browser.

Terminal

  • Checked address balances via the Solana CLI with simple commands like solana balance.
  • Logged raw transaction data to see the flow of SOL in real‑time.

Browser

  • Moved balance fetching into a JavaScript frontend using the @solana/web3.js library.
  • Established a Connection to the cluster and used getBalance to fetch data programmatically.
import { Connection, clusterApiUrl, LAMPORTS_PER_SOL } from '@solana/web3.js';

const connection = new Connection(clusterApiUrl('devnet'));
const publicKey = /* your public key */;

async function getSolBalance() {
  const lamports = await connection.getBalance(publicKey);
  const sol = lamports / LAMPORTS_PER_SOL;
  console.log(`Balance: ${sol} SOL`);
}

Fetching Balances

Solana doesn’t store balances as “1 SOL.” It uses Lamports, the smallest unit of SOL (1 SOL = 10⁹ Lamports). To display a user’s actual balance, divide the result by the LAMPORTS_PER_SOL constant:

SOL = Lamports / 10^9

Account History

Reading transactions is a two‑step process:

  1. Fetch signatures (transaction IDs) with getSignaturesForAddress.
  2. Fetch transaction details with getParsedTransaction.

A built‑in limit allows only 1,000 signatures per request, so pagination using the before parameter is required for full history.

// Step 1: Get signatures
const signatures = await connection.getSignaturesForAddress(publicKey, { limit: 1000 });

// Step 2: Get transaction details
const transactions = await Promise.all(
  signatures.map(sig => connection.getParsedTransaction(sig.signature))
);

Comparing Devnet and Mainnet‑beta

FeatureDevnetMainnet‑beta
SOL Value$0 (free airdrops)Real market value
Rate LimitsPermissive for testingHighly restrictive on public nodes
PurposeTesting and demosProduction apps

Key takeaway: Public endpoints are heavily throttled, often returning 429 Too Many Requests errors.

Lessons Learned

  • Commitment Levels – Balancing the speed of a “processed” transaction with the certainty of a “finalized” one is still a learning curve.
  • Rate limiting – Expect stricter limits on Mainnet‑beta, especially on shared RPC nodes.

Next Steps

Next week I’ll dive into Programs and explore how to write data back to the chain.


If you’re on the same journey, feel free to connect!

0 views
Back to Blog

Related posts

Read more »