Pick a depth. Each prompt opens in your AI pre-loaded with the lesson. Click a row to preview the prompt.
A Solana transaction is a list of instructions, each of which names the program to call, the accounts it touches, and the data (opcode + args) to pass. That list is submitted atomically: all succeed or all roll back. This structure — programs + accounts + data — is radically simpler than Ethereum's 'call a function on a contract' frame; it's closer to 'hand a list of accounts and opcodes to the runtime.' Understanding the wire-level transaction layout lets you read any Solana transaction in an explorer and see exactly what it does.
Send 0.01 SOL with one instruction. The instruction names SystemProgram, names two accounts (from, to), and carries the opcode Transfer with amount 10_000_000. The transaction is signed by the sender and submitted. On arrival, the runtime loads both accounts, passes them to the System program, which mutates both balances, and the transaction commits. That's the whole model.
// Rust — construct and send a transfer using solana-sdk
use solana_sdk::{
signature::{Keypair, Signer},
system_instruction::transfer,
transaction::Transaction,
commitment_config::CommitmentConfig,
pubkey::Pubkey,
};
use solana_client::rpc_client::RpcClient;
use std::str::FromStr;
fn main() -> Result<(), Box<dyn std::error::Error>> {
let client = RpcClient::new_with_commitment(
"https://api.devnet.solana.com".to_string(),
CommitmentConfig::confirmed(),
);
let from = Keypair::new(); // funded via airdrop for demo
let to = Pubkey::from_str("11111111111111111111111111111111")?; // example
let ix = transfer(&from.pubkey(), &to, 10_000_000); // 0.01 SOL
let blockhash = client.get_latest_blockhash()?;
let tx = Transaction::new_signed_with_payer(
&[ix], Some(&from.pubkey()), &[&from], blockhash,
);
let sig = client.send_and_confirm_transaction(&tx)?;
println!("Tx: {}", sig);
Ok(())
}
cargo run