Everything Is an Account on Solana: A Complete Guide for Web2 Developers
Solana's architecture treats everything as an account, a fundamental concept where all on-chain data and programs are stored in uniformly structured records. Each account contains lamports, an owner, data, and an executable flag, enabling a consistent model for state and program storage. This design separates program logic from state, differing from Ethereum's approach and emphasizing ownership-based access control.
- ▪Every account on Solana has four fields: lamports, owner, data, and executable.
- ▪Only the program that owns an account can modify its data, enforcing access control at the runtime level.
- ▪Programs on Solana are accounts with executable set to true and do not store mutable state.
- ▪Accounts must hold enough lamports to be rent-exempt, determining their eligibility to remain on-chain.
- ▪Wallets, tokens, NFTs, and DEX pools are all implemented as accounts with different data structures.
Opening excerpt (first ~120 words) tap to expand
try { if(localStorage) { let currentUser = localStorage.getItem('current_user'); if (currentUser) { currentUser = JSON.parse(currentUser); if (currentUser.id === 3898087) { document.getElementById('article-show-container').classList.add('current-user-is-article-author'); } } } } catch (e) { console.error(e); } Samuel Akoji Posted on May 17 Everything Is an Account on Solana: A Complete Guide for Web2 Developers #100daysofsolana #solana #blockchain #web3 The One Idea That Changes Everything When I started learning Solana after years of Web2 development, one sentence kept appearing everywhere: "Everything is an account." I nodded along without really understanding it. It sounded like a slogan. It isn't.
…
Excerpt limited to ~120 words for fair-use compliance. The full article is at DEV.to (Top).