Skip to content

Add interactive examples to the PDA, rent and fee chapters - #42

Open
gymnasy55 wants to merge 1 commit into
RareSkills:prodfrom
RedDuckTeam:feat/interactive-examples
Open

Add interactive examples to the PDA, rent and fee chapters#42
gymnasy55 wants to merge 1 commit into
RareSkills:prodfrom
RedDuckTeam:feat/interactive-examples

Conversation

@gymnasy55

Copy link
Copy Markdown

Proposal: three chapters of the Solana tutorial get a small interactive example right after the concept they explain, so a reader can poke at it instead of only reading. Each is a flow from PLGRND, an open-source visual playground for Solana (MIT, source: https://github.com/RedDuckTeam/PLGRND), embedded as one <iframe> line plus a one-sentence caption.

  • PDA vs Keypair Account — before "Should I use PDAs or Keypair accounts?". Left: a keypair account signs a message and the signature verifies against its public key. Right: a PDA derived from the chapter's program id with empty seeds, and there is no private key to sign with. Same contrast the chapter makes, but editable.
  • Cost of storage, maximum storage size, and account resizing — before "Comparing Storage costs to ETH". One branch asks a mainnet RPC node for the rent-exempt minimum of an account of the given size, the other computes (128 + bytes) × 3,480 × 2 with the chapter's constants, and an EQUAL node confirms they match. Change the byte count and both update.
  • Compute Units and Transaction Fees — right after the bold line that the transaction charged 5,000 lamports regardless of compute units. Change the number of signatures and the fee moves in steps of 5,000 lamports.

Screenshots:

image image image

@gymnasy55
gymnasy55 marked this pull request as ready for review September 4, 2026 16:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant