Understand Solana with Solscan: Solana Program Explained
In this article, we are taking a look at Programs - a crucial part to transactions on Solana and how they are displayed on our explorer.
Revisit our first article covering the concept of āAccountsā by clicking here
Alright, letās get into it!
SOLANAāS PROGRAMS
Programs on Solana are equivalent to Smart Contract on other blockchains, which serves as the foundation of on-chain activities, from DeFi to NFTs, gaming, and beyond.
Smart Contracts on other chains usually contain almost everything, while programs on Solana are conceptually fragmented. Below is an illustration of how programs are constructed:
Unlike most other blockchains, Solana completely separates code from data.
To explain the concept of programs on Solana, users should understand that programs are fundamentally made up of 2 accounts: the first one is the Program Account which can sometimes be referred to as Executable Account - in the sense that it ONLY contains programming code. The other one is Data Account (also known as Non-Executable Storage program whose owner is Program Account) which stores all the data. When a program needs to hold data, it creates an account to store it, and if the program is called, it can pull needed data from the Data Account.Ā
All data that programs interact with are passed in as references via instructionsārather than storing it directly inside the program's logic. Solanaās account model allows programs to operate across multiple accounts without the need for additional deployments.Ā
By default, all user-deployed Solana programs are owned by BPF Loader (which transfers ownership to programs) and executed by Solana Runtime called Sealevel.
Solana comes equipped with a number of Programs that serves as the foundation for blockchain activities, these include Native Programs, and Solana Program Library (SPL) programs.
Native Programs: based functionality for validator operations. Most notable to remember here is System Program, which administers for new accounts and transfers SOLs between parties
SPL Programs: support a number of on chain activities, including lending, swapping, and other composable actions.
HOW PROGRAM ACCOUNTS ARE DISPLAYED ON SOLSCAN:
Here is how a Program account (Solendās program) can be shown on Solscan, where:
https://solscan.io/account/So1endDq2YkqhipRh3WViPa8hdiSpxWy6z3Z6tMCpAo
Executable Data is actually the Solend program itself
Upgrade Authority is the address with the authority to upgrade the program.Ā
The programās owner is BPF Upgradable Loader.
Lastly, most popular programs on Solana have been labeled with a public name by Solscan.Ā
And there it is, you have read all the most fundamental things about a program on Solana. We hope that throughout this article, the concept of Solanaās programs and how they work can be better understood by our users. Our aim is to bypass all the technical jargon and try our best to simplify the knowledge to you.Ā
Stay tuned for the next articles which will explain the transaction flows and how Solscan users can read transactions using our explorer.