Skip to content

Latest commit

 

History

History

1.lesson

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 

1. Lecture - Introduction to Solana and Blockchain

In order not to waste time on our first lecture, please prepare/install some stuff in advance. 👇

Table of Contents

Dev Setup

Setup Description Version How to Install
Windows subsystem for Linux(WSL) optional but highly recommended 2.0 Instructions
Rust - stable Instructions
Solana tool suite - 1.18.11 Instructions
Anchor framework - 0.29.0 Instructions
VSCode chose your own preferred IDE - Instructions
RustAnalyzer optional extension for VSCode - Instructions
Docker comming soon - Instructions

Solana Handbook

Command cheatsheet

Solana CLI commands

  • Get current config

    solana config get
  • Set CLI config url to localhost cluster

    solana config set --url localhost # useful for local development
    solana config set --url devnet # useful for devnet testing

    More at Clusters and Public RPC Endpoints

  • Create CLI Keypair

    solana-keygen new -o test.json
  • Airdrop

    As you may guess, Airdrop will only work on Devnet, Testnet or Localhost. No you cannot airdrop SOL on Mainnet!!

    solana airdrop 5

    You can also optionally specify the destination address of the airdrop

    solana airdrop 5 <YOUR_PUBKEY>
  • Get PubKey from Keypair

    solana-keygen pubkey ~/my-solana-wallet/my-keypair.json
  • Run Solana test validator

    In most cases (99%) you DO NOT NEED TO start the local validator by yourself. Down below you can find the Anchor commands which will handle everything for you.

    solana-test-validator
  • Get logs from the Solana validator

    solana logs

Anchor commands

  • Initialize new project

    anchor init <your_project_name>
  • Build the project

    anchor build
  • Test the project (preferred)

    anchor test
  • Test the project (less preferred)

    In separate window, call:
    solana-test-validator
    Within the anchor project directory
    • Build the project
      anchor build
    • Run Tests without starting the local validator (as you started it manually in the step above)
      anchor test --skip-local-validator

Need help?

If you have any questions feel free to reach out to us at Discord.