[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
This repository has been archived by the owner on Jun 12, 2023. It is now read-only.

solana-developers/workshop-dapps

Repository files navigation

Solana Workshop dApps

Your instructor may use one of the applications stored in this repository to conduct a Building on Solana workshop. There are a few key elements of this repository to understand:

  • 📘 Resources to learn about Solana development - whether you're beginner or intermediate level, can be found in the Resources section below.
  • 🔧 Setup steps are detailed in the How to Code Along section.
    • You can use a web-based IDE, which allows you to build & deploy programs without installation of any toolkits (ie. solana, rust, cargo).
    • You can also code along with your local setup, if you've got everything installed.
  • 🔑 You'll get the best experience from these workshops by cloning down the redacted code and filling in the blank sections as you follow your instructor through the session.
    • You can choose to simply clone down the complete application & deploy that, but this may not be as insightful!
  • ⚠️ If at any point you get stuck or have a question, you can share your workspace with your instructor - both for the web-based IDE & your local setup.

How to Code Along in Workshops

Setting up Solana Playground IDE

  • Go to https://beta.solpg.io/ and when you open the page for the first time, you'll see a template Solana program repository.
    • You can choose to delete this template Solana repository.
  • Click the "Wallet Not Connected" button in the bottom left & follow the prompts to either upload your existing wallet or generate a new one.
  • To create a new repository (called a workspace), click the "New" button in the upper left-hand side.
    • Choose your toolkit: Solana Native, Anchor, or Seahorse.
    • Name it, and click "Create".
  • 🔑 If you want to instead import an existing project, SolPG supports importing GitHub repositories as well.
    • Choose "Import from GitHub" & select the framework your repository is built using (Native, Anchor, Seahorse).
    • Follow the instructions detailed in the pop-up window about the specific path to provide.
    • Name it, and click "Import". You should see your program code in SolPG!

Local Setup

  • Install the Solana CLI
    • Note: Requires Rust & Cargo full installation.
  • Configure the Solana CLI's Cluster
    • solana config set -ul    : Sets cluster to http://localhost:8899
    • solana config set -ud    : Sets cluster to https://api.devnet.solana.com
    • solana config set -ut    : Sets cluster to https://api.testnet.solana.com
    • solana config set -um    : Sets cluster to https://api.mainnet-beta.solana.com
  • Configure the Solana CLI's Wallet
    • solana-keygen new        : This will generate a new keypair to ~/.config/solana/id.json
    • Use the -o flag to change that output location.
    • Use the --help flag to get more information about the CLI commands.
  • Building programs with Cargo
    • cargo new --lib program-name
    • Ensure you add the following config to Cargo.toml under [lib]: crate-type = ["cdylib", "lib"]
    • cargo build-sbf --manifest-path=path/to/Cargo.toml

Using the Redacted Code to Code Along

  • Simply clone this repo but use only the redacted-code branch
    • git clone git@github.com:solana-developers/workshop-dapps.git
    • git checkout redacted-code

Sharing Your Workspace on Solana Playground IDE

  • Click the little arrow symbol underneath your project's name/path. If you hover over it, it should say "Share" (Not "Export").
    • This will generate a unique URL that will allow anyone to route to your specific SolPG workspace.
    • Share this link with the instructor!

Sharing Your Workspace from Your Local Setup

  • Currently the best way to do this is by using GitHub.
    • You can push your most recent changes up to GitHub
    • Share the link with the instructor
    • Instructor can import the project into his/her SolPG instance

Resources for Learning Solana Development

Web-based IDE

Wallets

Local Toolkit Installation

dApp & Program Development

Additional Tools

About

A Collection of Solana dApps for workshops!

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published