Solana Cheat Sheet
Published on 09 Apr 2024
Solana Cheatsheet
Install
- Linux
sh -c "$(curl -sSfL https://release.solana.com/v1.18.4/install)"
- Windows
cmd /c "curl https://release.solana.com/v1.18.4/solana-install-init-x86_64-pc-windows-msvc.exe --output D:\tmp\solana-install-init.exe --create-dirs"
- Check with
solana --version
Running
- On devnet
solana config set --url devnet
- Local
solana config set --url localhost
solana-test-validator
- Check config
solana config get
- Create key, check balance and get some tokens
solana-keygen new -o ~/.config/solana/id.json
solana balance
solana airdrop 2
Program
solana address -k target/deploy/myepicproject-keypair.json
deploy
cargo build-bpf
solana program deploy target/deploy/break_solana_program.so --url localhost
Anchor
Install
cargo install --git https://github.com/project-serum/anchor anchor-cli --locked
anchor --version
Create a new project
anchor init solana-twitter
cd solana-twitter
anchor build
anchor deploy
References
- https://lorisleiva.com/create-a-solana-dapp-from-scratch/getting-started-with-solana-and-anchor
- https://lorisleiva.com/owning-digital-assets-in-solana/how-nfts-are-represented-in-solana#x-discussions
all tags
IDE architecture" cli crontab crypto csv database docker editor error exceptions fastapi ffmpeg filename git go history http iteration javascript linux logging me mysql numpy orm pdo pentaho php postgres python random rename rsync rust selenium server solana sql sqlite ssh typescript user w3m wordpress