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]

<div>
<div class="kk-star-ratings kksr-auto kksr-align-left kksr-valign-top" data-payload="{&quot;align&quot;:&quot;left&quot;,&quot;id&quot;:&quot;716526&quot;,&quot;slug&quot;:&quot;default&quot;,&quot;valign&quot;:&quot;top&quot;,&quot;ignore&quot;:&quot;&quot;,&quot;reference&quot;:&quot;auto&quot;,&quot;class&quot;:&quot;&quot;,&quot;count&quot;:&quot;1&quot;,&quot;readonly&quot;:&quot;&quot;,&quot;score&quot;:&quot;5&quot;,&quot;best&quot;:&quot;5&quot;,&quot;gap&quot;:&quot;5&quot;,&quot;greet&quot;:&quot;Rate this post&quot;,&quot;legend&quot;:&quot;5\/5 - (1 vote)&quot;,&quot;size&quot;:&quot;24&quot;,&quot;width&quot;:&quot;142.5&quot;,&quot;_legend&quot;:&quot;{score}\/{best} - ({count} {votes})&quot;,&quot;font_factor&quot;:&quot;1.25&quot;}">
<div class="kksr-stars">
<div class="kksr-stars-inactive">
<div class="kksr-star" data-star="1" style="padding-right: 5px">
<div class="kksr-icon" style="width: 24px; height: 24px;"></div>
</p></div>
<div class="kksr-star" data-star="2" style="padding-right: 5px">
<div class="kksr-icon" style="width: 24px; height: 24px;"></div>
</p></div>
<div class="kksr-star" data-star="3" style="padding-right: 5px">
<div class="kksr-icon" style="width: 24px; height: 24px;"></div>
</p></div>
<div class="kksr-star" data-star="4" style="padding-right: 5px">
<div class="kksr-icon" style="width: 24px; height: 24px;"></div>
</p></div>
<div class="kksr-star" data-star="5" style="padding-right: 5px">
<div class="kksr-icon" style="width: 24px; height: 24px;"></div>
</p></div>
</p></div>
<div class="kksr-stars-active" style="width: 142.5px;">
<div class="kksr-star" style="padding-right: 5px">
<div class="kksr-icon" style="width: 24px; height: 24px;"></div>
</p></div>
<div class="kksr-star" style="padding-right: 5px">
<div class="kksr-icon" style="width: 24px; height: 24px;"></div>
</p></div>
<div class="kksr-star" style="padding-right: 5px">
<div class="kksr-icon" style="width: 24px; height: 24px;"></div>
</p></div>
<div class="kksr-star" style="padding-right: 5px">
<div class="kksr-icon" style="width: 24px; height: 24px;"></div>
</p></div>
<div class="kksr-star" style="padding-right: 5px">
<div class="kksr-icon" style="width: 24px; height: 24px;"></div>
</p></div>
</p></div>
</div>
<div class="kksr-legend" style="font-size: 19.2px;"> 5/5 – (1 vote) </div>
</div>
<p>There are four major ways to install the Solidity compiler:</p>
<ol>
<li><a rel="noreferrer noopener" href="https://blog.finxter.com/how-to-install-the-solidity-compiler-with-npm/" target="_blank">Install Solidity Compiler via npm</a></li>
<li><a rel="noreferrer noopener" href="https://blog.finxter.com/how-to-install-the-solidity-compiler-via-docker-on-ubuntu/" target="_blank">Install Solidity Compiler via Docker on Ubuntu</a></li>
<li><a rel="noreferrer noopener" href="https://blog.finxter.com/how-to-install-the-solidity-compiler-via-source-code-compilation/" target="_blank">Install Solidity Compiler via Source Code Compilation</a></li>
<li><a rel="noreferrer noopener" href="https://blog.finxter.com/how-to-install-the-solidity-compiler-via-static-binary-and-linux-packages/" target="_blank">Install Solidity Compiler via Static Binary and Linux Packages</a></li>
</ol>
<p>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.</p>
<p class="has-global-color-8-background-color has-background"><img src="https://s.w.org/images/core/emoji/14.0.0/72x72/25b6.png" alt="▶" class="wp-smiley" style="height: 1em; max-height: 1em;" /> <strong>Video</strong>: For your convenience, I embedded the video tutorial provided by our Solidity expert <a href="https://blog.finxter.com/author/matijahorvat/" data-type="URL" data-id="https://blog.finxter.com/author/matijahorvat/" target="_blank" rel="noreferrer noopener">Matija</a> so you don’t even need to leave this page.</p>
<p>Without further ado, let’s get started! <img src="https://s.w.org/images/core/emoji/14.0.0/72x72/1f449.png" alt="?" class="wp-smiley" style="height: 1em; max-height: 1em;" /> </p>
<h2>Method 1: Install Solidity Compiler via npm</h2>
<figure class="wp-block-embed-youtube wp-block-embed is-type-video is-provider-youtube"><a href="https://blog.finxter.com/how-to-install-the-solidity-compiler-overview-videos/"><img src="https://blog.finxter.com/wp-content/plugins/wp-youtube-lyte/lyteCache.php?origThumbUrl=https%3A%2F%2Fi.ytimg.com%2Fvi%2FbkeP7nb7tWU%2Fhqdefault.jpg" alt="YouTube Video"></a><figcaption></figcaption></figure>
<p>As you watch the video or go through this tutorial, feel free to download the following slides as well — for your convenience:</p>
<div class="wp-block-file"><object class="wp-block-file__embed" data="https://blog.finxter.com/wp-content/uploads/2022/08/Finxter-Solidity-Slides-Install-Compiler-NPM.pdf" type="application/pdf" style="width:100%;height:600px" aria-label="Embed of Finxter-Solidity-Slides-Install-Compiler-NPM."></object><a id="wp-block-file--media-f311a2a2-52b1-48e5-996a-c94304373a5a" href="https://blog.finxter.com/wp-content/uploads/2022/08/Finxter-Solidity-Slides-Install-Compiler-NPM.pdf">Finxter-Solidity-Slides-Install-Compiler-NPM</a><a href="https://blog.finxter.com/wp-content/uploads/2022/08/Finxter-Solidity-Slides-Install-Compiler-NPM.pdf" class="wp-block-file__button" download aria-describedby="wp-block-file--media-f311a2a2-52b1-48e5-996a-c94304373a5a">Download</a></div>
<p class="has-base-background-color has-background"><img src="https://s.w.org/images/core/emoji/14.0.0/72x72/1f449.png" alt="?" class="wp-smiley" style="height: 1em; max-height: 1em;" /> <strong>Full Tutorial:</strong> <a href="https://blog.finxter.com/how-to-install-the-solidity-compiler-with-npm/" data-type="URL" data-id="https://blog.finxter.com/how-to-install-the-solidity-compiler-with-npm/" target="_blank" rel="noreferrer noopener">How to Install the Solidity Compiler via npm?</a></p>
<h2>Method 2: Install Solidity Compiler via Docker on Ubuntu</h2>
<figure class="wp-block-embed-youtube wp-block-embed is-type-video is-provider-youtube"><a href="https://blog.finxter.com/how-to-install-the-solidity-compiler-overview-videos/"><img src="https://blog.finxter.com/wp-content/plugins/wp-youtube-lyte/lyteCache.php?origThumbUrl=https%3A%2F%2Fi.ytimg.com%2Fvi%2FjT9DK2kmoEQ%2Fhqdefault.jpg" alt="YouTube Video"></a><figcaption></figcaption></figure>
<div class="wp-block-file"><object class="wp-block-file__embed" data="https://blog.finxter.com/wp-content/uploads/2022/08/Solidity-Blog-Finxter-Compiler-Docker.pdf" type="application/pdf" style="width:100%;height:600px" aria-label="Embed of Solidity-Blog-Finxter-Compiler-Docker."></object><a id="wp-block-file--media-fbab0f45-d7f4-459d-b8f2-41c3b8a2109b" href="https://blog.finxter.com/wp-content/uploads/2022/08/Solidity-Blog-Finxter-Compiler-Docker.pdf">Solidity-Blog-Finxter-Compiler-Docker</a><a href="https://blog.finxter.com/wp-content/uploads/2022/08/Solidity-Blog-Finxter-Compiler-Docker.pdf" class="wp-block-file__button" download aria-describedby="wp-block-file--media-fbab0f45-d7f4-459d-b8f2-41c3b8a2109b">Download</a></div>
</p>
<p>Before we go into details about the Docker installation of <code>solc</code>, let’s first get introduced to what Docker is. </p>
<p class="has-global-color-8-background-color has-background"><img src="https://s.w.org/images/core/emoji/14.0.0/72x72/1f4a1.png" alt="?" class="wp-smiley" style="height: 1em; max-height: 1em;" /> <em><strong>Docker</strong> 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.</em></p>
<p><strong>Source</strong>: <a rel="noreferrer noopener" href="https://docs.docker.com/get-started/overview/" target="_blank"><em>https://docs.docker.com/get-started/overview/</em></a></p>
<p>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. </p>
<p class="has-base-background-color has-background"><img src="https://s.w.org/images/core/emoji/14.0.0/72x72/1f449.png" alt="?" class="wp-smiley" style="height: 1em; max-height: 1em;" /> <strong>Full Tutorial:</strong> <a href="https://blog.finxter.com/how-to-install-the-solidity-compiler-via-docker-on-ubuntu/" data-type="URL" data-id="https://blog.finxter.com/how-to-install-the-solidity-compiler-via-docker-on-ubuntu/" target="_blank" rel="noreferrer noopener">How to Install the Solidity Compiler via Docker on Ubuntu?</a></p>
<h2>Method 3: Install Solidity Compiler via Source Code Compilation</h2>
<figure class="wp-block-embed-youtube wp-block-embed is-type-video is-provider-youtube"><a href="https://blog.finxter.com/how-to-install-the-solidity-compiler-overview-videos/"><img src="https://blog.finxter.com/wp-content/plugins/wp-youtube-lyte/lyteCache.php?origThumbUrl=https%3A%2F%2Fi.ytimg.com%2Fvi%2FqMzI8v9kYSc%2Fhqdefault.jpg" alt="YouTube Video"></a><figcaption></figcaption></figure>
<p class="has-global-color-8-background-color has-background"><img src="https://s.w.org/images/core/emoji/14.0.0/72x72/26a1.png" alt="⚡" class="wp-smiley" style="height: 1em; max-height: 1em;" /> 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). </p>
<p>Feel free to dive into it after scanning through these three contributions:</p>
<ol>
<li>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.</li>
<li>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.</li>
<li>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.</li>
</ol>
<p class="has-base-background-color has-background"><img src="https://s.w.org/images/core/emoji/14.0.0/72x72/1f449.png" alt="?" class="wp-smiley" style="height: 1em; max-height: 1em;" /> <strong>Full Tutorial:</strong> <a href="https://blog.finxter.com/how-to-install-the-solidity-compiler-via-source-code-compilation/" data-type="URL" data-id="https://blog.finxter.com/how-to-install-the-solidity-compiler-via-source-code-compilation/" target="_blank" rel="noreferrer noopener">How to Install the Solidity Compiler via Source Code Compilation?</a></p>
<h2>Method 4: Install Solidity Compiler via Static Binary and Linux Packages</h2>
<figure class="wp-block-embed-youtube wp-block-embed is-type-video is-provider-youtube"><a href="https://blog.finxter.com/how-to-install-the-solidity-compiler-overview-videos/"><img src="https://blog.finxter.com/wp-content/plugins/wp-youtube-lyte/lyteCache.php?origThumbUrl=https%3A%2F%2Fi.ytimg.com%2Fvi%2FAtNI6J3TB7U%2Fhqdefault.jpg" alt="YouTube Video"></a><figcaption></figcaption></figure>
<p>You’ll just download the compiler’s static binary, or in short, binary, and simply run it, without any additional prerequisites or preparations required. </p>
<p>First, downloading the file <code><a rel="noreferrer noopener" href="https://github.com/ethereum/solidity/releases" data-type="URL" data-id="https://github.com/ethereum/solidity/releases" target="_blank">solc-static-linux</a></code> and giving it an executable privilege:</p>
<pre class="EnlighterJSRAW" data-enlighter-language="generic" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group="">$ cd ~ &amp;&amp; wget https://github.com/ethereum/solidity/rel...atic-linux
$ chmod +x ~/solc-static-linux</pre>
<p>Second, running <code>solc</code>:</p>
<pre class="EnlighterJSRAW" data-enlighter-language="generic" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group="">$ ~/solc-static-linux 1_Storage.sol -o output – abi – bin
Compiler run successful. Artifact(s) can be found in directory "output".
</pre>
<p>When checking our <code>solidity_src</code> directory, we’ll discover a new directory output, created by the Solidity compiler, containing both <code>.abi</code> and <code>.bin</code> files.</p>
<p class="has-base-background-color has-background"><img src="https://s.w.org/images/core/emoji/14.0.0/72x72/1f449.png" alt="?" class="wp-smiley" style="height: 1em; max-height: 1em;" /> <strong>Full Tutorial:</strong> <a href="https://blog.finxter.com/how-to-install-the-solidity-compiler-via-static-binary-and-linux-packages/" data-type="URL" data-id="https://blog.finxter.com/how-to-install-the-solidity-compiler-via-static-binary-and-linux-packages/" target="_blank" rel="noreferrer noopener">How to Install the Solidity Compiler via Static Binary and Linux Packages?</a></p>
<hr class="wp-block-separator has-alpha-channel-opacity"/>
<h2><a href="https://academy.finxter.com/university/solidity-basics/" target="_blank" rel="noreferrer noopener" title="https://academy.finxter.com/university/solidity-basics/">Learn Solidity Course</a></h2>
<p>Solidity is the programming language of the future.</p>
<p>It gives you the rare and sought-after superpower to program against the “Internet Computer”, i.e., against decentralized Blockchains such as <em>Ethereum</em>, <em>Binance Smart Chain</em>, <em>Ethereum Classic</em>, <em>Tron</em>, and <em>Avalanche </em> – to mention just a few Blockchain infrastructures that support Solidity.</p>
<p>In particular, Solidity allows you to<em> create smart contracts</em>, 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 <em>decentralized autonomous organizations</em> (DAOs) that run on Blockchains without being subject to centralized control.</p>
<p>NFTs, DeFi, DAOs, and Blockchain-based games are all based on smart contracts.</p>
<p><a href="https://academy.finxter.com/university/solidity-basics/" target="_blank" rel="noreferrer noopener" title="https://academy.finxter.com/university/solidity-basics/">This course</a> 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.</p>
<div class="wp-block-image">
<figure class="aligncenter size-full is-resized"><a href="https://academy.finxter.com/university/solidity-basics/" target="_blank" rel="noopener"><img loading="lazy" src="https://blog.finxter.com/wp-content/uploads/2021/10/image-121.png" alt="" class="wp-image-37299" width="491" height="287" srcset="https://blog.finxter.com/wp-content/uploads/2021/10/image-121.png 982w, https://blog.finxter.com/wp-content/uplo...00x175.png 300w, https://blog.finxter.com/wp-content/uplo...68x448.png 768w" sizes="(max-width: 491px) 100vw, 491px" /></a></figure>
</div>
</div>


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



Forum Jump:


Users browsing this thread:
2 Guest(s)

Forum software by © MyBB Theme © iAndrew 2016