Create an account


Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[Tut] How to Install the Solidity Compiler? [Overview + Videos]

#1
How to Install the Solidity Compiler? [Overview + Videos]

5/5 – (1 vote)

There are four major ways to install the Solidity compiler:

  1. Install Solidity Compiler via npm
  2. Install Solidity Compiler via Docker on Ubuntu
  3. Install Solidity Compiler via Source Code Compilation
  4. Install Solidity Compiler via Static Binary and Linux Packages

In this tutorial, we’ll have a quick look at each of them and give you a link to a more detailed resource so you can set up your Solidity compiler as quickly and efficiently as possible.

▶ Video: For your convenience, I embedded the video tutorial provided by our Solidity expert Matija so you don’t even need to leave this page.

Without further ado, let’s get started! ?

Method 1: Install Solidity Compiler via npm


YouTube Video

As you watch the video or go through this tutorial, feel free to download the following slides as well — for your convenience:

? Full Tutorial: How to Install the Solidity Compiler via npm?

Method 2: Install Solidity Compiler via Docker on Ubuntu


YouTube Video

Before we go into details about the Docker installation of solc, let’s first get introduced to what Docker is.

? Docker is an open platform for developing, shipping, and running applications… Docker provides the ability to package and run an application in a loosely isolated environment called a container… Containers are lightweight and contain everything needed to run the application, so you do not need to rely on what is currently installed on the host.

Source: https://docs.docker.com/get-started/overview/

There are some parts of the description I’ve deliberately left out (separated by the symbol …) because they’re not essential to our understanding of the technology.

? Full Tutorial: How to Install the Solidity Compiler via Docker on Ubuntu?

Method 3: Install Solidity Compiler via Source Code Compilation


YouTube Video

⚡ This is a very complex way to install the Solidity compiler and I wouldn’t recommend it for most people. Due to the complexity, I’ll only give a quick overview of the associated article (tutorial).

Feel free to dive into it after scanning through these three contributions:

  1. First, we listed and explained the software prerequisites needed for compiling a Solidity compiler. In some cases, we reached a complete explanation, and in others, we just gave a brief introductory explanation and announced an entire topic, such as in the case of the Satisfiability Modulo Theorem, SMT.
  2. Second, we installed the prerequisites by following the first part of a step-by-step tutorial. All the examples have been checked and validated at the time of writing the article, so I expect that we’ll be able to follow them without issues. We also concluded that a compilation process can in some cases take a substantial amount of time; it took almost 40 minutes to compile the z3 SMT solver on my machine.
  3. Third, we compiled a Solidity compiler following a step-by-step tutorial. I explained for each command example to broaden our learning process even outside of the strict scope of Solidity, to Linux (as far as we needed to go). Finally, when the compilation ended, we confirmed that our home-compiled Solidity compiler works at least as charming as the ones we’ve simply downloaded or installed in a precompiled state.

? Full Tutorial: How to Install the Solidity Compiler via Source Code Compilation?

Method 4: Install Solidity Compiler via Static Binary and Linux Packages


YouTube Video

You’ll just download the compiler’s static binary, or in short, binary, and simply run it, without any additional prerequisites or preparations required.

First, downloading the file solc-static-linux and giving it an executable privilege:

$ cd ~ && wget https://github.com/ethereum/solidity/rel...atic-linux
$ chmod +x ~/solc-static-linux

Second, running solc:

$ ~/solc-static-linux 1_Storage.sol -o output – abi – bin
Compiler run successful. Artifact(s) can be found in directory "output".

When checking our solidity_src directory, we’ll discover a new directory output, created by the Solidity compiler, containing both .abi and .bin files.

? Full Tutorial: How to Install the Solidity Compiler via Static Binary and Linux Packages?


Learn Solidity Course


Solidity is the programming language of the future.

It gives you the rare and sought-after superpower to program against the “Internet Computer”, i.e., against decentralized Blockchains such as Ethereum, Binance Smart Chain, Ethereum Classic, Tron, and Avalanche – to mention just a few Blockchain infrastructures that support Solidity.

In particular, Solidity allows you to create smart contracts, i.e., pieces of code that automatically execute on specific conditions in a completely decentralized environment. For example, smart contracts empower you to create your own decentralized autonomous organizations (DAOs) that run on Blockchains without being subject to centralized control.

NFTs, DeFi, DAOs, and Blockchain-based games are all based on smart contracts.

This course is a simple, low-friction introduction to creating your first smart contract using the Remix IDE on the Ethereum testnet – without fluff, significant upfront costs to purchase ETH, or unnecessary complexity.




https://www.sickgaming.net/blog/2022/09/...ew-videos/
Reply



Possibly Related Threads…
Thread Author Replies Views Last Post
  [Tut] How to Install xlrd in Python? xSicKxBot 0 40 12-01-2025, 01:23 AM
Last Post: xSicKxBot
  [Tut] How to Convert MIDI to MP3 in Python – A Quick Overview xSicKxBot 0 2,395 09-02-2023, 02:04 PM
Last Post: xSicKxBot
  [Tut] How to Integrate ChatGPT on Your Website Easily (Overview) xSicKxBot 0 1,510 05-18-2023, 01:20 AM
Last Post: xSicKxBot
  [Tut] PIP Install Django – A Helpful Illustrated Guide xSicKxBot 0 1,262 03-12-2023, 05:27 AM
Last Post: xSicKxBot
  [Tut] Solidity Scoping – A Helpful Guide with Video xSicKxBot 0 1,361 03-09-2023, 02:28 AM
Last Post: xSicKxBot
  [Tut] How to Install Pip? 5 Easy Steps xSicKxBot 0 1,205 02-28-2023, 06:55 AM
Last Post: xSicKxBot
  [Tut] $821,000 Ethereum Value per Solidity Developer xSicKxBot 0 1,316 02-01-2023, 03:38 PM
Last Post: xSicKxBot
  [Tut] Solidity Ether Units, Time Units, and Global Variables xSicKxBot 0 1,220 11-17-2022, 02:30 PM
Last Post: xSicKxBot
  [Tut] Solidity Bytes and String Arrays, Concat, Allocating Memory, and Array Literals xSicKxBot 0 1,201 10-25-2022, 09:13 AM
Last Post: xSicKxBot
  [Tut] Solidity Deep Dive — Syllabus + Video Tutorial Resources xSicKxBot 0 1,317 10-12-2022, 09:22 PM
Last Post: xSicKxBot

Forum Jump:


Users browsing this thread:
1 Guest(s)

Forum software by © MyBB Theme © iAndrew 2016