Focus mode

Smart Contract development on Solana using Rust

Accounts

Accounts are the foundation of the blockchain structure in Solana, which holds status, data, and ownership information. The data held can be program data, code information, account balance, etc.

Per Solana Cookbook there are 3 kinds of accounts on Solana:

  • Data accounts: Store data ( Two types of data accounts: System owned accounts and PDA(Program Derived Address) accounts )
  • Program accounts: Store executable programs, do not store state
  • Native accounts: Indicates native programs on Solana such as System, Stake, and Vote

Under the rules of ownership:

  • Only a data account's owner can modify its data and debit lamports
  • Anyone is allowed to credit lamports to a data account
  • The owner of an account may assign a new owner if the account's data is zeroed out

Rent

Storing data on accounts has a cost. Therefore, a fee must be paid for not deleting an account- this is called rent. If an account has a balance equivalent to at least 2 years' rent payment, the account is not required to pay rent. Rent can be retrieved by closing the account and sending the Lamports back to your wallet.

You can find further information about accounts from Solana Cookbook: https://solanacookbook.com/core-concepts/accounts.html#facts

left-disk

Programs to Accelerate Your Progress in a Software Career

Join our 4-8 month intensive Patika+ bootcamps, start with the fundamentals and gain comprehensive knowledge to kickstart your software career!

right-cube

Comments

You need to enroll in the course to be able to comment!