Series I NEAR Blockchain Tutorial
Series II Solana Blockchain Tutorial
Series III Substrate Blockchain Tutorial
Series IV Elrond Blockchain Tutorial
These video-based(youtube) tutorials attempt to choose something somewhat challenging but at the same time go at a slow pace and try to go over basics.
The approach is to:
- constantly ask "what, why, how"
- try the most minimalist code unless it doesn't make sense to
- use the "onion" - sometimes we go deep into one topic, and at other times it's very shallow but we cover various topics
Common Local Dev Environment Setup Steps
Between Part 1 and 2, we arrive at the conclusion to focus on Rust, and start with WASM blockchains.
The Re-make Of An Old Programmer - Part 1
This video delves into why I chose to learn decentralized blockchain programming (dApps)
Remaking An Old Programmer - Part 2: Why I chose Rust
Remake Old Programmer - Part 3: First Rust WASM Tutorial - Setup
We come across an online tutorial from NEAR and use that as our jumping-off point.
Once we'v gotten our local development environment set up, we work on our "smart contract" program that we will deploy and run on a NEAR testnet blockchain.
Remake Old Programmer - Part 4: Rust Basics - 1
Remake Old Programmer - Part 5: Rust Basics - 2: Struct, Mut
Remake Old Programmer - Part 6: Rust: Build WASM Smart Contract - Deploy To Blockchain
Remake Old Programmer-Part 7: Rust Crates,Import,Use Macros,Deploy Bin Vs Lib, WASI, Be Careful
Here is the code as we conclude this series.
Note that in this first series, we use only the "near-cli" tool to deploy and interact with our on-chain(deployed) smart-contract program.
We don't worry or are aware of what "magic" takes place that helps us interact with our deployed program.
In the next series we delve into the what/how of command-line client required to interact with a blockchain program.
This series differs from the NEAR blockchain series in several ways:
- We are deploying eBPF programs, not WASM
- We deploy to a local test blockchain
- We also delve into writing a command-line Node.js Javascript client
- We use VSCode to debug
Hopefully most of the youtube titles are self-explanatory.
Blockchain Programmer - Part 1: Intro To Solana, Account, Keypair, Test Validator
Blockchain Programmer - Part 2: How To Set Up Multiple Solana Test Validators
Blockchain Programmer - Part 3: How to Set Up Multiple WSL Ubuntu Environments
Here is the doc from this part 3.
Blockchain Programmer - Part 4: We Start Composing A Solana Node.js Cmd-Line Client
Blockchain Programmer - Part 6: Initial Build Of A Solana Rust On-Chain Program
Blockchain Programmer - Part 7: Deploy The Solana Rust On Chain Program
Blockchain Programmer-Part 8: Setup VSCode With Windows and WSL
Blockchain Programmer-Part 9: How To Find Example Code Snippets To Learn Solana, Web3.js
Blockchain Programmer-Part 10: Node.js Javascript Cmd-line Client Talks to Rust On-Chain Program
We finally have an initial success at getting our command-line client app to "tickle"(invoke) the "entry point" of our Rust on-chain program.
Here is the code as a result of arriving to Part 10.
Blockchain Programmer-Part 11: Pass Data Client To On-Chain Rust Prog | Multi-Version Deployments
In this video we learn how to
- display any data that is passed in from the client to the on-chain program
- control which program id (keypair) we wish to use when deploying an on-chain program
- deploy and run multiple versions of the program by which program id we use to invoke it
Here is the code from this part 11.
Useful commands:
solana config get
The above line shows you what your local config has. Two important values would be the URL (for this series -we are using localhost
) and the Keypair Path
.
solana-test-validator # keep this running in a terminal
I mostly run the above local validator in the current project directory. It creates a directory test-validator
. Make sure that your local config solana config get
is pointing to the correct wallet
.
I mostly run the local validator with the --reset
flag - starts fresh every time. Means you'll have to re-deploy your on-chain program AND you'll lose any accounts your client created.
solana logs # keep this running in another terminal
The above will display any output related to your on-chain deployed program, or certain command-line solana commands, such as deploy
.
solana program show --programs
The above line will let you know if your program(s) are currently deployed.
Blockchain Programmer-Part 12: Rust: Init Arrays | Conv To String | Cmd-Line Args | If-Else | Match
Here is the code from this part 12.
Blockchain Programmer-Part 13: Node.js Client Cmdline-Args to Solana On-Chain Program
Here is the code from this part 13.
Blockchain Programmer-Part 14: Node.js Client Cmd-line Args Keypair to Solana On-Chain Program
Here is the code from this part 14.
Blockchain Programmer-Part 15: Create Solana Account With Space For Persistent Custom Data
Here is the code from this part 15.
solana account <your account public key string here>
The above shows you information about a single account.
This one (below) might even be a better command. You get a list of accounts.
solana largest-accounts
Blockchain Programmer-Part 16: Rust Program Changes Solana Acct Value Via Command-Line
Here is the code from this part 16
Blockchain Programmer-Part 17: Run New Rust Program Against Solana Account With Space
Here is the code from this part 17.
Blockchain Programmer Part 18 Increment, Decrement, Reset Solana Counter
Here is the code from this part 18.
General Blockchain Programmer-Part 1: Setup For Substrate
Here is code and helpful stuff for this Part 1.
General Blockchain Programmer-Part 2: Repeat of Part 1 But With Docker
Here is code and helpful stuff for this Part 2.
General Blockchain Programmer-Part 3: Review Rust Libraries, Modules, Crates
Here is the code for Part 3.
General Blockchain Programmer-Part 4: Build Substrate Smart Contract in Rust Using Cargo-Contract
Here is the code and helpful stuff for Part 4.
The video is quite long because it tries to breakdown why is all of what is inside Cargo.toml and lib.rs necessary, as well as possible errors you might get.
General Blockchain Programmer-Part 5: Deploy, Instantiate, Call Rust Smart-Contract On Local Substrate Node
Here is the code and helpful stuff for Part 5.
General Blockchain Programmer-Part 6: Prep Rust Contract, Contracts-Node, and Client For Debug
Here is the code and helpful stuff for Part 6.
General Blockchain Programmer-Part 7: Javascript Client Interacts With Deployed Substrate Rust Contract
Here is the code and helpful stuff for Part 7.
General Blockchain Programmer-Part 8: Javascript Client, Substrate Rust Contract, MetaData, GasLimit, Debugging
Here is the code and helpful stuff for Part 8.
General Blockchain Programmer-Final: Javascript Client, Substrate Rust Contract "Counter", Return Data, Transactions, Balances
Here is the code and helpful stuff for Part 9.
Elrond Smart Contract Intro-Part 1: Setup For Elrond
Here is code and helpful stuff for this Part 1.