Menu

Post image 1
Post image 2
Post image 3
Post image 4
Post image 5
1 / 5
0

From Zero to Transfer: Showing Off My First Solana CLI Tool

DEV Community·Favour Chisom I.·22 days ago
#ZKRTIfAK
Reading 0:00
15s threshold

Favour Chisom I.

I built a small command line tool that sends SOL on devnet. I run it with a recipient address and an amount, and it loads my wallet, checks my balance, signs a transaction, and prints an Explorer link. If I try to send more than I have, it catches me before I waste any lamports. The screenshot below is a tiny SOL transfer I did today just to test it.

Before building this I didn't really understand what a blockhash was. I learned that every transaction needs a recent one that expires in about a minute, so my tool grabs a fresh one each time. The first few times I ran it I made silly mistakes with the arguments or tried to send way more than I owned, but every error taught me something. Opening the Explorer link and seeing the transfer marked FINALIZED felt like a real milestone.

Read More