Skip to content

Source code and workshop to get educated on the Solana basics, including the basics of interacting with the blockchain using JavaScript/TypeScript using web3.js (v1)

Notifications You must be signed in to change notification settings

solana-developers/workshop-solana-basics

Repository files navigation

Solana Workshop: Solana Basics

Quick links to learn more

Tech stack used

  • uses TypeScript and NodeJS
  • npm (as the package manager)

Setup locally

  1. Clone this repo to your local system
  2. Install the packages via npm install

Recommended flow to explore this repo

After getting setup locally, we recommend exploring the code of the following files (in order):

Running the included Scripts

Once setup locally, you will be able to run the scripts included within this repo:

npx esrun ./scripts/<script>

0.basics.ts

A brief introduction to the Solana web3.js package. Demonstrating and explaining the commonly used portions of web3.js, including:

  • connections
  • keypairs
  • getting an account's SOL balance
  • reading data from the blockchain
  • account storage space and rent
  • recent blockhash

1.simpleTransaction.ts

Demonstrating how to build and send simple transactions to the blockchain using web3js. Including:

  • connecting to the blockchain
  • generating a new keypair
  • constructing a simple instruction
  • building and signing a transaction
  • sending and confirming that transaction

2.complexTransaction.ts

An introduction to more complex transactions using Solana web3.js. Demonstrates how to build a more complex transaction, with multiple instructions.

Resources

Checkout this comprehensive guide to setting up your local environment. The following resources my also be helpful:

About

Source code and workshop to get educated on the Solana basics, including the basics of interacting with the blockchain using JavaScript/TypeScript using web3.js (v1)

Topics

Resources

Stars

Watchers

Forks