Web3 Developer Toolbox: Setting Up Web3 Development Environment (Ethereum/Solana)

Introduction:

Let’s embark on the foundational step towards becoming a Web3 developer by setting up your development environment.

This lesson will guide you through selecting an operating system, understanding essential tools, and installing the required software for Web3 development on Ethereum and Solana platforms.

Remember, watching the lesson video will offer a deeper understanding of this topic.

Learning Objectives:

By the end of this lesson, you will be able to:

  1. Choose the appropriate operating system for Web3 development.
  2. Understand the importance of the Terminal in Web3 development.
  3. Install and use Node.js through Node Version Manager (NVM).
  4. Set up package managers including PNPM, NPM, and Yarn.
  5. Select and configure the ideal Integrated Development Environment (IDE) for Web3, like VSCode.
  6. Understand the role of wallets and the distinction between Testnet/Devnet and Mainnet in blockchain development.

Lesson Video:


Essential Web3 Developer Toolbox

Here is a list of essential tools needed for setting up a Web3 development environment, especially for beginners who are new to coding (if you have been coding before, then you will likely have most of the tools):

1. Operating System (OS):

  • Linux (Ubuntu): Highly recommended for its compatibility with blockchain tools. Can be dual-booted with Windows.
  • macOS: Also suitable for Web3 development.
  • Windows with WSL (Windows Subsystem for Linux): If using Windows, WSL is advised to overcome some compatibility issues.

I personally recommend Linux Ubuntu over Windows if you do not have MAC.

You can install Linux Ubuntu alongside your existing Windows OS, so that you can continue to use Windows for your other day-to-day tasks and switch to Linux Ubuntu whenever you want to code or do any web3 development tasks.

Even though Windows have WSL (Linux boxed within Windows), you will still likely get stressed with a lot of incompatibility issues with Web3 tools. Thus, your best option is Linux running as its own standalone OS not boxed in Windows via WSL or other virtual boxes.

After using Windows for every tasks including development for about 14 years. I finally switched to Linux Ubuntu for all my development task (and most of my day-to-day activities including creating courses like this on dPU) in early 2022 and sincerely regretted why it took me so long to switch because it ended years of struggling with incompatibilities issues with a lot of web3 development tools.

Installation Guide:

2. Terminal:

  • A command-line interface that allows developers to interact with the operating system and execute commands. It’s crucial for installing software, running scripts, and blockchain interactions.
  • Installation Guide: Once you install Linux Ubuntu, Terminal is bundled in by default. So, no need to install it separately.

3. Git/GitHub:

  • Git: A version control system to track changes in your codebase.
  • Git Installation Guide: To install Git, visit the Git Official Installation Guide for detailed instructions on various operating systems.
  • GitHub: An online platform to host and manage your Git repositories, collaborate, and share code.

More details on Git/Github in the next lesson dedicated to them.

4. Node.js:

  • A JavaScript runtime that is essential for running JavaScript code outside a web browser. It’s crucial for Web3 development.
  • NVM (Node Version Manager): Recommended for installing Node.js, allowing easy switching between different Node.js versions.
  • NVM (Node Version Manager): For installing and updating NVM, refer to the official NVM GitHub page.

5. Package Managers:

  • PNPM: Efficient and fast, preferred for managing project dependencies.
  • To install PNPM, follow the instructions on the PNPM Official Installation Page.
  • NPM: Node Package Manager, widely used and comes with Node.js.
  • No need to install separately because it auto installed once you have Nodejs installed.
  • Yarn: Another popular package manager that can be used as an alternative to NPM.
  • Installation instructions for Yarn can be found on the Yarn Official Installation Page.

6. Blockchain CLI Tools:

  • Depends on the blockchain platform you’re developing for. For instance, Ethereum developers might use Truffle or Hardhat, while Solana developers would use the Solana CLI.

Solana Development Environment Setup

I have a complete guide for you below with video to setup all essential tools for Solana development using Solang Solidity.

Setting Up Solang Solidity And Solana Development Environment

7. Wallet:

  • A digital wallet to interact with blockchain networks.
  • For Ethereum, MetaMask is a popular choice.
  • For Solana, wallets like Phantom or Solflare can be used.

The next lesson will guide further on wallet.

8. Integrated Development Environment (IDE):

  • Visual Studio Code (VSCode): Highly recommended for its extensive support for programming languages and blockchain development tools.
  • For setting up VSCode, refer to the Visual Studio Code Setup Guide.

9. Text Editor:

  • In case you prefer a lightweight editor, options like Atom or Sublime Text can be used, though VSCode is generally sufficient and more integrated.

10. Web Browser:

  • A modern web browser like Google Chrome or Firefox, preferably with support for blockchain wallet extensions (like MetaMask).

11. Blockchain Networks Access:

  • Access to Testnet/Devnet and Mainnet for the blockchain you’re working on. This might involve setting up accounts or obtaining test tokens for development and testing purposes.
  • These tools form the backbone of a Web3 developer’s environment, catering to different aspects of blockchain development from coding and testing to deployment and interaction with the blockchain.

The next lesson will guide further on wallet and Blockchain networks like testnet/devnet and mainnet.

12. Development Frameworks:

  • Depending on the blockchain, frameworks like
  • Truffle (Ethereum),
  • Anchor (Solana), or others may be necessary.

Conclusion:

These tools form the backbone of a Web3 development environment, catering to various aspects of blockchain development from writing and testing code to deploying and interacting with smart contracts and dApps.

Setting up a robust Web3 development environment is a critical first step for aspiring blockchain developers.

This lesson has guided you through selecting an OS, understanding the Terminal, installing Node.js, choosing package managers, configuring your IDE, and differentiating between blockchain networks. With this foundation, you’re well on your way to developing on Ethereum, Solana, and other blockchain platforms.


Support:

If you need help with this lesson, questions, suggestions and improvement. The best way to get help is to use the comment below:
1. First check existing comments if your questions have been answered before posting.
2. If no existing related question with an answer, then you can post a new one (kindly avoid duplicating previously asked and answered questions).

NOTE: This is the most recommended way of getting support directly from the instructor of this course. Posting on other platforms like Discord may get support from other community members and not from the course instructor directly.

Images|Videos|Links: To support your question with a screenshot, Github repo link or other media, kindly upload it somewhere online like Drive/Dropbox or Github (for codes) first, then post the link to it in your comment. Please do not upload media/codes directly, it may fail or cause your comment to be deleted.

Please ONLY post questions that are specific to this lesson not the entire course to ensure others can find it helpful. Each lesson allows comments relating to it ONLY. Off-lesson questions will be deleted even if they relate to this course as a whole but as long as they are not specific to this lesson, they are not allowed.

19 Comments
Collapse Comments

Please sir, can I use gitbash in place of Ubuntu because both of them are almost the same?

If the answer is no, can my 4gram be able to able to carry all the whole installations?

Solomon Foskaay (Administrator) January 27, 2024 at 10:12 am

(1) Gitbash isn’t the same as Linux Ubuntu. Meanwhile, I had no experience with Gitbash. As long as it is run in Windows OS, you will likely still get stuck somewhere in your web3 dev journey later. So, it is better to get things right now and reduce wasting time on resolving compatibility issues instead of focusing on development in future.

(4) Yes 4GM RAM can, in fact when installing you can dedicate like 8GB-20GB to a RAM-like aspect of Linux Ubuntu and it will run on it as a RAM extension when your RAM is fully used.

As a developer, I advise you to upgrade your RAM to at least 8GB to 16GB. 4GB is too low even for basic tasks and makes your PC slower.

NOTE: You can watch the installation guide on YouTube for detailed guidance on installing Linux Ubuntu side-by-side with a Windows OS known as dual booting.

Thank you so much sir. I really appreciate 🙏

In the installation of Linux Ubuntu is it advisable to install from Windows? If installing from Windows is it advisable to use an automatic installation process using Wubi installer? I do not want to face compatibility issues during coding please explain.

Solomon Foskaay (Administrator) January 27, 2024 at 10:16 am

No, based on my experience. The best option is to use a bootable device like CD, Flash drive, external HDD etc. which has the bootable Linux Ubuntu OS in it. Running it from Windows may create issues especially if it’s a new PC with Windows Locker.

NOTE: You can search and watch the installation guide on YouTube for detailed guidance on installing Linux Ubuntu side-by-side with a Windows OS known as dual booting.

Pls is there a video on how to install all those tools?
And also, I have a virtual machine (VMware) installed and I have Kali Linux in it, is that good to go?

Solomon Foskaay (Administrator) January 29, 2024 at 12:33 pm

(1) For other web3 tools, watch the lesson video above and follow the links to other articles and videos under each tool. For example, if follow the link in the Blockchain CLI tools for Solana, it contains videos to install each of the web3 dev tools for Solana.

(2) For Linux Ubuntu OS installation, I don’t have the video. Maybe in the future (not promising), I will complete an abandoned video I did on it and never completed and published yet. For now, you need to search on YouTube for videos to guide you on the Linux Ubuntu installation.

(3) I have said this repeatedly, a virtual machine is not the same as a standalone full Linux Ubuntu OS. You can give it a try but understand that, I will not be able to provide support in case you get stuck later when installing the web3 tools.

I found this helpful in installing Ubuntu along side window 10 on my machine. Ubuntu/Window Dual Boot Video https://www.youtube.com/watch?v=u5QyjHIYwTQ

Solomon Foskaay (Administrator) January 31, 2024 at 8:37 am

Cool. This would help other students going through this lesson and comments.
Thanks for sharing!

Hello sir, is there anyway to install apps like chrome on the Ubuntu OS without using the terminal, it requires code to install, which I can’t do, is there anyway to by-pass that???

Solomon Foskaay (Administrator) February 26, 2024 at 7:30 am

You can download Google Chrome for Linux ubuntu directly from chrome official website to install without code . Follow this guide:
https://support.google.com/chrome/a/answer/9025903?hl=en

please when I ran the command,
solana airdrop 2, I got this error; and I have installed all the other tools successfully
“`
Requesting airdrop of 3 SOL
Error: RPC request error: cluster version query failed: error sending request for url (http://localhost:8899/): error trying to connect: tcp connect error: Connection refused (os error 111)
“`
I am running on Zorin OS which is a linux Ubuntu distro

Solomon Foskaay (Administrator) May 13, 2024 at 12:18 pm

1. You might not be on Solana Devnet. When installed Solana CLI, its defaults to Mainnet. You need to switch to devnet and then try the airdrop again.

To check the current Solana cluster, you can use the command:
“solana config get”.

To switch to the Devnet cluster if discovered that it was in Mainnet, you can use the command:
“solana config set –url devnet”.

NOTE: Ensure you do above even if want to use option 2 below because you need to be in Devnet for future development commands to work.

2. You can also get Devnet SOL from faucet mentioned in the next lesson at “Getting Devnet Sol For Solana Development”.
https://dprogramminguniversity.com/freecourses/ai-enhanced-web3-blockchain-development-101-course/freelessons/blockchain-wallets-networks-mainnet-testnet-your-gateway-to-web3-development/

I have now configured it to a devnet, I have airdropped and got 2 SOL, though trying to get more was giving an error of limit reached. Thank you sir, let me proceed

Solomon Foskaay (Administrator) May 15, 2024 at 5:15 am

Am glad to hear that my previous response was helpful to fix the issue!
Keep moving!

“`
Compiling num_enum v0.6.1
Compiling num-derive v0.3.3
Compiling time v0.3.29
error[E0282]: type annotations needed for `Box`
–> /home/emperor/.cargo/registry/src/index.crates.io-6f17d22bba15001f/time-0.3.29/src/format_description/parse/mod.rs:83:9
|
83 | let items = format_items
| ^^^^^

86 | Ok(items.into())
| —- type must be known at this point
|
help: consider giving `items` an explicit type, where the placeholders `_` are specified
|
83 | let items: Box = format_items
| ++++++++

Compiling solana-version v1.18.17
Compiling zstd-safe v5.0.2+zstd.1.5.2
Compiling bitflags v1.3.2
For more information about this error, try `rustc –explain E0282`.
error: could not compile `time` (lib) due to 1 previous error
warning: build failed, waiting for other jobs to finish…
error: failed to compile `anchor-cli v0.30.1 (https://github.com/coral-xyz/anchor?tag=v0.30.1#e6d7dafe)`, intermediate artifacts can be found at `/tmp/cargo-install1YUUmP`.
To reuse those artifacts with a future compilation, set the environment variable `CARGO_TARGET_DIR` to that path.
Error: Failed to install 0.30.1, is it a valid version?
“`
Please I am getting this error when trying to install anchor with my ubuntu terminal. I have avm and yarn and every other tool installed already

Solomon Foskaay (Administrator) August 21, 2024 at 3:04 pm

What command did you run that gave the above error please?

It was
avm install latest

Solomon Foskaay (Administrator) August 21, 2024 at 5:07 pm

You can follow this guide:
https://dprogramminguniversity.com/solana/ultimate-guide-to-solidity-for-solana-programs-development-with-solang-and-anchor/#75_Installing_and_Configuring_Anchor_Framework_For_Solidity_on_Solana_Development_Linux_MacOS_Windows

NOTE: You need to follow the commands on the official link added to the guide in link above.
Also, you may need to first use the uninstall command, and then restart theAVM and anchor installation afresh to fix the issues

Leave a Comment

By using this website you agree to accept our Privacy Policy and Terms & Conditions