Create, Fetch & Modify Ledgers using PDAs
Experiment with Solana Program Derived Accounts (PDAs) by creating Ledger accounts stored
inside PDAs using custom seeds. Each PDA is derived using findProgramAddress()
helper
method.
Create Ledger
Each ledger account is saved inside a PDA with a account structure of color: string, balance: number
and with unique seeds
to later fetch and modify account data.
Fetch Ledger
Pass wallet address for seed
Modify Ledger
Enter new balance amount
Modify Ledgers with Instructions
This uses custom program instructions (LedgerInstructions
), which allows user
to perform different computational operations on the current ledger account balance.