Get The Basic Idea About Solana Program
Index
- Concepts
- Accounts
- Executable & Writable
- Program & Client
- Counter Example
Concepts
Accounts
Accounts are just buffers that store serialized binary data on chain.
0 |
0 |
0 |
0 |
0 |
0 |
0 |
0 |
0 |
0 |
0 |
0 |
0 |
0 |
0 |
0 |
0 |
0 |
0 |
0 |
0 |
0 |
0 |
0 |
0 |
0 |
0 |
0 |
0 |
0 |
0 |
0 |
Executable & Writable
- Programs are stored in executable accounts
- Programs are stateless on Solana.
- States are stored in non-executable accounts which can be writable or read-only
- Think state accounts as rows in database. They can be modified and queried
Program & Client
You may think programs (smart contract) as AWS Lambda functions.
Just like client-server model that we are familiar in web2, we develop and deploy prgrams then use clients to interact with them.
Counter Example
offical repo
Program
Client (partial)
Resources