DEV Community

Shaun
Shaun

Posted on

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

I just finished my second week of the #100DaysOfSolana challenge, and it’s been a massive shift in perspective. If the first week was about understanding the what (wallets and Lamports), this week was all about the how—specifically, pulling that data off the chain and showing it to the world.

Here’s a breakdown of what I’ve been building and the discovery moments I had along the way.

The Mental Shift: The 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.

The CLI vs. The Frontend

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

1. Reading Balances

I started by checking address balances via the Solana CLI using simple commands like solana balance. But the real magic happened when I moved this into a JavaScript frontend. Using the @solana/web3.js library, I established a Connection to the cluster and used the getBalance method to fetch data programmatically.

The Surprise:

I learned that Solana doesn't store balances as "1 SOL." It uses Lamports—the smallest unit of SOL. To show a user their actual balance, you have to divide the result by the LAMPORTS_PER_SOL constant:

SOL = Lamports / 10^9
Enter fullscreen mode Exit fullscreen mode

2. Tracking Transactions

Next, I moved on to account history.

  • In the Terminal: I logged raw transaction data to see the flow of SOL in real-time.
  • In the Browser: I built a dashboard to display these transactions as a readable list.

What Clicked: Reading transactions is a two-step process. You first fetch a list of signatures (transaction IDs) using getSignaturesForAddress. Then, you fetch the actual transaction details using getParsedTransaction. I also discovered a built-in limit: you can only fetch 1,000 signatures at a time, so you have to use pagination with the before parameter if you want the full history.

Devnet vs. Mainnet: The Reality Check

The most important milestone was comparing data across Devnet (the playground) and Mainnet-beta (the real deal).

Feature Devnet Mainnet-beta
SOL Value $0 (Free airdrops) Real market value
Rate Limits Permissive for testing Highly restrictive on public nodes
Purpose Testing and Demos Production Apps

A Big Lesson:
I realized that while public RPC endpoints are great for learning, a real dashboard on Mainnet-beta needs a private RPC provider to avoid Too Many Requests (429) errors, as public endpoints are heavily throttled.

What’s Next?

I’m still getting my head around Commitment Levels—balancing the speed of a "processed" transaction with the absolute certainty of a finalized one. Next week, I'm diving into Programs and how to write data back to the chain.

If you're also on this journey, let's connect!


Top comments (0)