Your keypair has been generated and saved as my-wallet-keypair.json
Public Key: You can get this by running:
solana-keygen pubkey my-wallet-keypair.json-
Go to Solana Playground
- Visit: https://beta.solpg.io/
-
Import Your Wallet
- Click wallet icon (bottom left)
- Click "Import Wallet"
- Upload your
my-wallet-keypair.jsonfile
-
Get Devnet SOL
- Click "Airdrop" button
- Request 2 SOL
-
Create Hello World Program
- Create new project: "Native" template
- Replace
src/lib.rswith:
use solana_program::{ account_info::AccountInfo, entrypoint, entrypoint::ProgramResult, msg, pubkey::Pubkey, }; entrypoint!(process_instruction); pub fn process_instruction( _program_id: &Pubkey, _accounts: &[AccountInfo], _instruction_data: &[u8], ) -> ProgramResult { msg!("Hello, Solana Devnet! 🚀"); Ok(()) }
-
Build & Deploy
- Click Build (🔨 icon)
- Click Deploy
- Save the Program ID!
-
Test
- Click Test tab
- Run test to see "Hello, Solana Devnet! 🚀" in logs
If you want to use command line:
Install Solana CLI:
# Using Chocolatey
choco install solana
# Or download from: https://docs.solana.com/cli/install-solana-cli-toolsConfigure for Devnet:
solana config set --url https://api.devnet.solana.com
solana config set --keypair ./my-wallet-keypair.jsonGet Your Address:
solana addressGet Devnet SOL:
solana airdrop 2Deploy Program:
# Build (requires Rust)
cargo build-bpf
# Deploy
solana program deploy target/deploy/hello_world.soFor quickest deployment without any installation, use Option 1 (Solana Playground).
Ready to deploy? Open https://beta.solpg.io/ now! 🚀