Blog
The technical content top engineers rely on to level up.
3 min read
Cross Program Invocation In Anchor
Cross Program Invocation (CPI) is Solana's terminology for a program calling the public function of another program.
6 min read
Reading Another Anchor Program's Account Data On Chain
In Solidity, reading another contract's storage requires calling a view function or the storage variable being public.
6 min read
PDA (Program Derived Address) vs Keypair Account in Solana
A program derived address (PDA) is an account whose address is derived from the address of the program that created it and the seeds passed in to the…
4 min read
Function modifiers (view, pure, payable) and fallback functions in Solana: why they don't exist
A Solana transaction must specify in advance the accounts it will modify or read as part of a transaction.
6 min read
Tx.origin, msg.sender, and onlyOwner in Solana: identifying the caller
In Solidity, the msg.sender is a global variable that represents the address that called or initiated a function call on a smart contract.
9 min read
Solana Sysvars Explained
In Solana, sysvars are read-only system accounts that give Solana programs access to the blockchain state as well as network information.
5 min read
Deleting and Closing Accounts and Programs in Solana
In the Anchor framework for Solana, close is the opposite of init (initializing an account in Anchor) — it reduces the lamport balance to zero, sending…
7 min read
Init_if_needed in Anchor and the Reinitialization Attack
In previous tutorials, we've had to initialize an account in a separate transaction before we can write data to it.
7 min read
The unusual syntax of Rust
Readers coming from a Solidity or Javascript background may find Rust's usage and syntax of &, mut, <_>, unwrap(), and ? to be weird (or even ugly).
4 min read
Transferring SOL and building a payment splitter: "msg.value" in Solana
This tutorial will introduce the mechanism by which Solana Anchor programs can transfer SOL as part of the transaction.
7 min read
Understanding Account Ownership in Solana: Transferring SOL out of a PDA
The owner of an account in Solana is able to reduce the SOL balance, write data to the account, and change the owner.
7 min read
Modifying accounts using different signers
In our Solana tutorials thus far, we've only had one account initialize and write to the account. In practice, this is very restrictive.