<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Ali Murtaza Memon</title>
    <description>The latest articles on DEV Community by Ali Murtaza Memon (@alymurtazamemon).</description>
    <link>https://dev.to/alymurtazamemon</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F945874%2F4111757e-f05d-4746-99a5-d9d878b12672.png</url>
      <title>DEV Community: Ali Murtaza Memon</title>
      <link>https://dev.to/alymurtazamemon</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/alymurtazamemon"/>
    <language>en</language>
    <item>
      <title>How does Chainlink collect data from Off-Chain Sources? — Data Feeds Explained</title>
      <dc:creator>Ali Murtaza Memon</dc:creator>
      <pubDate>Sat, 01 Apr 2023 16:28:58 +0000</pubDate>
      <link>https://dev.to/alymurtazamemon/how-does-chainlink-collect-data-from-off-chain-sources-data-feeds-explained-540m</link>
      <guid>https://dev.to/alymurtazamemon/how-does-chainlink-collect-data-from-off-chain-sources-data-feeds-explained-540m</guid>
      <description>&lt;p&gt;Smart contracts are an exciting innovation in the blockchain space that enables the automated and trustless execution of complex agreements between parties. However, smart contracts are limited by their inability to access off-chain data, which can have a significant impact on the outcome of the contract. That’s where Chainlink’s Data Feeds come in.&lt;/p&gt;

&lt;p&gt;Chainlink Data Feeds provide secure and reliable access to real-world data sources that smart contracts need to function correctly. This allows smart contracts to access off-chain data, such as market prices, weather conditions, or other external events that can impact the contract’s outcome. By integrating Chainlink’s Data Feeds, smart contracts can execute more complex use cases and unlock new possibilities that were previously impossible.&lt;/p&gt;

&lt;p&gt;In this blog, we will take a closer look at Chainlink’s approach to collecting data from off-chain sources, the role of consensus in ensuring data accuracy, and how this data is provided to smart contracts. We’ll explore how Chainlink’s Data Feeds are helping to unlock new possibilities in decentralized applications.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Related Article&lt;/strong&gt;&lt;br&gt;
&lt;strong&gt;&lt;a href="https://dev.to/alymurtazamemon/what-are-oracles-how-is-chainlink-leading-to-provide-optimal-solutions-5fkl"&gt;What are Oracles? &amp;amp; How is Chainlink Leading to Provide Optimal Solutions?&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  CHAINLINK ARCHITECTURE
&lt;/h2&gt;

&lt;p&gt;Chainlink uses two architectural models such as the &lt;strong&gt;Off-Chain Reporting&lt;/strong&gt; and &lt;strong&gt;Decentralized Data Model&lt;/strong&gt;, to retrieve data from off-chain sources and transfer it to smart contracts.&lt;/p&gt;

&lt;h3&gt;
  
  
  Off-Chain Reporting
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F6cjabkikgcwuayvovjij.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F6cjabkikgcwuayvovjij.png" alt="Off-Chain Reporting" width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Chainlink leverages Off-Chain Reporting (OCR) to ensure decentralized data collection from off-chain sources. OCR involves multiple node operators who are responsible for providing data for specific data feeds. Protocol execution occurs predominantly off-chain over a peer-to-peer network between Chainlink nodes. The nodes periodically elect a new leader node, which drives the remainder of the protocol. During communication, a lightweight consensus algorithm runs in which each node reports its data observation and signs it.&lt;/p&gt;

&lt;p&gt;The leader node routinely requests followers to provide freshly signed observations, which it aggregates into a report. It then sends this report back to the followers and asks them to verify its validity. If a required number of followers approve the report by sending a signed copy back to the leader, the leader assembles a final report with the quorum’s signatures.&lt;/p&gt;

&lt;p&gt;Subsequently, the leader node submits a transaction with the aggregated report to the on-chain aggregator. Each report comprises many nodes’ observations and must be signed by a quorum of nodes.&lt;/p&gt;

&lt;p&gt;All nodes monitor the blockchain for the final report to eliminate any single point of failure during transmission. If the designated node fails to confirm its transmission within a specified period, a round-robin protocol takes effect so that other nodes can also transmit the final report until one of them is confirmed.&lt;/p&gt;

&lt;p&gt;Submitting only one transaction per round delivers numerous advantages, including reduced network congestion from Chainlink oracle networks, lower gas costs for individual node operators, improved scalability for node networks, and more timely updates for data feeds, as each round no longer needs to wait for multiple transactions to confirm before a price is confirmed on-chain.&lt;/p&gt;

&lt;h3&gt;
  
  
  Decentralized Data Model
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F1921ch6xve06zt43s8cb.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F1921ch6xve06zt43s8cb.png" alt="Decentralized Data Model" width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The decentralized Oracle network contains three components:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;An Aggregator Contract&lt;/li&gt;
&lt;li&gt;A Proxy Contract&lt;/li&gt;
&lt;li&gt;A Consumer Contract&lt;/li&gt;
&lt;/ol&gt;

&lt;h4&gt;
  
  
  An Aggregator Contract
&lt;/h4&gt;

&lt;p&gt;After the report is conveyed to the on-chain aggregator, it undergoes a verification process wherein the aggregator confirms that a requisite number of nodes have signed the report and also checks the validity of these signatures. Subsequently, the aggregator publishes the median value to the consumer contracts along with a block timestamp and a round ID.&lt;/p&gt;

&lt;p&gt;Aggregators are updated by the oracle network only if one of two threshold conditions is met:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Deviation Threshold:&lt;/strong&gt; A new aggregation round is initiated by the nodes when the off-chain value of a price feed deviates from the on-chain value by an amount greater than the defined deviation threshold (each price feed has a different deviation threshold value which you can see at &lt;a href="https://data.chain.link/" rel="noopener noreferrer"&gt;data.chain.link&lt;/a&gt;). This ensures that the updated values of the price feed are accurately reflected on-chain. For example, in the case of ETH/USD if the off-chain price deviates from 0.5 % then the new data aggregation round starts and repeats the same process.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Heartbeat Threshold:&lt;/strong&gt; In addition to the deviation threshold, a new data aggregation round is also initiated when the heartbeat threshold is reached, even if the price deviation remains within the deviation threshold. The heartbeat threshold is the specified time interval between two consecutive data updates.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h4&gt;
  
  
  A Consumer Contract
&lt;/h4&gt;

&lt;p&gt;The consumers are our smart contracts which inherit the aggregator interface (for example &lt;code&gt;AggregatorV3Interface&lt;/code&gt;) and calls one of the exposed functions of the data to feed the aggregator.&lt;/p&gt;

&lt;h4&gt;
  
  
  A Proxy Contract
&lt;/h4&gt;

&lt;p&gt;Proxy contracts are on-chain proxies that point to the aggregator for a particular data feed. Using proxies enables the underlying aggregator to be upgraded without any service interruption to consuming contracts.&lt;/p&gt;

&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;In conclusion, Chainlink provides a decentralized infrastructure that enables smart contracts to securely access off-chain data sources. This is achieved through a network of independent node operators that retrieve and verify data from various sources. By using a decentralized approach, Chainlink eliminates the single point of failure and ensures the reliability and accuracy of the data. This allows smart contracts to be executed with confidence, unlocking a wide range of new use cases and applications for blockchain technology.&lt;/p&gt;

&lt;p&gt;This comprehensive guide aims to provide assistance to developers of all skill levels and is intended to be beneficial for a wide range of developers. The information provided is intended to be easily understandable and actionable for all readers.&lt;/p&gt;

&lt;p&gt;If you found this content helpful, please consider giving it a clap and leaving any feedback for future improvements. Your suggestions and comments are greatly appreciated and will help make these articles even more valuable for you and other readers.&lt;/p&gt;

&lt;p&gt;Be sure to follow me to receive updates on my future articles and stay informed of new content.&lt;/p&gt;

&lt;p&gt;Thank you&lt;/p&gt;

&lt;p&gt;&lt;a class="mentioned-user" href="https://dev.to/alymurtazamemon"&gt;@alymurtazamemon&lt;/a&gt; &lt;/p&gt;

</description>
      <category>blockchain</category>
      <category>web3</category>
      <category>tutorial</category>
      <category>beginners</category>
    </item>
    <item>
      <title>Deploy Smart Contract On Any EVM Chain using thirdweb</title>
      <dc:creator>Ali Murtaza Memon</dc:creator>
      <pubDate>Fri, 24 Mar 2023 19:07:25 +0000</pubDate>
      <link>https://dev.to/alymurtazamemon/deploy-smart-contract-on-any-evm-chain-using-thirdweb-2a53</link>
      <guid>https://dev.to/alymurtazamemon/deploy-smart-contract-on-any-evm-chain-using-thirdweb-2a53</guid>
      <description>&lt;p&gt;“Exploring the Deployment of Smart Contracts on Various EVM Chains with thirdweb”&lt;/p&gt;

&lt;p&gt;Blockchain technology has opened up a new world of possibilities for developers to create decentralized applications that can revolutionize various industries. Smart contracts are an essential component of these decentralized applications as they enable developers to build trustless systems that can execute automatically without the need for intermediaries.&lt;/p&gt;

&lt;p&gt;Ethereum Virtual Machine (EVM) is a popular blockchain platform that supports the execution of smart contracts. However, with the rise of other EVM-compatible blockchain networks like Binance Smart Chain and Polygon, developers now have more options to choose from. In this blog, we will explore how to deploy smart contracts on various EVM chains using &lt;strong&gt;Thirdweb&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Thirdweb&lt;/strong&gt; is a &lt;strong&gt;blockchain infrastructure provider&lt;/strong&gt; that offers a suite of tools and services for developers to easily build and deploy decentralized applications (DApps) on various blockchain networks. It provides a user-friendly interface for interacting with blockchain networks, allowing developers to &lt;strong&gt;create or import&lt;/strong&gt;, and &lt;strong&gt;deploy&lt;/strong&gt; smart contracts and DApps with ease. Thirdweb also offers &lt;strong&gt;hosting solutions&lt;/strong&gt;, &lt;strong&gt;data storage&lt;/strong&gt;, and other developer tools to make the development and deployment process smoother and more efficient.&lt;/p&gt;

&lt;h2&gt;
  
  
  Create a Project
&lt;/h2&gt;

&lt;p&gt;Let us delve into the process of creating a smart contract from the ground up using the thirdweb framework, and subsequently deploying it to any Ethereum Virtual Machine (EVM)-compatible blockchain.&lt;/p&gt;

&lt;p&gt;Navigate to the desired directory where you wish to initialize the project in your terminal and execute the following command:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;npx thirdweb create contract
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fk48zo6fy511bgv008huk.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fk48zo6fy511bgv008huk.png" alt="terminal prompt — project name" width="800" height="269"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;After executing the aforementioned command, a verbose message from the thirdweb framework will appear on your terminal prompt. The message will prompt you to enter a name for your project. Please enter a name of your choice. For this example, we will use &lt;code&gt;thirdweb-demo&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F5vtt86ms0jarjpbc7n8p.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F5vtt86ms0jarjpbc7n8p.png" alt="terminal prompt — framework selection" width="800" height="322"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Subsequently, you will be prompted to select the framework of your choice to create your smart contract. For the purpose of this demonstration, we will be selecting &lt;strong&gt;Hardhat&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fz1vqx0u2kpk89fm122eo.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fz1vqx0u2kpk89fm122eo.png" alt="terminal prompt — smart contract name" width="800" height="309"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Following the selection of the framework, you will be prompted to enter the name of your smart contract. In this example, we will be utilizing the basic &lt;code&gt;Box&lt;/code&gt; smart contract for demonstration purposes, and thus we will name it accordingly.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;em&gt;**Improve the feature — thirdweb Team:&lt;/em&gt;* &lt;strong&gt;The thirdweb team&lt;/strong&gt;, I would like to bring to your attention that the name prompt feature does not appear to be functioning as intended. Upon execution, an empty contract labeled &lt;strong&gt;“MyContract”&lt;/strong&gt; with a file name &lt;strong&gt;“Contract.sol”&lt;/strong&gt; is generated, instead of using the name provided through the prompt. It would be beneficial if this feature were to be updated such that the file and contract name are derived from the user input provided through the prompt.*&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fcpx2qs60p263d4xxyysw.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fcpx2qs60p263d4xxyysw.png" alt="terminal prompt — contract type" width="800" height="401"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Following the previous step, you will be prompted to select the type of smart contract you wish to utilize. Several options will be presented to you, including &lt;strong&gt;ERC20&lt;/strong&gt;, &lt;strong&gt;ERC721&lt;/strong&gt;, and &lt;strong&gt;ERC1155&lt;/strong&gt; compatible contracts. For this demonstration, we will be selecting the &lt;strong&gt;“Empty Contract”&lt;/strong&gt; option.&lt;/p&gt;

&lt;p&gt;Upon selecting the desired smart contract type, the necessary project dependencies will be installed automatically. Once the installation process is complete, you may proceed to open the project in your preferred code editor. For the purpose of this article, we will be utilizing VSCode.&lt;/p&gt;
&lt;h2&gt;
  
  
  Deploy Any Smart Contract
&lt;/h2&gt;


&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;// SPDX-License-Identifier: MIT
pragma solidity ^0.8.17;


contract Box {
    uint256 private value;

    event ValueChanged(uint256 indexed value);

    function store(uint256 _value) external {
        value = _value;
        emit ValueChanged(_value);
    }

    function retrieve() external view returns (uint256) {
        return value;
    }
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;After opening the project in your preferred code editor, please navigate to the &lt;strong&gt;“contracts”&lt;/strong&gt; directory and rename the default &lt;code&gt;Contract.sol&lt;/code&gt; file to &lt;code&gt;Box.sol&lt;/code&gt;. Once renamed, please replace the contents of the file with the provided Box smart contract code.&lt;/p&gt;

&lt;p&gt;Additionally, you will need to ensure that the Solidity version specified in the &lt;code&gt;hardhat.config.js&lt;/code&gt; file is compatible with the version utilized in your smart contract(s). In this case, since the provided Box smart contract code is written in version 0.8.17, we will need to update the version specified in the &lt;code&gt;hardhat.config.js&lt;/code&gt; file to match. For example, we would update the version from 0.8.9 to 0.8.17 to ensure compatibility.&lt;/p&gt;
&lt;h3&gt;
  
  
  Deploying
&lt;/h3&gt;


&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;yarn deploy
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;After successfully compiling the code, the smart contract can be deployed to any blockchain utilizing the thirdweb framework. To do so, please execute the above command.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fhyx3hn7w7jbjq03ap0rb.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fhyx3hn7w7jbjq03ap0rb.png" alt="deploy smart contract" width="800" height="475"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;That’s it! 🥳 This command does the following:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Compiles your contract&lt;/li&gt;
&lt;li&gt;Uploads your contract source code (&lt;a href="https://docs.soliditylang.org/en/v0.8.17/abi-spec.html" rel="noopener noreferrer"&gt;&lt;strong&gt;ABI&lt;/strong&gt;&lt;/a&gt;) to &lt;a href="https://docs.ipfs.tech/concepts/what-is-ipfs/" rel="noopener noreferrer"&gt;IPFS&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Opens the &lt;a href="https://portal.thirdweb.com/dashboard" rel="noopener noreferrer"&gt;dashboard&lt;/a&gt; for you to select one of the &lt;a href="https://blog.thirdweb.com/guides/which-network-should-you-use/" rel="noopener noreferrer"&gt;supported networks&lt;/a&gt; to deploy to&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Please note that in the event that the dashboard does not open automatically, you may access it manually by clicking on the provided link within the terminal.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fww2lf1dxs1yha2sp4ucw.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fww2lf1dxs1yha2sp4ucw.png" alt="Network/Chain Settings — thirdweb Dashboard" width="800" height="255"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Upon accessing the dashboard, you will be presented with the details of your smart contract, as well as the network settings. By default, the network will be selected based on the network selected within your Metamask wallet. However, you may also choose to select a different network from the available options within the dropdown menu.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F0pokb3nxlg7tres8i0ks.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F0pokb3nxlg7tres8i0ks.png" alt="Configure Networks — thirdweb Dashboard" width="800" height="503"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;In the event that your preferred network is not available within the dropdown menu, you may select the &lt;strong&gt;“Configure Networks”&lt;/strong&gt; button to access a list of available networks. From here, you may search for and add your preferred network to the list of available networks.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Flgp0g004a0faegb7org4.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Flgp0g004a0faegb7org4.png" alt="Custom Network — thirdweb Dashboard" width="800" height="535"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Furthermore, you also have the option to add custom networks by providing the relevant information within the &lt;strong&gt;“Custom Network”&lt;/strong&gt; tab. This allows you to connect to and deploy your smart contract on any network of your choosing, regardless of whether it is listed within the preconfigured options or not.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F5dmv40f6crf5jrne7pdx.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F5dmv40f6crf5jrne7pdx.png" alt="Network/Chain Settings — thirdweb Dashboard" width="800" height="260"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Once you have successfully configured your desired network, it will be available within the dropdown menu for selection. From here, you may select the network and proceed to deploy your smart contract on it.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F5yedqdpt4kkax1kqhgm3.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F5yedqdpt4kkax1kqhgm3.png" alt="Deploying contract — thirdweb Dashboard" width="800" height="394"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fpfub8wn9rlxcfq5i3g1g.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fpfub8wn9rlxcfq5i3g1g.png" alt="Adding to dashboard — thirdweb Dashboard" width="800" height="393"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Upon selecting the &lt;strong&gt;“Deploy Now”&lt;/strong&gt; button, the deployment process for your smart contract will commence. A pop-up from your Metamask wallet will appear requesting your confirmation to proceed with the deployment. Upon confirming, the smart contract will be successfully deployed and another signature request will appear, allowing you to add the deployed smart contract to the thirdweb dashboard for further interaction and management using the dashboard’s features.&lt;/p&gt;
&lt;h2&gt;
  
  
  Manage Your Smart Contract — thirdweb Dashboard
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fygtj4kr94cytg13njvz4.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fygtj4kr94cytg13njvz4.png" alt="Box Contract — thirdweb Dashboard" width="800" height="390"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Upon successfully adding your smart contract to the thirdweb dashboard, the dashboard for your contract will be automatically opened, displaying all the relevant details and options for interacting with your smart contract through the dashboard.&lt;/p&gt;
&lt;h3&gt;
  
  
  Overview Tab
&lt;/h3&gt;

&lt;p&gt;In the Overview tab of the contract dashboard, you can see a list of all the events emitted by your Box smart contract, along with their timestamps. This can be useful for tracking the state changes and activity of your smart contract over time. Additionally, you can view any extensions that are available for your smart contract, which can add additional functionality and features to your smart contract.&lt;/p&gt;

&lt;p&gt;You can view the details of your Box smart contract, including its functions, events, and variables, as well as its current state and transaction history, on the contract dashboard within the thirdweb dashboard. From there, you can interact with the smart contract by calling its functions, sending transactions, and monitoring its events and state changes in real time.&lt;/p&gt;


&lt;div class="crayons-card c-embed text-styles text-styles--secondary"&gt;
      &lt;div class="c-embed__cover"&gt;
        &lt;a href="https://thirdweb.com/sepolia/0x550D05315E9bdF735Feb4DcA6171Bf384fA983b6" class="c-link s:max-w-50 align-middle" rel="noopener noreferrer"&gt;
          &lt;img alt="" src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fthirdweb.com%2Fsepolia%2F0x550D05315E9bdF735Feb4DcA6171Bf384fA983b6%2Fopengraph-image-yiry9d%3F7a86447694ceefe3" height="420" class="m-0" width="800"&gt;
        &lt;/a&gt;
      &lt;/div&gt;
    &lt;div class="c-embed__body"&gt;
      &lt;h2 class="fs-xl lh-tight"&gt;
        &lt;a href="https://thirdweb.com/sepolia/0x550D05315E9bdF735Feb4DcA6171Bf384fA983b6" rel="noopener noreferrer" class="c-link"&gt;
          0x55...3b6 | sepolia
        &lt;/a&gt;
      &lt;/h2&gt;
        &lt;p class="truncate-at-3"&gt;
          Build web3 apps easily with thirdweb's powerful SDKs, audited smart contracts, and developer tools—for Ethereum &amp;amp; 700+ EVM chains. Try now.
        &lt;/p&gt;
      &lt;div class="color-secondary fs-s flex items-center"&gt;
        thirdweb.com
      &lt;/div&gt;
    &lt;/div&gt;
&lt;/div&gt;



&lt;h3&gt;
  
  
  Build Tab
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F7tysbbwaor1v8d9cn1w8.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F7tysbbwaor1v8d9cn1w8.png" alt="Build Tab — thirdweb Dashboard&amp;lt;br&amp;gt;
" width="800" height="398"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;In the Build tab, you can find information on how to interact with your smart contract using various programming languages and frameworks such as JavaScript, React, Python, and Unity. It provides code snippets that illustrate how to read and write to the smart contract using these languages or frameworks. This can be useful for developers who want to integrate their smart contracts with their existing projects or application.&lt;/p&gt;

&lt;h3&gt;
  
  
  Explorer Tab
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fwa9xjkwo0b9755lwnrvg.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fwa9xjkwo0b9755lwnrvg.png" alt="Explorer Tab — thirdweb Dashboard" width="800" height="398"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;It is important to note that the Explorer tab provides an overview of the functions available in the smart contract, both the read-only functions (also known as &lt;strong&gt;constant functions&lt;/strong&gt;) and the write functions.&lt;/p&gt;

&lt;p&gt;When you click on a write function, such as the &lt;strong&gt;store&lt;/strong&gt; function in our Box contract, the Explorer tab will display information about the function, including its &lt;strong&gt;name&lt;/strong&gt;, &lt;strong&gt;input parameters&lt;/strong&gt;, and whether it is &lt;strong&gt;payable or non-payable&lt;/strong&gt;. It will also provide a text field where you can input the data that will be passed to the function when it is executed.&lt;/p&gt;

&lt;p&gt;By providing the required input data and clicking the execute button, you can directly interact with the smart contract and execute its functions from the thirdweb’s dashboard, without the need to write any code.&lt;/p&gt;

&lt;h3&gt;
  
  
  Events Tab
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fh3tpkdrlxusw0xk7hbi3.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fh3tpkdrlxusw0xk7hbi3.png" alt="Events Tab — thirdweb Dashboard" width="800" height="393"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The Events tab provides a list of events that are triggered by your smart contract. When you execute the store function from the Explorer tab, the event triggered by the function can be seen in this tab.&lt;/p&gt;

&lt;h3&gt;
  
  
  Sources Tab
&lt;/h3&gt;

&lt;p&gt;Additionally, the thirdweb dashboard provides Settings and Sources tabs that offer additional functionality. In the Settings tab, you can view and modify the project-related settings. The Sources tab, on the other hand, allows you to access the source code of your smart contract, as well as its ABI.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Feolcizhu7acbr9tbivsk.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Feolcizhu7acbr9tbivsk.png" alt="Sources Tab — thirdweb Dashboard" width="800" height="392"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;In the sources tab, you can also verify your smart contracts on Etherscan with just one click, directly from the thirdweb dashboard.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Note: Please note that I am showing you my previously deployed smart contract on the Goerli network since the option to verify contracts on Sepolia is currently unavailable.&lt;/strong&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Importing Any Contract on thirdweb’s Dashboard
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fy9ezpq7mqcjgxxhd3357.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fy9ezpq7mqcjgxxhd3357.png" alt="Contracts Tab — thirdweb Dashboard" width="800" height="280"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Furthermore, Thirdweb provides the functionality to import any previously deployed smart contract on the blockchain into the Thirdweb dashboard for further usage and interaction.&lt;/p&gt;

&lt;p&gt;You can view your contract here;&lt;/p&gt;

&lt;p&gt;Contracts Dashboard: &lt;a href="https://thirdweb.com/dashboard/contracts" rel="noopener noreferrer"&gt;https://thirdweb.com/dashboard/contracts&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F1r01sprvtgv92yg5cayp.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F1r01sprvtgv92yg5cayp.png" alt="Import Contract — thirdweb Dashboard" width="800" height="489"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Clicking on the &lt;strong&gt;“Import Contract”&lt;/strong&gt; button will bring up a popup window where you can enter the address of the deployed contract and select the network it was deployed on.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F0fsr9q5pftryiotw0pfh.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F0fsr9q5pftryiotw0pfh.png" alt="Importing contract — thirdweb Dashboard" width="800" height="440"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;After clicking the &lt;strong&gt;“Import”&lt;/strong&gt; button, thirdweb will retrieve comprehensive information about the targeted smart contract and display it in the dashboard, allowing for seamless use of the contract.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;NOTE: It is critical to ensure that the smart contract being imported is verified in order for thirdweb to retrieve relevant details accurately. As a result, it is strongly advised that the contract be verified before beginning the import process.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;You can read more about this feature from thirdweb’s blog post on &lt;a href="https://blog.thirdweb.com/any-contract-any-evm-chain/" rel="noopener noreferrer"&gt;&lt;strong&gt;‘Any EVM, Any Contract’&lt;/strong&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;In conclusion, thirdweb provides a user-friendly and efficient platform that enables developers to deploy smart contracts on any EVM chain seamlessly. By leveraging thirdweb’s robust features and capabilities, users can easily import, deploy, and interact with smart contracts, regardless of the underlying blockchain network. With thirdweb’s intuitive interface, developers can focus on building and refining their smart contract applications, while leaving the complexities of blockchain technology to the platform. As such, thirdweb offers an accessible and reliable solution for anyone seeking to harness the potential of smart contracts on EVM chains.&lt;/p&gt;

&lt;p&gt;This comprehensive guide aims to provide assistance to developers of all skill levels and is intended to be beneficial for a wide range of developers. Despite its length, the information provided is intended to be easily understandable and actionable for all readers.&lt;/p&gt;

&lt;p&gt;If you found this content helpful, please consider giving it a clap and leaving any feedback for future improvements. Your suggestions and comments are greatly appreciated and will help make these articles even more valuable for you and other readers.&lt;/p&gt;

&lt;p&gt;Be sure to follow me to receive updates on my future articles and stay informed of new content.&lt;/p&gt;

&lt;p&gt;Thank you&lt;/p&gt;

&lt;p&gt;&lt;a class="mentioned-user" href="https://dev.to/alymurtazamemon"&gt;@alymurtazamemon&lt;/a&gt; &lt;/p&gt;

</description>
      <category>blockchain</category>
      <category>solidity</category>
      <category>thirdweb</category>
      <category>smartcontracts</category>
    </item>
    <item>
      <title>What are Oracles? &amp; How is Chainlink Leading to Provide Optimal Solutions?</title>
      <dc:creator>Ali Murtaza Memon</dc:creator>
      <pubDate>Sun, 19 Mar 2023 19:41:28 +0000</pubDate>
      <link>https://dev.to/alymurtazamemon/what-are-oracles-how-is-chainlink-leading-to-provide-optimal-solutions-5fkl</link>
      <guid>https://dev.to/alymurtazamemon/what-are-oracles-how-is-chainlink-leading-to-provide-optimal-solutions-5fkl</guid>
      <description>&lt;blockquote&gt;
&lt;p&gt;“Understanding the Role of Data Connectivity in Decentralized Applications and Chainlink’s Innovations in Meeting Industry Demands”&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Smart contracts cannot access real-world data directly because they are executed within a blockchain network, which is a self-contained environment that operates independently of external systems. The purpose of a blockchain network is to maintain a distributed ledger of transactions that is secured through cryptography and consensus algorithms. To access data from external sources, smart contracts need to rely on intermediaries known as &lt;strong&gt;oracles&lt;/strong&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  What is an Oracle?
&lt;/h2&gt;

&lt;p&gt;An oracle is a mechanism in blockchain technology that connects the blockchain to off-chain data sources such as APIs or real-world events.&lt;/p&gt;

&lt;p&gt;A blockchain is a distributed database that relies on participant consensus to validate transactions and keep a single version of the truth. Blockchains, on the other hand, are typically isolated from external data sources and cannot directly access information from the outside world. This limitation can be problematic for applications that require information from external sources to execute smart contracts or other blockchain operations.&lt;/p&gt;

&lt;p&gt;An oracle acts as a connector between the blockchain and external data sources, allowing blockchain applications to access real-world data. Oracles typically receive data from off-chain sources and transmit it to the blockchain in a format that smart contracts and other applications can use.&lt;/p&gt;

&lt;h2&gt;
  
  
  Key Considerations for Choosing a Blockchain Oracles
&lt;/h2&gt;

&lt;p&gt;Despite the number of options available in the Web3 space, selecting the right Blockchain Oracle solution provider is a critical step for the success of your decentralized applications.&lt;/p&gt;

&lt;p&gt;Here is a list of factors to consider:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Decentralization:&lt;/strong&gt; It is a crucial factor to consider when selecting a Blockchain Oracle solution provider. Centralized oracles can pose a significant risk, as they have the power to control the data utilized in your dapps. This can be especially problematic for applications such as DeFi, where the financial assets of users are at stake.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Data Quality:&lt;/strong&gt; It is critical to ensure the &lt;strong&gt;accuracy&lt;/strong&gt; and &lt;strong&gt;dependability&lt;/strong&gt; of Oracle data consumed by dapps. It is critical to ensure that the data is of &lt;strong&gt;high quality&lt;/strong&gt;, &lt;strong&gt;up to date&lt;/strong&gt;, and &lt;strong&gt;derived from reliable and authenticated sources&lt;/strong&gt;. Failure to do so may seriously damage the financial assets of your users, and will risk the dapp’s success.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Security:&lt;/strong&gt; Ensuring the security of the data provided by an oracle that feeds into your decentralized applications (dapps) is very important. A compromised oracle solutions provider not only compromised its own solutions but also endangers the integrity of your dapps and their users. Such a scenario is commonly referred to as an &lt;strong&gt;“Oracle Attack”&lt;/strong&gt; in the blockchain industry. To safeguard against this risk, it is important to opt for a decentralized oracle with a proven track record of security and robust measures in place to protect both their systems and the data provided to your dapps.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Cost:&lt;/strong&gt; As we know that each blockchain transaction has a real financial cost, it is critical for dapp developers to choose an oracle solution provider that not only satisfies the above-mentioned requirements but also takes into account the particular requirements and preferences of their dapps and user base.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;While there may be additional factors to consider, the above-mentioned criteria are the primary considerations that should guide the selection of an oracle for your dapp.&lt;/p&gt;

&lt;h2&gt;
  
  
  How is Chainlink Leading to Provide Optimal Solutions?
&lt;/h2&gt;

&lt;p&gt;The Chainlink Network is composed of the highest-quality, Sybil-resistant oracle nodes that are operated by leading DevOps and security teams, such as Deutsche Telekom’s T-Systems, who have decades of experience running mission-critical infrastructure. The security-reviewed and tamper-resistant nodes that comprise Chainlink &lt;a href="https://data.chain.link/" rel="noopener noreferrer"&gt;oracle networks&lt;/a&gt; are highly transparent. Their performance metadata is made publicly available to users and can be found on-chain or on third-party sites such as &lt;a href="https://market.link/" rel="noopener noreferrer"&gt;market.link&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Chainlink also employs a defence-in-depth approach where multiple security solutions are used in combination to increase oracle network robustness and reliability. This includes privacy-preserving cryptography like &lt;a href="https://www.youtube.com/watch?v=zWTx1iQOCDM" rel="noopener noreferrer"&gt;DECO&lt;/a&gt;, trusted hardware such as &lt;a href="https://blog.chain.link/town-crier-and-chainlink/" rel="noopener noreferrer"&gt;Town Crier&lt;/a&gt;, crypto-economic security through implicit/explicit staking, and much more.&lt;/p&gt;

&lt;p&gt;We previously discussed the importance of &lt;strong&gt;decentralization&lt;/strong&gt;, &lt;strong&gt;high-quality&lt;/strong&gt; and &lt;strong&gt;up-to-date data&lt;/strong&gt;, &lt;strong&gt;security&lt;/strong&gt;, and &lt;strong&gt;cost-effectiveness&lt;/strong&gt; in an oracle solution provider. In each of these areas, Chainlink has made significant strides to offer optimal solutions for dapps.&lt;/p&gt;

&lt;p&gt;Here are some of the ways:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Decentralized Oracle Network:&lt;/strong&gt; The Chainlink Network is made up of multiple decentralized oracle networks running simultaneously and independently of one another. For example, if a smart contract requires data about the price of ETH/USD, instead of relying on one individual blockchain oracle to pull price data from one API source, the smart contract can use a decentralized oracle network to have multiple oracle nodes pull data from several different API sources and then aggregate the result. Through decentralized computation, Chainlink-powered decentralized oracle networks provide users superior security and reliability guarantees on the inputs and outputs of their smart contract, ensuring that both on-chain and off-chain components of a decentralized application are tamper-proof end-to-end.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Reputation System:&lt;/strong&gt; By rewarding nodes for good behaviour and punishing them for bad behaviour, Chainlink’s reputation system encourages nodes to provide accurate data. This makes it possible to guarantee that nodes only offer reliable, high-quality data.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Multiple Data Sources:&lt;/strong&gt; Chainlink aggregates data from multiple sources to ensure that the data is accurate and trustworthy. This helps to mitigate the risk of any single source being compromised or providing incorrect data.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Data Verification:&lt;/strong&gt; Chainlink offers a variety of data verification methods, including cryptographic proofs and on-chain verification, to ensure that data is accurate and has not been tampered with.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Audits:&lt;/strong&gt; Chainlink is subjected to regular audits by reputable third-party firms to ensure the system’s security and lack of vulnerabilities. This helps to ensure that data quality and system reliability are maintained.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Chainlink’s Products
&lt;/h2&gt;

&lt;h3&gt;
  
  
  &lt;a href="https://docs.chain.link/data-feeds/" rel="noopener noreferrer"&gt;Data Feeds&lt;/a&gt;
&lt;/h3&gt;

&lt;p&gt;Chainlink Data Feeds are decentralized oracle networks that provide aggregated financial market data used by leading DeFi applications such as Aave, Synthetic, Compound, and more. Powered by a multitude of professional, security-reviewed oracle nodes and premium data aggregators, these purpose-built price feeds provide &lt;a href="https://blog.chain.link/chainlink-price-feeds-secure-defi/" rel="noopener noreferrer"&gt;broad market coverage&lt;/a&gt; on a wide array of assets and enable developers to rapidly create innovative smart contract applications that require a secure source of external market data.&lt;/p&gt;

&lt;p&gt;Chainlink Data Feeds are a community resource sponsored by a large collection of users and Chainlink, creating highly secure and decentralized oracle networks through the aggregation of user fees. With each additional user, existing and future users gain the benefits of a more cost-efficient and secure oracle network than they could afford on their own. As the DeFi ecosystem has grown, Chainlink Data Feeds have become a widely adopted solution that is lowering the barrier to creating highly secure financial smart contract applications.&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;a href="https://docs.chain.link/vrf/v2/introduction" rel="noopener noreferrer"&gt;Verifiable Random Function (VRF)&lt;/a&gt;
&lt;/h3&gt;

&lt;p&gt;Chainlink VRF brings secure random number generation to the blockchain. Chainlink VRF solves the difficult problem of providing an on-chain source of randomness that is publicly verifiable to be authentic and tamper-proof. Many smart contracts are augmenting the value they can create by utilizing Chainlink VRF, specific applications such as gaming dApps that must prove to their users that their source of randomness is provably fair and resistant to manipulation from any external entity. Chainlink VRF enables and accelerates the development of smart contracts focused on blockchain gaming, security, layer-two protocols, and various other use cases.&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;a href="https://docs.chain.link/chainlink-automation/introduction/" rel="noopener noreferrer"&gt;Automation&lt;/a&gt;
&lt;/h3&gt;

&lt;p&gt;Chainlink Automation is a decentralized solution that enables projects to run key smart contract functions and DevOps tasks automatically in a highly reliable, trust-minimized, and cost-efficient manner. Individual developers, teams, and DAOs can utilize Chainlink Automation as an off-chain computation layer to reliably perform key functions and unlock advanced utility.&lt;/p&gt;

&lt;p&gt;A decentralized network of nodes provides trust-minimized and reliable automation with no single point of failure, mitigating risks around manual interventions or centralized servers. Projects using Chainlink Automation are able to reduce time spent on DevOps, eliminate automation infrastructure costs, and build faster and more efficiently.&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;a href="https://docs.chain.link/chainlink-functions" rel="noopener noreferrer"&gt;Functions&lt;/a&gt;
&lt;/h3&gt;

&lt;p&gt;Chainlink Functions provides our smart contracts with access to a trust-minimized compute infrastructure. Our smart contract sends our code to a &lt;a href="https://docs.chain.link/chainlink-functions/resources/concepts/" rel="noopener noreferrer"&gt;Decentralized Oracle Network (DON)&lt;/a&gt;, and each DON’s oracle runs the same code in a serverless environment. The DON aggregates all the independent runs and returns the final result to our smart contract. Our code can be anything from simple computation to fetching data from API providers.&lt;/p&gt;

&lt;p&gt;Chainlink Functions provides access to off-chain computation without having to run and configure our own Chainlink Node. To pay for requests, we fund a subscription account with LINK. Our subscription is billed only when the DON fulfils our request.&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;a href="https://docs.chain.link/any-api/introduction" rel="noopener noreferrer"&gt;APIs&lt;/a&gt;
&lt;/h3&gt;

&lt;p&gt;Connecting to any API with Chainlink enables our contracts to access any external data source through Chainlink’s decentralized oracle network. Making smart contracts compatible with off-chain data adds to the complexity of building smart contracts. Due to that, Chainlink has created a framework with minimal requirements, yet unbounded flexibility, so developers can focus more on the functionality of smart contracts rather than what feeds them. Chainlink’s decentralized oracle network provides smart contracts with the ability to push and pull data, facilitating the interoperability between on-chain and off-chain applications.&lt;/p&gt;

&lt;p&gt;Whether our contract requires sports results, the latest weather, or any other publicly available data, the &lt;a href="https://github.com/smartcontractkit/chainlink/tree/master/contracts" rel="noopener noreferrer"&gt;Chainlink contract library&lt;/a&gt; provides the tools required for our contract to consume it.&lt;/p&gt;

&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;In conclusion, oracles play a crucial role in enabling smart contracts to access and interact with external data sources, making them more powerful and versatile. However, the accuracy and security of these oracles are critical for the success and adoption of decentralized applications, especially in the rapidly growing DeFi space.&lt;/p&gt;

&lt;p&gt;Thank you for reading this article, which provides an introduction to oracles, Chainlink, and its products. In future articles, we will delve deeper into Chainlink’s products and explore their technical implementation.&lt;/p&gt;

&lt;p&gt;If you found this content helpful, please consider giving it a clap and leaving any feedback for future improvements. Your suggestions and comments are greatly appreciated and will help make these articles even more valuable for you and other readers.&lt;/p&gt;

&lt;p&gt;Be sure to follow me to receive updates on my future articles and stay informed of new content.&lt;/p&gt;

&lt;p&gt;Thank you&lt;/p&gt;

&lt;p&gt;&lt;a class="mentioned-user" href="https://dev.to/alymurtazamemon"&gt;@alymurtazamemon&lt;/a&gt; &lt;/p&gt;

</description>
      <category>blockchain</category>
      <category>chainlink</category>
      <category>oracle</category>
      <category>decentralized</category>
    </item>
    <item>
      <title>Becoming a Blockchain Developer: A Step-by-Step Guide for Beginners</title>
      <dc:creator>Ali Murtaza Memon</dc:creator>
      <pubDate>Mon, 30 Jan 2023 15:07:01 +0000</pubDate>
      <link>https://dev.to/alymurtazamemon/becoming-a-blockchain-developer-a-step-by-step-guide-for-beginners-193e</link>
      <guid>https://dev.to/alymurtazamemon/becoming-a-blockchain-developer-a-step-by-step-guide-for-beginners-193e</guid>
      <description>&lt;p&gt;&lt;em&gt;&lt;strong&gt;“From Zero Knowledge to Building Decentralized Applications”&lt;/strong&gt;&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Blockchain technology has taken the world by storm, and it’s no surprise that many individuals are interested in becoming blockchain developers. However, the journey to becoming a skilled blockchain developer can be overwhelming, especially for those starting with zero knowledge. With the plethora of information and resources available, it can be difficult to determine the best path to follow.&lt;/p&gt;

&lt;p&gt;As a result, it’s common for aspiring blockchain developers to have questions about which programming language to learn first, whether to start with front-end or back-end technologies, and whether it’s possible to dive directly into Solidity without prior programming experience.&lt;/p&gt;

&lt;p&gt;As a professional in the field, it’s essential to guide and support those who are eager to join the blockchain industry. In this article, I aim to provide a comprehensive roadmap for individuals who are looking to break into blockchain development and help them navigate the journey from zero knowledge to building decentralized applications. By covering the key skills and technologies required, this guide will serve as a valuable resource for anyone seeking to start a career in blockchain development.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Note: It is important to acknowledge that this guide is solely based on the my personal experience in becoming a blockchain developer and there may be alternative methods available.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h2&gt;
  
  
  1. Need-Based Learning
&lt;/h2&gt;

&lt;p&gt;With five years of experience in software development, I have come to understand that it is not feasible or necessary to attempt to acquire knowledge of every tool, technology, or programming language in the constantly evolving field of software engineering. The sheer volume of information and advancements renders it impossible to retain proficiency in all areas. Thus, it is more efficient and effective to adopt a need-based approach to learning, focusing on acquiring skills and knowledge as they become necessary in one’s work.&lt;/p&gt;

&lt;h2&gt;
  
  
  2. Learning Programming Fundamentals
&lt;/h2&gt;

&lt;p&gt;Adhering to a need-based approach to learning, proficiency in a programming language is deemed a foundational requirement for those aspiring to become software engineers or blockchain developers.&lt;/p&gt;

&lt;p&gt;For this reason, it is critical to invest time and effort in strengthening your programming fundamentals before venturing into the frontend, backend, or blockchain development.&lt;/p&gt;

&lt;p&gt;However, I do not recommend starting with JavaScript or Solidity as a first programming language. JavaScript may not be well suited for practising fundamental programming concepts and Solidity’s additional complexities could hinder the development of a strong understanding of programming fundamentals.&lt;/p&gt;

&lt;p&gt;Instead, I would suggest you begin by learning C++ or Java ( with a particular emphasis on Java) to familiarize yourself with programming basics and engage in extensive practice to master fundamental programming concepts.&lt;/p&gt;

&lt;p&gt;Here you can find &lt;a href="https://www.freecodecamp.org/news/the-most-popular-coding-challenge-websites/" rel="noopener noreferrer"&gt;The Most Popular Coding Challenge Websites&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;I know you want to become a blockchain developer and this thing will take lot of your time but believe me for strong buildings foundation is very important.&lt;/p&gt;

&lt;p&gt;At this stage, it is expected that you have attained a robust grasp of programming concepts and have engaged in substantial hands-on practice, completing at least 100 to 500 coding exercises on the above websites.&lt;/p&gt;

&lt;p&gt;I would also recommend you learn and practice &lt;strong&gt;Data Structure &amp;amp; Algorithms (if you have time)&lt;/strong&gt; before going further.&lt;/p&gt;

&lt;p&gt;I took this course &lt;a href="https://www.udemy.com/course/data-structures-and-algorithms-deep-dive-using-java/" rel="noopener noreferrer"&gt;Data Structures and Algorithms: Deep Dive Using Java&lt;/a&gt; but you can select any other (&lt;strong&gt;This is not promotional&lt;/strong&gt;).&lt;/p&gt;

&lt;h2&gt;
  
  
  3. Learning Blockchain Fundamentals
&lt;/h2&gt;

&lt;p&gt;Having mastered the fundamentals of programming, the next step is to delve into the fundamentals of blockchain technology and gain a comprehensive understanding of its core concepts.&lt;/p&gt;

&lt;p&gt;For that, I would recommend downloading this free guide &lt;a href="https://blockchaintrainingalliance.com/products/cbbf-official-exam-study-guide" rel="noopener noreferrer"&gt;Certified Blockchain Business Foundations (CBBF)&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;In addition to this guide, you can also look for other courses on Coursera, YouTube or any other platform.&lt;/p&gt;

&lt;h2&gt;
  
  
  4. Learning JavaScript &amp;amp; Solidity Programming
&lt;/h2&gt;

&lt;p&gt;Prior to embarking on a blockchain development course, it is advisable to gain proficiency in JavaScript and Solidity. The majority of blockchain development tools utilize JavaScript, and the ability to write smart contracts requires a solid understanding of Solidity.&lt;/p&gt;

&lt;p&gt;JavaScript Course: &lt;a href="https://www.freecodecamp.org/learn/javascript-algorithms-and-data-structures/" rel="noopener noreferrer"&gt;JavaScript Algorithms and Data Structures&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Solidity Course: &lt;a href="https://cryptozombies.io/en/course/" rel="noopener noreferrer"&gt;Solidity: Beginner to Intermediate Smart Contracts&lt;/a&gt; (only Starting 5 Lessons)&lt;/p&gt;

&lt;h2&gt;
  
  
  5. Blockchain Development Courses
&lt;/h2&gt;

&lt;p&gt;It is worth mentioning that up until this point, we have not covered front-end development technologies. This is in line with the principle of need-based learning, as we have not yet encountered a requirement for such knowledge in the context of blockchain development.&lt;/p&gt;

&lt;p&gt;However, it should be noted that certain portions of the courses to be discussed may touch upon front-end technologies. These lessons, while informative, are not crucial for you to pursue as a blockchain developer and can be disregarded if desired.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://www.youtube.com/watch?v=gyMwXuJrbJQ&amp;amp;t=28487s" rel="noopener noreferrer"&gt;Learn Blockchain, Solidity, and Full Stack Web3 Development with JavaScript — 32-Hour Course&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://university.alchemy.com/home" rel="noopener noreferrer"&gt;Ethereum Development Bootcamp — Alchemy&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  6. Frontend Technologies — Full Stack Blockchain Development
&lt;/h2&gt;

&lt;p&gt;At this stage, you will have acquired expertise in smart contract development and will be capable of deploying, testing, and verifying contracts using Hardhat. If you are solely interested in solidity development, you can proceed to the next section and focus on creating smart contracts for portfolio projects. However, if you wish to delve into frontend application development for your smart contracts, it is recommended to familiarize yourself with these technologies in the following sequence.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://scrimba.com/learn/htmlandcss" rel="noopener noreferrer"&gt;Learn HTML and CSS&lt;/a&gt;&lt;br&gt;&lt;br&gt;
&lt;a href="https://scrimba.com/learn/flexbox" rel="noopener noreferrer"&gt;Learn Flexbox for free&lt;/a&gt;&lt;br&gt;&lt;br&gt;
&lt;a href="https://scrimba.com/learn/cssgrid" rel="noopener noreferrer"&gt;Learn CSS Grid for free&lt;/a&gt;&lt;br&gt;&lt;br&gt;
&lt;a href="https://scrimba.com/learn/learnreact" rel="noopener noreferrer"&gt;Learn React for free&lt;/a&gt;&lt;br&gt;&lt;br&gt;
&lt;a href="https://scrimba.com/learn/react" rel="noopener noreferrer"&gt;Advanced React&lt;/a&gt;&lt;br&gt;&lt;br&gt;
&lt;a href="https://www.youtube.com/watch?v=dFgzHOX84xQ&amp;amp;t=10s" rel="noopener noreferrer"&gt;Tailwind Crash Course&lt;/a&gt;&lt;br&gt;&lt;br&gt;
&lt;a href="https://www.youtube.com/watch?v=KjY94sAKLlw" rel="noopener noreferrer"&gt;Next.js React Framework Course&lt;/a&gt;  &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Note: It is important to engage in sufficient hands-on practice using React.js before developing projects utilizing Next.js.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Upon completion of these courses, you will have acquired the necessary skills to develop front-end applications for your smart contracts and assemble full-stack blockchain projects. It is now time to build your portfolio.&lt;/p&gt;

&lt;h2&gt;
  
  
  7. Build Your Portfolio
&lt;/h2&gt;

&lt;p&gt;Having attained proficiency in various programming languages, tools, and frameworks, it is now time to put acquired knowledge into practice by developing portfolio DApps.&lt;/p&gt;

&lt;p&gt;You can get the ideas from these platforms:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://buildspace.so/" rel="noopener noreferrer"&gt;Buildspace&lt;/a&gt;&lt;br&gt;&lt;br&gt;
&lt;a href="https://speedrunethereum.com/" rel="noopener noreferrer"&gt;SpeedRunEthereum&lt;/a&gt;&lt;br&gt;&lt;br&gt;
&lt;a href="https://docs.alchemy.com/docs/welcome-to-the-road-to-web3" rel="noopener noreferrer"&gt;Road to Web3&lt;/a&gt;  &lt;/p&gt;

&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;In conclusion, becoming a blockchain developer requires a solid understanding of programming fundamentals, followed by learning the basics of blockchain technology and the necessary languages and tools. This process involves developing strong programming skills through practice, deep diving into blockchain, and then learning JavaScript and Solidity. Building a portfolio of full-stack blockchain projects is the final step in this journey and will help demonstrate your skills to potential employers. With dedication and effort, anyone can become a blockchain developer and make a positive impact in this growing field.&lt;/p&gt;

&lt;p&gt;This comprehensive guide aims to provide assistance to developers of all skill levels and is intended to be beneficial for a wide range of developers. Despite its length, the information provided is intended to be easily understandable and actionable for all readers.&lt;/p&gt;

&lt;p&gt;If you found this content helpful, please consider giving it a clap and leaving any feedback for future improvements. Your suggestions and comments are greatly appreciated and will help make these articles even more valuable for you and other readers.&lt;/p&gt;

&lt;p&gt;Be sure to follow me to receive updates on my future articles and stay informed of new content.&lt;/p&gt;

&lt;p&gt;Thank you&lt;/p&gt;

&lt;p&gt;&lt;a class="mentioned-user" href="https://dev.to/alymurtazamemon"&gt;@alymurtazamemon&lt;/a&gt; &lt;/p&gt;

</description>
      <category>crypto</category>
      <category>offers</category>
      <category>web3</category>
    </item>
    <item>
      <title>Verify your Smart Contracts on Etherscan Programmatically using Hardhat</title>
      <dc:creator>Ali Murtaza Memon</dc:creator>
      <pubDate>Sat, 28 Jan 2023 16:24:16 +0000</pubDate>
      <link>https://dev.to/alymurtazamemon/verify-your-smart-contracts-on-etherscan-programmatically-using-hardhat-30nj</link>
      <guid>https://dev.to/alymurtazamemon/verify-your-smart-contracts-on-etherscan-programmatically-using-hardhat-30nj</guid>
      <description>&lt;p&gt;&lt;strong&gt;&lt;em&gt;A step-by-step guide to verifying your smart contracts on Etherscan using Hardhat&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Verifying your smart contracts is a crucial step in ensuring the transparency and trustworthiness of blockchain-based applications. Making the contract’s code publicly accessible and providing proof of deployment on the blockchain allows for independent verification of the contract’s functionality. This not only builds trust among users but also increases the contract’s visibility and credibility.&lt;/p&gt;

&lt;p&gt;In addition to that, having a verified contract can make it more easily discoverable by potential users and can help to increase the contract’s visibility and credibility.&lt;/p&gt;

&lt;p&gt;In this article, we will explore the process of programmatically verifying smart contracts on &lt;strong&gt;Etherscan&lt;/strong&gt; using the &lt;strong&gt;Hardhat&lt;/strong&gt;. By the end of this guide, you will have a thorough understanding of how to use Hardhat to automate the contract verification process on Etherscan, thus streamlining the smart contract deployment process.&lt;/p&gt;

&lt;p&gt;Let’s delve into the details and learn how to verify smart contracts on Etherscan using Hardhat.&lt;/p&gt;

&lt;p&gt;The process of programmatically verifying smart contracts on Etherscan can be accomplished using the Hardhat in two different ways.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;Writing a custom verification script using Hardhat, which can be run at any time to verify contracts on Etherscan &lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Implementing a professional approach to automatically verify smart contracts upon deployment to the testnet or mainnet.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;As previously discussed in &lt;a href="https://dev.to/alymurtazamemon/learn-to-deploy-smart-contracts-more-professionally-with-hardhat-3253"&gt;Learn to Deploy Smart Contracts more Professionally with Hardhat&lt;/a&gt; article, managing smart contract scripts can present challenges for developers as a project grows in size and complexity. As the project scales, the complexity of managing smart contract scripts also increases, making it a headache for developers to keep track of the changes and maintain the integrity of the project.&lt;/p&gt;

&lt;p&gt;In order to fully understand and implement the second approach for automating the verification process, it is recommended that you first read the above article.&lt;/p&gt;

&lt;h2&gt;
  
  
  Projects Configuration for Verification
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;Create a new Hardhat Project&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Remove the default contract, script and test files provided by Hardhat. These files can be found in the contracts/, scripts/, and test/ folders, they should be removed to avoid confusion and potential errors.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Get the API Key from Etherscan &lt;a href="https://etherscan.io/" rel="noopener noreferrer"&gt;https://etherscan.io/&lt;/a&gt;.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Create the &lt;code&gt;.env&lt;/code&gt; file at the root location.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Add the &lt;code&gt;.env&lt;/code&gt; file inside the &lt;code&gt;.gitignore&lt;/code&gt; file. &lt;strong&gt;Make sure you must follow this step because later we will add the PRIVATE_KEY in this file&lt;/strong&gt;.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Create an Etherscan API key variable inside &lt;code&gt;.env&lt;/code&gt; the file and add your key as a value for this variable like this &lt;code&gt;ETHERSCAN_API_KEY=DR9...&lt;/code&gt;.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Install the &lt;code&gt;dotenv&lt;/code&gt; a package so we can load the env file variables in our scripts. Run the command in the terminal &lt;code&gt;npm i --save-dev dotenv --force&lt;/code&gt;.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Import the dotenv package inside the &lt;code&gt;hardhat.config.js&lt;/code&gt; or &lt;code&gt;hardhat.config.ts&lt;/code&gt; file like this &lt;code&gt;require(“dotenv”).config()&lt;/code&gt; (JavaScript) or &lt;code&gt;import “dotenv/config”&lt;/code&gt; (TypeScript).&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  Add the Sample Smart Contract for Verification
&lt;/h2&gt;

&lt;p&gt;This smart contract will be utilized for verification purposes.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;// SPDX-License-Identifier: MIT
pragma solidity ^0.8.17;

contract SimpleStorage {
    uint private storedData;

    function set(uint x) public {
        storedData = x;
    }

    function get() public view returns (uint) {
        return storedData;
    }
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ol&gt;
&lt;li&gt;&lt;p&gt;Create a file called &lt;code&gt;SimpleStorage.sol&lt;/code&gt; inside the contracts folder and add this to it.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Compile the smart contract by running the command &lt;code&gt;npx hardhat compile&lt;/code&gt;&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  Writing a Custom Verification Script
&lt;/h2&gt;

&lt;p&gt;To verify the functionality of this smart contract, it must first be deployed on a specific network. Utilizing the deployed contract’s address, the smart contract can then be verified on Etherscan.&lt;/p&gt;

&lt;p&gt;To do this Create a file called &lt;code&gt;verify-simple-storage.js&lt;/code&gt; or &lt;code&gt;verify-simple-storage.js&lt;/code&gt; inside the scripts folder and add this code inside it;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Note: Please note that both JavaScript and TypeScript code will be provided throughout this article. Kindly select the appropriate code examples based on the language being utilized in your implementation.&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="c1"&gt;// JavaScript&lt;/span&gt;
&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;ethers&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;network&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;run&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;hardhat&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="k"&gt;async&lt;/span&gt; &lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nf"&gt;verifyContract&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;chainId&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;network&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;config&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;chainId&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

    &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;simepleStorageFactory&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nx"&gt;ethers&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;getContractFactory&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
        &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;SimpleStorage&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;
    &lt;span class="p"&gt;);&lt;/span&gt;

    &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;args&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;[];&lt;/span&gt;

    &lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;`Deploying...`&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
    &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;simpleStorage&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nx"&gt;simepleStorageFactory&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;deploy&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;args&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
    &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nx"&gt;simpleStorage&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;deployed&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
    &lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;`Deployed!`&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
    &lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;`Simple Storage Address: &lt;/span&gt;&lt;span class="p"&gt;${&lt;/span&gt;&lt;span class="nx"&gt;simpleStorage&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;address&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="s2"&gt;`&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

    &lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;`Waiting for blocks confirmations...`&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
    &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nx"&gt;simpleStorage&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;deployTransaction&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;wait&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;6&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
    &lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;`Confirmed!`&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

    &lt;span class="c1"&gt;// * only verify on testnets or mainnets.&lt;/span&gt;
    &lt;span class="k"&gt;if &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;chainId&lt;/span&gt; &lt;span class="o"&gt;!=&lt;/span&gt; &lt;span class="mi"&gt;31337&lt;/span&gt; &lt;span class="o"&gt;&amp;amp;&amp;amp;&lt;/span&gt; &lt;span class="nx"&gt;process&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;env&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;ETHERSCAN_API_KEY&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nf"&gt;verify&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;simpleStorage&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;address&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;args&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;verify&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;async &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;contractAddress&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;args&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Verifying contract...&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
    &lt;span class="k"&gt;try&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nf"&gt;run&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;verify:verify&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
            &lt;span class="na"&gt;address&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;contractAddress&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
            &lt;span class="na"&gt;constructorArguments&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;args&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="p"&gt;});&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;catch &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;e&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="k"&gt;if &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;e&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;message&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;toLowerCase&lt;/span&gt;&lt;span class="p"&gt;().&lt;/span&gt;&lt;span class="nf"&gt;includes&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;already verified&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;))&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
            &lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Already verified!&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
        &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;else&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
            &lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;e&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
        &lt;span class="p"&gt;}&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;};&lt;/span&gt;

&lt;span class="nf"&gt;verifyContract&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
    &lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;then&lt;/span&gt;&lt;span class="p"&gt;(()&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="nx"&gt;process&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;exit&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;))&lt;/span&gt;
    &lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="k"&gt;catch&lt;/span&gt;&lt;span class="p"&gt;((&lt;/span&gt;&lt;span class="nx"&gt;error&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;error&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
        &lt;span class="nx"&gt;process&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;exit&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
    &lt;span class="p"&gt;});&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="c1"&gt;// TypeScript&lt;/span&gt;
&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;ethers&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;network&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;run&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;hardhat&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="k"&gt;async&lt;/span&gt; &lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nf"&gt;verifyContract&lt;/span&gt;&lt;span class="p"&gt;():&lt;/span&gt; &lt;span class="nb"&gt;Promise&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="k"&gt;void&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;chainId&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;network&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;config&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;chainId&lt;/span&gt;&lt;span class="o"&gt;!&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

    &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;simepleStorageFactory&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nx"&gt;ethers&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;getContractFactory&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
        &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;SimpleStorage&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;
    &lt;span class="p"&gt;);&lt;/span&gt;

    &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="na"&gt;args&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kr"&gt;any&lt;/span&gt;&lt;span class="p"&gt;[]&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;[];&lt;/span&gt;

    &lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;`Deploying...`&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
    &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;simpleStorage&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nx"&gt;simepleStorageFactory&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;deploy&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;args&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
    &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nx"&gt;simpleStorage&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;deployed&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
    &lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;`Deployed!`&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
    &lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;`Simple Storage Address: &lt;/span&gt;&lt;span class="p"&gt;${&lt;/span&gt;&lt;span class="nx"&gt;simpleStorage&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;address&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="s2"&gt;`&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

    &lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;`Waiting for blocks confirmations...`&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
    &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nx"&gt;simpleStorage&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;deployTransaction&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;wait&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;6&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
    &lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;`Confirmed!`&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

    &lt;span class="c1"&gt;// * only verify on testnets or mainnets.&lt;/span&gt;
    &lt;span class="k"&gt;if &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;chainId&lt;/span&gt; &lt;span class="o"&gt;!=&lt;/span&gt; &lt;span class="mi"&gt;31337&lt;/span&gt; &lt;span class="o"&gt;&amp;amp;&amp;amp;&lt;/span&gt; &lt;span class="nx"&gt;process&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;env&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;ETHERSCAN_API_KEY&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nf"&gt;verify&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;simpleStorage&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;address&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;args&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;verify&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;async &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;contractAddress&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kr"&gt;string&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;args&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kr"&gt;any&lt;/span&gt;&lt;span class="p"&gt;[])&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Verifying contract...&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
    &lt;span class="k"&gt;try&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nf"&gt;run&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;verify:verify&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
            &lt;span class="na"&gt;address&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;contractAddress&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
            &lt;span class="na"&gt;constructorArguments&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;args&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="p"&gt;});&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;catch &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="na"&gt;e&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kr"&gt;any&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="k"&gt;if &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;e&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;message&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;toLowerCase&lt;/span&gt;&lt;span class="p"&gt;().&lt;/span&gt;&lt;span class="nf"&gt;includes&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;already verified&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;))&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
            &lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Already verified!&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
        &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;else&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
            &lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;e&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
        &lt;span class="p"&gt;}&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;};&lt;/span&gt;

&lt;span class="nf"&gt;verifyContract&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
    &lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;then&lt;/span&gt;&lt;span class="p"&gt;(()&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="nx"&gt;process&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;exit&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;))&lt;/span&gt;
    &lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="k"&gt;catch&lt;/span&gt;&lt;span class="p"&gt;((&lt;/span&gt;&lt;span class="nx"&gt;error&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;error&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
        &lt;span class="nx"&gt;process&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;exit&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
    &lt;span class="p"&gt;});&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Let me explain what’s going on; (I am going to explain JavaScript but the Concepts are the same for both).&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="k"&gt;async&lt;/span&gt; &lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nf"&gt;verifyContract&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="p"&gt;{}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;As simple we are creating a &lt;code&gt;verifyContract&lt;/code&gt; JavaScript function.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="nf"&gt;verifyContract&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
  &lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;then&lt;/span&gt;&lt;span class="p"&gt;(()&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="nx"&gt;process&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;exit&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;))&lt;/span&gt;
  &lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="k"&gt;catch&lt;/span&gt;&lt;span class="p"&gt;((&lt;/span&gt;&lt;span class="nx"&gt;error&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
      &lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;error&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
      &lt;span class="nx"&gt;process&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;exit&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
  &lt;span class="p"&gt;});&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Calling it inside the script so the code gets executed when we run the script.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;chainId&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;network&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;config&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;chainId&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Within the function, we utilize the &lt;code&gt;network&lt;/code&gt; object provided by Hardhat to obtain the &lt;code&gt;chainId&lt;/code&gt; of the network. This obtained chainId is then utilized to verify the smart contract exclusively on either testnets or mainnets.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;simepleStorageFactory&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nx"&gt;ethers&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;getContractFactory&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
        &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;SimpleStorage&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;
    &lt;span class="p"&gt;);&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;By utilizing the &lt;code&gt;getContractFactory&lt;/code&gt; function from the ethers.js library, we can instantiate a factory object for our smart contract.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;The &lt;code&gt;getContractFactory&lt;/code&gt; function in the Ethereum JavaScript library ethers.js is used to create a contract factory object for a specific contract. This factory object can then be used to deploy new instances of the contract to the Ethereum blockchain. The factory takes the &lt;strong&gt;ABI (Application Binary Interface)&lt;/strong&gt; and &lt;strong&gt;bytecode&lt;/strong&gt; of the contract as input. The ABI is a JSON representation of the contract's interface, which describes the functions and events that the contract exposes. The bytecode is the compiled code of the contract that gets deployed to the blockchain. Once the factory is created, it can be used to deploy new instances of the contract by calling the &lt;strong&gt;deploy&lt;/strong&gt; method and passing in any necessary constructor arguments.&lt;br&gt;
&lt;/p&gt;
&lt;/blockquote&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;args&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;[];&lt;/span&gt;

&lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;`Deploying...`&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;simpleStorage&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nx"&gt;simepleStorageFactory&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;deploy&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;args&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nx"&gt;simpleStorage&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;deployed&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
&lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;`Deployed!`&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;`Simple Storage Address: &lt;/span&gt;&lt;span class="p"&gt;${&lt;/span&gt;&lt;span class="nx"&gt;simpleStorage&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;address&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="s2"&gt;`&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The variable &lt;code&gt;args&lt;/code&gt; represents the list of arguments for the smart contract constructor. However, in this instance, it is left empty as the &lt;code&gt;SimpleStorage&lt;/code&gt; contract does not require any arguments to be passed during instantiation.&lt;/p&gt;

&lt;p&gt;We use the &lt;code&gt;deploy&lt;/code&gt; function of the contractFactory to deploy the smart contract, passing in any necessary arguments as specified. This results in the instantiation of the &lt;code&gt;simpleStorage&lt;/code&gt; object, representing the deployed smart contract.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;`Waiting for blocks confirmations...`&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nx"&gt;simpleStorage&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;deployTransaction&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;wait&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;6&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;`Confirmed!`&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;We use the &lt;code&gt;wait&lt;/code&gt; function of the &lt;code&gt;deployTransaction&lt;/code&gt; of the smart contract instance to wait for a confirmation of 6 blocks. Waiting for block confirmations before verification of the smart contract ensures that the contract is properly recorded on the blockchain and its bytes codes are available for verification.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="c1"&gt;// * only verify on testnets or mainnets.&lt;/span&gt;
&lt;span class="k"&gt;if &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;chainId&lt;/span&gt; &lt;span class="o"&gt;!=&lt;/span&gt; &lt;span class="mi"&gt;31337&lt;/span&gt; &lt;span class="o"&gt;&amp;amp;&amp;amp;&lt;/span&gt; &lt;span class="nx"&gt;process&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;env&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;ETHERSCAN_API_KEY&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nf"&gt;verify&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;simpleStorage&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;address&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;args&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This section of the code establishes that the &lt;code&gt;verify&lt;/code&gt; function should only be called under certain conditions: the network must not be &lt;code&gt;hardhat&lt;/code&gt; or &lt;code&gt;localhost&lt;/code&gt; and an Etherscan API key must be present in the environment file. Once these conditions have been met, the &lt;code&gt;verify&lt;/code&gt; function is invoked, passing in the appropriate contract address and arguments.&lt;/p&gt;

&lt;h3&gt;
  
  
  Why can we not Verify for the Hardhat network?
&lt;/h3&gt;

&lt;p&gt;As &lt;code&gt;Hardhat&lt;/code&gt; is a local network, running exclusively on the user’s machine, it does not have a corresponding public blockchain for Etherscan to utilize for the verification of smart contracts.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="nx"&gt;solidity&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;0.8.17&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;span class="nx"&gt;networks&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nl"&gt;hardhat&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="na"&gt;chainId&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;31337&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="p"&gt;},&lt;/span&gt;
    &lt;span class="nx"&gt;localhost&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="nl"&gt;chainId&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;31337&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="p"&gt;},&lt;/span&gt;
&lt;span class="p"&gt;},&lt;/span&gt;
&lt;span class="nx"&gt;etherscan&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nl"&gt;apiKey&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;process&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;env&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;ETHERSCAN_API_KEY&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;span class="p"&gt;},&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;At this step, It is important to ensure that the networks object within the hardhat configuration file contains &lt;code&gt;Hardhat&lt;/code&gt; and &lt;code&gt;Localhost&lt;/code&gt; networks with a chainId of &lt;code&gt;31337&lt;/code&gt;, and that an &lt;code&gt;etherscan&lt;/code&gt; object is also present.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F1gqtiuuzicw23bxqnslf.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F1gqtiuuzicw23bxqnslf.png" alt="Verify Task - Hardhat" width="800" height="793"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;If you are using the most recent version of Hardhat that includes the &lt;code&gt;@nomicfoundation/hardhat-toolbox&lt;/code&gt; plugin then the &lt;code&gt;verify&lt;/code&gt; task is included by default. However, if this is not the case, it is necessary to install the &lt;code&gt;hardhat-etherscan&lt;/code&gt; plugin and configure it within the Hardhat configuration file in order for the verification process to be performed. Read more about it here &lt;a href="https://hardhat.org/hardhat-runner/docs/guides/migrating-from-hardhat-waffle" rel="noopener noreferrer"&gt;Migration away from hardhat-waffle&lt;/a&gt;.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nf"&gt;run&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;verify:verify&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="na"&gt;address&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;contractAddress&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="na"&gt;constructorArguments&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;args&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;span class="p"&gt;});&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;We utilize the &lt;code&gt;run&lt;/code&gt; function provided by Hardhat to execute the &lt;code&gt;verify&lt;/code&gt; task, passing in the appropriate contract address and smart contract constructor arguments. This step completes the process of verifying the smart contract on the Etherscan.&lt;/p&gt;

&lt;p&gt;As seen in the code, we are calling the &lt;code&gt;verify:verify&lt;/code&gt; subtask, which is a part of the larger &lt;code&gt;verify&lt;/code&gt; task. This subtask specifically handles the verification of the smart contract on the Etherscan. It is important to note that the &lt;code&gt;verify&lt;/code&gt; task contains various other subtasks that are not called in this particular instance.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="k"&gt;try&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nf"&gt;run&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;verify:verify&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="na"&gt;address&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;contractAddress&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="na"&gt;constructorArguments&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;args&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="p"&gt;});&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;catch &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;e&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="k"&gt;if &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;e&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;message&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;toLowerCase&lt;/span&gt;&lt;span class="p"&gt;().&lt;/span&gt;&lt;span class="nf"&gt;includes&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;already verified&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;))&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Already verified!&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;else&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;e&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;We have wrapped the execution of the &lt;code&gt;run&lt;/code&gt; function within a &lt;strong&gt;try-catch&lt;/strong&gt; block to handle any errors that may occur. In the event that the smart contract has already been verified, an error will be thrown and using the error message, we are informing the user that the contract has already been verified.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;// JavaScript
npx hardhat run scripts/verify-simple-storage.js &lt;span class="nt"&gt;--network&lt;/span&gt; goerli

// TypeScript
npx hardhat run scripts/verify-simple-storage.ts &lt;span class="nt"&gt;--network&lt;/span&gt; goerli
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;By executing the above command, we will be able to deploy the smart contract and subsequently verify it on Etherscan after waiting for 6 block confirmations. This allows for easy verification of the smart contract on the Ethereum blockchain.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="c1"&gt;// JavaScript&lt;/span&gt;
&lt;span class="nx"&gt;goerli&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nl"&gt;chainId&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;5&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="nx"&gt;url&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;process&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;env&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;GOERLI_RPC_URL&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="nx"&gt;accounts&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="nx"&gt;process&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;env&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;PRIVATE_KEY&lt;/span&gt;&lt;span class="p"&gt;],&lt;/span&gt;
    &lt;span class="nx"&gt;saveDeployments&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;true&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;span class="p"&gt;},&lt;/span&gt;

&lt;span class="c1"&gt;// TypeScript&lt;/span&gt;
&lt;span class="nx"&gt;goerli&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nl"&gt;chainId&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;5&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="nx"&gt;url&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;process&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;env&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;GOERLI_RPC_URL&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="nx"&gt;accounts&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="nx"&gt;process&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;env&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;PRIVATE_KEY&lt;/span&gt;&lt;span class="o"&gt;!&lt;/span&gt;&lt;span class="p"&gt;],&lt;/span&gt;
    &lt;span class="nx"&gt;saveDeployments&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;true&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;span class="p"&gt;},&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;It is important to note that before running the above command, the Goerli network should be added to the networks object in the configuration file. Additionally, the &lt;strong&gt;GOERLI_RPC_URL&lt;/strong&gt; and &lt;strong&gt;PRIVATE_KEY&lt;/strong&gt; environment variables should be defined in the &lt;strong&gt;env file&lt;/strong&gt; to ensure proper deployment and verification on the Goerli network.&lt;/p&gt;

&lt;p&gt;The &lt;strong&gt;GOERLI_RPC_URL&lt;/strong&gt;, which is required for connecting to the Goerli network, can be obtained from a platform such as &lt;a href="https://alchemy.com/?r=zgyNjczODQxNDUwM" rel="noopener noreferrer"&gt;Alchemy&lt;/a&gt;. The &lt;strong&gt;PRIVATE_KEY&lt;/strong&gt;, used for signing transactions, can be retrieved from a wallet service like &lt;strong&gt;MetaMask&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Note: It is important to keep in mind that the private key should be kept secure, and never shared with anyone. Additionally, it is important to ensure that the env file containing the private key is added to the .gitignore file before committing any code to a version control system, to prevent the private key from being accidentally exposed to the public.&lt;/strong&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Automated Verification of Smart Contracts
&lt;/h2&gt;

&lt;p&gt;Using the above script approach deploying and verifying smart contracts can be a straightforward process when working with a small number of contracts. However, as the number of contracts increases, this manual approach can become unwieldy and time-consuming for developers. The repetitive nature of running deployment and verification commands for each individual contract can pose a significant challenge for large-scale projects. A more efficient and scalable approach is needed to effectively manage and deploy a large number of smart contracts.&lt;/p&gt;

&lt;p&gt;It is important to note that in order to fully grasp this approach, a basic understanding of deploying smart contracts using the hardhat-deploy plugin is required. If you are not familiar with this method, it is recommended that you first read &lt;a href="https://dev.to/alymurtazamemon/learn-to-deploy-smart-contracts-more-professionally-with-hardhat-3253"&gt;Learn to Deploy Smart Contracts more Professionally with Hardhat&lt;/a&gt; article before proceeding.&lt;/p&gt;

&lt;p&gt;A best practice is to create a separate file for the verification function. This allows the function to be easily imported and reused across multiple files, making the deployment and verification process more efficient and streamlined.&lt;/p&gt;

&lt;p&gt;Create a &lt;code&gt;utils&lt;/code&gt; folder at the root location of the project. Within this folder, create a file named &lt;code&gt;verify.js&lt;/code&gt; or &lt;code&gt;verify.ts&lt;/code&gt;. Add the above verify function inside this file and export it.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="c1"&gt;// JavaScript&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;verify&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;require&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;../utils/verify&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

&lt;span class="c1"&gt;// TypeScript&lt;/span&gt;
&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="nx"&gt;verify&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;../utils/verify&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Import the verify function in your deploy file.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="c1"&gt;// JavaScript&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;args&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;[];&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;simpleStorage&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nf"&gt;deploy&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;SimpleStorage&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="na"&gt;from&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;deployer&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="na"&gt;log&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;true&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="na"&gt;args&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;args&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="na"&gt;waitConfirmations&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;chainId&lt;/span&gt; &lt;span class="o"&gt;==&lt;/span&gt; &lt;span class="mi"&gt;31337&lt;/span&gt; &lt;span class="p"&gt;?&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt; &lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;6&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;span class="p"&gt;});&lt;/span&gt;

&lt;span class="c1"&gt;// * only verify on testnets or mainnets.&lt;/span&gt;
&lt;span class="k"&gt;if &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;chainId&lt;/span&gt; &lt;span class="o"&gt;!=&lt;/span&gt; &lt;span class="mi"&gt;31337&lt;/span&gt; &lt;span class="o"&gt;&amp;amp;&amp;amp;&lt;/span&gt; &lt;span class="nx"&gt;process&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;env&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;ETHERSCAN_API_KEY&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nf"&gt;verify&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;simpleStorage&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;address&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;args&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="c1"&gt;// TypeScript&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;args&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kr"&gt;any&lt;/span&gt;&lt;span class="p"&gt;[]&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;[];&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;simpleStorage&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;DeployResult&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nf"&gt;deploy&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;SimpleStorage&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="na"&gt;from&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;deployer&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="na"&gt;log&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;true&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="na"&gt;args&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;args&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="na"&gt;waitConfirmations&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;chainId&lt;/span&gt; &lt;span class="o"&gt;==&lt;/span&gt; &lt;span class="mi"&gt;31337&lt;/span&gt; &lt;span class="p"&gt;?&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt; &lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;6&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;span class="p"&gt;});&lt;/span&gt;

&lt;span class="c1"&gt;// * only verify on testnets or mainnets.&lt;/span&gt;
&lt;span class="k"&gt;if &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;chainId&lt;/span&gt; &lt;span class="o"&gt;!=&lt;/span&gt; &lt;span class="mi"&gt;31337&lt;/span&gt; &lt;span class="o"&gt;&amp;amp;&amp;amp;&lt;/span&gt; &lt;span class="nx"&gt;process&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;env&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;ETHERSCAN_API_KEY&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nf"&gt;verify&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;simpleStorage&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;address&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;args&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Execute the verification function, providing the deployed contract’s address and any constructor arguments utilized during the deployment process.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;npx hardhat deploy &lt;span class="nt"&gt;--network&lt;/span&gt; goerli
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;With this approach, a single command can be used to deploy and verify all of the smart contracts located within the &lt;code&gt;deploy&lt;/code&gt; folder. This streamlined process eliminates the need for manually deploying and verifying each individual contract, resulting in a more efficient and manageable development process.&lt;/p&gt;

&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;In conclusion, verifying smart contracts on the Ethereum blockchain is an essential aspect of building trust and transparency in blockchain-based applications. By making the contract’s code publicly accessible and providing proof of deployment on the blockchain, developers can increase the visibility, credibility, and discoverability of their contracts. Verifying smart contracts is not just a good practice for blockchain-based application development, but it is also a way to increase the user’s trust and adoption of the application.&lt;/p&gt;

&lt;p&gt;This comprehensive guide aims to provide assistance to developers of all skill levels and is intended to be beneficial for a wide range of developers. Despite its length, the information provided is intended to be easily understandable and actionable for all readers.&lt;/p&gt;

&lt;p&gt;If you found this content helpful, please consider giving it a clap and leaving any feedback for future improvements. Your suggestions and comments are greatly appreciated and will help make these articles even more valuable for you and other readers.&lt;/p&gt;

&lt;p&gt;Be sure to follow me to receive updates on my future articles and stay informed of new content.&lt;/p&gt;

&lt;p&gt;Thank you&lt;/p&gt;

&lt;p&gt;&lt;a class="mentioned-user" href="https://dev.to/alymurtazamemon"&gt;@alymurtazamemon&lt;/a&gt; &lt;/p&gt;

</description>
      <category>blockchain</category>
      <category>solidity</category>
      <category>smartcontract</category>
      <category>verification</category>
    </item>
    <item>
      <title>Learn to Deploy Smart Contracts more Professionally with Hardhat</title>
      <dc:creator>Ali Murtaza Memon</dc:creator>
      <pubDate>Sat, 21 Jan 2023 13:00:23 +0000</pubDate>
      <link>https://dev.to/alymurtazamemon/learn-to-deploy-smart-contracts-more-professionally-with-hardhat-3253</link>
      <guid>https://dev.to/alymurtazamemon/learn-to-deploy-smart-contracts-more-professionally-with-hardhat-3253</guid>
      <description>&lt;p&gt;“A Step-by-Step Guide for Advanced Smart Contract Deployment”&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fz4x1x7up4i05oqd3956m.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fz4x1x7up4i05oqd3956m.png" alt="Hardhat" width="800" height="450"&gt;&lt;/a&gt;&lt;br&gt;
Hardhat is an open-source development environment for Ethereum smart contracts. It allows developers to test, debug and deploy their contracts on a local Hardhat network, providing a safe and secure environment for experimentation and development.&lt;/p&gt;

&lt;p&gt;One of the key features of Hardhat is its built-in Hardhat network, which allows developers to deploy and test their contracts without the need for a live network. This eliminates the risk of deploying untested code to the mainnet and incurring costly errors.&lt;/p&gt;

&lt;p&gt;But when it comes to deployment, this is what their statement is;&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;&lt;em&gt;There are no official plugins that implement a deployment system for Hardhat yet. We are working on it.&lt;br&gt;
In the meantime, we recommend deploying your smart contracts using scripts, or using &lt;a href="https://github.com/wighawag/hardhat-deploy/tree/master" rel="noopener noreferrer"&gt;the hardhat-deploy community plugin&lt;/a&gt;.&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;This means either we can use this type of Hardhat script to deploy our smart contracts.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;EXAMPLE OF Lock SAMPLE CONTRACT;&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;hre&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;require&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;hardhat&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

&lt;span class="k"&gt;async&lt;/span&gt; &lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nf"&gt;main&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;currentTimestampInSeconds&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nb"&gt;Math&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;round&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nb"&gt;Date&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;now&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="o"&gt;/&lt;/span&gt; &lt;span class="mi"&gt;1000&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;ONE_YEAR_IN_SECS&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;365&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="mi"&gt;24&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="mi"&gt;60&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="mi"&gt;60&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;unlockTime&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;currentTimestampInSeconds&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="nx"&gt;ONE_YEAR_IN_SECS&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;lockedAmount&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;hre&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;ethers&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;utils&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;parseEther&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;1&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;Lock&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nx"&gt;hre&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;ethers&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;getContractFactory&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Lock&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;lock&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nx"&gt;Lock&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;deploy&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;unlockTime&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="na"&gt;value&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;lockedAmount&lt;/span&gt; &lt;span class="p"&gt;});&lt;/span&gt;

  &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nx"&gt;lock&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;deployed&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;

  &lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
    &lt;span class="s2"&gt;`Lock with 1 ETH and unlock timestamp &lt;/span&gt;&lt;span class="p"&gt;${&lt;/span&gt;&lt;span class="nx"&gt;unlockTime&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="s2"&gt; deployed to &lt;/span&gt;&lt;span class="p"&gt;${&lt;/span&gt;&lt;span class="nx"&gt;lock&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;address&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="s2"&gt;`&lt;/span&gt;
  &lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="nf"&gt;main&lt;/span&gt;&lt;span class="p"&gt;().&lt;/span&gt;&lt;span class="k"&gt;catch&lt;/span&gt;&lt;span class="p"&gt;((&lt;/span&gt;&lt;span class="nx"&gt;error&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;error&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;error&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
  &lt;span class="nx"&gt;process&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;exitCode&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;});&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;or we can use &lt;a href="https://github.com/wighawag/hardhat-deploy/tree/master" rel="noopener noreferrer"&gt;the hardhat-deploy community plugin&lt;/a&gt; to deploy our contracts more professionally.&lt;/p&gt;

&lt;p&gt;When working with smart contract scripts, there are several scenarios where the script process can become a headache for developers. Here are a few examples:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;When deploying a large number of smart contracts, the process can become quite cumbersome, especially when using the default Hardhat deploy script. The script must be run individually for each contract, which can be time-consuming and prone to errors ( One approach to mitigate this issue is to create a separate script that can deploy all of the contracts together. While this can be an effective solution, it may not be ideal in situations where only a subset of the contracts need to be deployed. In such cases, it would be necessary to manually select which contracts to include in the deployment script, which can be time-consuming and prone to errors).&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;When testing smart contracts, it is often necessary to deploy the contracts on a test network before running the tests. This can be a time-consuming and error-prone process, especially when dealing with complex projects with a large number of smart contracts. Hardhat provides a way to manage this process with fixtures, but even with this feature, developers still need to write deploy fixtures functions at the start of the test script. This can be a headache when dealing with complex projects with many smart contracts.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;To mitigate these issues, it is important to adopt a more professional approach in order to overcome the challenges and headaches that can arise during the deployment process.&lt;/p&gt;

&lt;p&gt;The solution? “&lt;strong&gt;The hardhat-deploy community plugin&lt;/strong&gt;, as suggested by Hardhat documentation, provides a comprehensive solution for streamlining the deployment process of smart contracts, eliminating the challenges and headaches that can arise during the process.”&lt;/p&gt;

&lt;p&gt;Let’s explore the process of deploying smart contracts utilizing the Hardhat Deploy community plugin, and learn how to effectively utilize its features to streamline the deployment process.&lt;/p&gt;

&lt;p&gt;Here is an example of a basic smart contract written in Solidity:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;// SPDX-License-Identifier: MIT
pragma solidity ^0.8.17;

contract SimpleStorage {
    uint private storedData;

    function set(uint x) public {
        storedData = x;
    }

    function get() public view returns (uint) {
        return storedData;
    }
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This contract, called &lt;strong&gt;SimpleStorage&lt;/strong&gt;, has two functions: “&lt;strong&gt;set&lt;/strong&gt;” and “&lt;strong&gt;get&lt;/strong&gt;”. The “&lt;strong&gt;set&lt;/strong&gt;” function allows you to store a value (in this case, a uint, or unsigned integer) in the contract’s storage, and the “&lt;strong&gt;get&lt;/strong&gt;” function allows you to retrieve the stored value.&lt;/p&gt;

&lt;p&gt;To deploy this contract using the &lt;strong&gt;hardhat-deploy&lt;/strong&gt; plugin, you will first need to set up a local development environment. Follow these steps:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;Install Node.js and npm (Node Package Manager) on your computer.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Install Hardhat by running the command “&lt;strong&gt;npm install -g hardhat&lt;/strong&gt;” in your terminal.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Create a new directory for your project and navigate to it in your terminal.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Run the command “&lt;strong&gt;npx hardhat&lt;/strong&gt;” to set up a new Hardhat project in your current directory. This will show you these options;&lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F7kaqxxearxkeco04jyvy.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F7kaqxxearxkeco04jyvy.png" alt="Hardhat Projects Options" width="800" height="307"&gt;&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Select the “&lt;strong&gt;Create a JavaScript project&lt;/strong&gt;” or “&lt;strong&gt;Create a TypeScript project&lt;/strong&gt;” option.&lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F7jiqnq91vttu00xmvlxo.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F7jiqnq91vttu00xmvlxo.png" alt="Hardhat Project Root Location" width="800" height="259"&gt;&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Upon executing the command, the plugin will prompt for the root location of the project. Simply press the &lt;strong&gt;tab&lt;/strong&gt; key to confirm the default location and press &lt;strong&gt;Enter&lt;/strong&gt;.&lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F1m6q8ncw3p2g14drp87n.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F1m6q8ncw3p2g14drp87n.png" alt="gitignore File Option Prompt" width="800" height="283"&gt;&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;The plugin will then prompt for the inclusion of a &lt;strong&gt;.gitignore&lt;/strong&gt; file, you can choose to add it by typing ‘&lt;strong&gt;y&lt;/strong&gt;’ or to skip it by typing ’&lt;strong&gt;n&lt;/strong&gt;’ depending on your preference.&lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F85b2y5bkwjtcvu8ij6x7.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F85b2y5bkwjtcvu8ij6x7.png" alt="Hardhat Dependencies Prompt" width="800" height="302"&gt;&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;The plugin will then prompt to install the &lt;strong&gt;@nomicfoundation/hardhat-toolbox&lt;/strong&gt; plugin, you can choose to install it by typing ‘&lt;strong&gt;y&lt;/strong&gt;’ or to skip it by typing ’&lt;strong&gt;n&lt;/strong&gt;’ depending on your requirement.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;With the local development environment now set up, we can proceed with deploying the contract utilizing the Hardhat Deploy plugin. Before doing so, it is recommended to remove the default contract, script and test files provided by Hardhat. These files can be found in the contracts/, scripts/, and test/ folders, they should be removed to avoid confusion and potential errors.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;In order to utilize the Hardhat Deploy plugin, it must first be installed. To do this, run the command in the terminal or command prompt.&lt;br&gt;
&lt;/p&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;npm install -D hardhat-deploy
&lt;/code&gt;&lt;/pre&gt;

&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;The Hardhat Deploy plugin recommends installing &lt;code&gt;hardhat-deploy-ethers&lt;/code&gt; to access additional features related to deployments as &lt;strong&gt;ethers contract&lt;/strong&gt;. However, it is important to note that as &lt;code&gt;hardhat-deploy-ethers&lt;/code&gt; is a fork of &lt;code&gt;@nomiclabs/hardhat-ethers&lt;/code&gt;, other plugins might have a hardcoded dependency on &lt;code&gt;@nomiclabs/hardhat-ethers&lt;/code&gt;. To ensure compatibility, it is recommended to install &lt;code&gt;hardhat-deploy-ethers&lt;/code&gt; by following the command&lt;br&gt;
&lt;/p&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;npm &lt;span class="nb"&gt;install&lt;/span&gt; — save-dev @nomiclabs/hardhat-ethers@npm:hardhat-deploy-ethers ethers
&lt;/code&gt;&lt;/pre&gt;

&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Add the following statement to your &lt;code&gt;hardhat.config.js&lt;/code&gt;:&lt;br&gt;
&lt;/p&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="c1"&gt;// JavaScript&lt;/span&gt;
&lt;span class="nf"&gt;require&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;hardhat-deploy&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="c1"&gt;// TypeScript&lt;/span&gt;
&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;hardhat-deploy&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Now if you run the command &lt;code&gt;npx hardhat --help&lt;/code&gt; it will reveal a new task available, named 'deploy', which will be used to deploy the smart contracts.used to deploy the smart contracts.&lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fl2swmpqtecac76ugelz4.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fl2swmpqtecac76ugelz4.png" alt="Deploy Task" width="800" height="781"&gt;&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;To proceed with the deployment process, a new folder named ‘&lt;strong&gt;deploy&lt;/strong&gt;’ should be created, and a new file, named &lt;code&gt;01-deploy-simple-storage.ts&lt;/code&gt; or &lt;code&gt;01-deploy-simple-storage.js&lt;/code&gt;, should be created within it. It is important to ensure that the &lt;strong&gt;SimpleStorage&lt;/strong&gt; contract is added to the ‘&lt;strong&gt;contracts&lt;/strong&gt;’ folder and named &lt;code&gt;SimpleStorage.sol&lt;/code&gt; before proceeding. The structure will look like this (I am using &lt;strong&gt;Typescript&lt;/strong&gt;);&lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fkivrs8sef35k865tzhxf.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fkivrs8sef35k865tzhxf.png" alt="Project Structure" width="600" height="626"&gt;&lt;/a&gt; &lt;br&gt;
Why are we adding the &lt;strong&gt;01 prefixes&lt;/strong&gt; to the file? &lt;br&gt;
The inclusion of numerical prefixes, such as ‘01’, before the file names serves the purpose of indicating the sequence in which the deployment scripts should be executed when utilizing the ‘npx hardhat deploy’ task command. This ensures that all scripts present within the ‘deploy’ folder are executed in a specific order. Although this is a simple example with one smart contract, it is important to note that when working with multiple smart contracts, this method allows for a clear and organized structure, ensuring that the contracts are deployed in a specific sequence.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;The following code should be added to the previously created deployment file, depending on the language being used, either JavaScript or TypeScript.&lt;br&gt;
&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="c1"&gt;// TypeScript&lt;/span&gt;
&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;DeployFunction&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;DeployResult&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;hardhat-deploy/dist/types&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;HardhatRuntimeEnvironment&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;hardhat/types&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;network&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;hardhat&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="cm"&gt;/**
 * * Important Notes
 *
 * * In order to run `npx hardhat deploy --typecheck` command we need to add `import hardhat-deploy` in `hardhat.config.js` file.
 *
 */&lt;/span&gt;

&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;deploySimpleStorage&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;DeployFunction&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;async &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
    &lt;span class="nx"&gt;hre&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;HardhatRuntimeEnvironment&lt;/span&gt;
&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;deploy&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;hre&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;deployments&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;deployer&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nx"&gt;hre&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;getNamedAccounts&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
    &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;chainId&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;network&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;config&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;chainId&lt;/span&gt;&lt;span class="o"&gt;!&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

    &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="na"&gt;simpleStorage&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;DeployResult&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nf"&gt;deploy&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;SimpleStorage&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="na"&gt;from&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;deployer&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="na"&gt;log&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;true&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="na"&gt;args&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[],&lt;/span&gt;
        &lt;span class="na"&gt;waitConfirmations&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;chainId&lt;/span&gt; &lt;span class="o"&gt;==&lt;/span&gt; &lt;span class="mi"&gt;31337&lt;/span&gt; &lt;span class="p"&gt;?&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt; &lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;6&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="p"&gt;});&lt;/span&gt;
&lt;span class="p"&gt;};&lt;/span&gt;

&lt;span class="k"&gt;export&lt;/span&gt; &lt;span class="k"&gt;default&lt;/span&gt; &lt;span class="nx"&gt;deploySimpleStorage&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="nx"&gt;deploySimpleStorage&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;tags&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;all&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;simpleStorage&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;];&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="c1"&gt;// JavaScript&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;network&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;require&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;hardhat&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

&lt;span class="nx"&gt;module&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;exports&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;async &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;hre&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;deploy&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;hre&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;deployments&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;deployer&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nx"&gt;hre&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;getNamedAccounts&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
    &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;chainId&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;network&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;config&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;chainId&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

    &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;simpleStorage&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nf"&gt;deploy&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;SimpleStorage&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="na"&gt;from&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;deployer&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="na"&gt;log&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;true&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="na"&gt;args&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[],&lt;/span&gt;
        &lt;span class="na"&gt;waitConfirmations&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;chainId&lt;/span&gt; &lt;span class="o"&gt;==&lt;/span&gt; &lt;span class="mi"&gt;31337&lt;/span&gt; &lt;span class="p"&gt;?&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt; &lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;6&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="p"&gt;});&lt;/span&gt;
&lt;span class="p"&gt;};&lt;/span&gt;

&lt;span class="nx"&gt;module&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;exports&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;tags&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;all&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;simpleStorage&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;];&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Let me explain what’s going on; (I am going to explain JavaScript but the Concepts are the same for both).&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;network&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;require&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;hardhat&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This line of code imports the network from Hardhat, which will be used to automatically detect the network being used, whether it is localhost, testnet, or mainnet, from the command used.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="nx"&gt;module&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;exports&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;async &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;hre&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The code exports a deploy function, which will be passed an object, known as the &lt;strong&gt;Hardhat Runtime Environment&lt;/strong&gt;, by the Hardhat Deploy plugin.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;deploy&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;hre&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;deployments&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;deployer&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nx"&gt;hre&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;getNamedAccounts&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;chainId&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;network&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;config&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;chainId&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The &lt;strong&gt;hre&lt;/strong&gt; object is used to extract the &lt;strong&gt;deploy function&lt;/strong&gt; from the deployments, which will assist in deploying the smart contract with specified options. The &lt;strong&gt;deployer&lt;/strong&gt; is obtained through the hre’s &lt;strong&gt;getNamedAccounts&lt;/strong&gt; function, and the &lt;strong&gt;chainId&lt;/strong&gt; is obtained from the network.&lt;/p&gt;

&lt;p&gt;The &lt;strong&gt;deployer&lt;/strong&gt; is a &lt;strong&gt;label&lt;/strong&gt; assigned to the &lt;strong&gt;first account&lt;/strong&gt; on the network. To utilize this feature, the &lt;code&gt;hardhat.config.js&lt;/code&gt; file needs to be configured accordingly, as outlined below (Make sure it contains both JavaScirpt and TypeScript versions, select only one).&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;// TypeScript
const config: HardhatUserConfig = {
    solidity: "0.8.17",
    defaultNetwork: "hardhat",
    networks: {
        hardhat: {
            chainId: 31337,
        },
    },
    namedAccounts: {
        deployer: {
            default: 0,
        },
    },
};

// JavaScript
module.exports = {
    defaultNetwork: "hardhat",
    networks: {
        hardhat: {
            chainId: 31337,
        },
    },
    namedAccounts: {
        deployer: {
            default: 0
        },
    },
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;With the deployer obtained, the smart contract can now be deployed using the deploy function provided by hre.deployments.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;simpleStorage&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nf"&gt;deploy&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;SimpleStorage&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="na"&gt;from&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;deployer&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="na"&gt;log&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;true&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="na"&gt;args&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[],&lt;/span&gt;
    &lt;span class="na"&gt;waitConfirmations&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;chainId&lt;/span&gt; &lt;span class="o"&gt;==&lt;/span&gt; &lt;span class="mi"&gt;31337&lt;/span&gt; &lt;span class="p"&gt;?&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt; &lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;6&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;span class="p"&gt;});&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;In this step, the smart contract’s name is provided as the first parameter of the deploy function. The second parameter of the deploy function is an object that contains additional information for deployment.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;code&gt;from&lt;/code&gt;: field within the object specifies the address of the deployer or owner of the contract.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;code&gt;log&lt;/code&gt;: field within the object, if set to &lt;code&gt;true&lt;/code&gt;, will log information about the deployed smart contract’s address in the terminal.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;code&gt;args&lt;/code&gt;: field within the object, is an array that contains the parameters required for the smart contract’s constructor. Since our smart contract in this example does not have a constructor, an empty array is passed.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;code&gt;waitConfirmations&lt;/code&gt;: field within the object specifies the &lt;strong&gt;time delay&lt;/strong&gt; for waiting for the confirmation of the transaction of the deployed smart contract. Here, the condition to wait for &lt;strong&gt;1 block confirmation&lt;/strong&gt; for the &lt;strong&gt;Hardhat chain&lt;/strong&gt;, and &lt;strong&gt;6 block confirmations&lt;/strong&gt; for &lt;strong&gt;testnets or mainnets&lt;/strong&gt; is added. This is a recommended practice.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;With all necessary setup and configuration completed, the smart contract can now be deployed by executing the following command in the terminal.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;npx hardhat deploy

// deploy on goerli - make sure to setup goerli network in hardhat.config.js file before running this command.
npx hardhat deploy --network goerli

// deploy on any network - just add the network in hardhat.config.js file.
npx hardhat deploy --network &amp;lt;network-name&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F5o6t0fiy0u29yfj9far0.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F5o6t0fiy0u29yfj9far0.png" alt="Hardat deploy command" width="800" height="128"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The same process should be followed for deploying any additional smart contracts. Once the initial setup is completed, all contracts can be deployed simultaneously using this single command.&lt;/p&gt;

&lt;p&gt;With the Hardhat Deploy plugin, the need to run individual deployment scripts for each smart contract on the Hardhat node is eliminated. The plugin automatically deploys all smart contracts when the Hardhat node is opened, as demonstrated in the example provided.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F15l58rv03pki3t39sd21.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F15l58rv03pki3t39sd21.png" alt="Hardhat Node" width="800" height="971"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;With this setup in place, there is no need to redeploy your smart contract each time it is used in other scripts. By including the following line of code, the instance of the previously deployed contract can be accessed and utilized.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;const { deployer } = await getNamedAccounts();
const simpleStorage = await ethers.getContract("SimpleStorage", deployer);

// now you can call your smart contract public function and variable with just this instance.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;What if we only want to deploy selective deploy scripts from the deploy folder?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Do you remember this line we added at the end of our &lt;code&gt;01-simple-storage.js&lt;/code&gt; file?&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;module.exports.tags = ["all", "simpleStorage"];
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;In scenarios where only a specific set of smart contracts from the ‘deploy’ folder are intended to be deployed, the Hardhat Deploy plugin offers the capability to selectively deploy those contracts by providing their tags names as arguments to the command &lt;code&gt;npx hardhat deploy --tags &amp;lt;tag-name&amp;gt;&lt;/code&gt;, this allows for a more efficient deployment process by enabling the selective deployment of only the necessary smart contracts.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F8xcxag1svjsupnmhbdmp.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F8xcxag1svjsupnmhbdmp.png" alt="Hardhat Deploy Tags" width="800" height="112"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Use Deployed Smart Contracts in Tests
&lt;/h3&gt;

&lt;p&gt;An additional benefit of using the Hardhat Deploy plugin is the ability to ensure the deployment scripts are executed in tests as well.&lt;/p&gt;

&lt;p&gt;By calling &lt;code&gt;await deployments.fixture(['MyContract'])&lt;/code&gt; in your test, the same deployment is used for all tests, which eliminates the need to replicate the deployment procedure.&lt;/p&gt;

&lt;p&gt;To deploy all smart contracts before running tests, an ‘&lt;strong&gt;all&lt;/strong&gt;’ tag feature can be added to all deployment scripts, and this &lt;code&gt;await deployments.fixture(['all'])&lt;/code&gt; can be added to the test file. This enables the deployment of all contracts before the tests are executed, ensuring that the test environment accurately reflects the deployed state of the smart contracts.&lt;/p&gt;

&lt;p&gt;The '&lt;strong&gt;tag&lt;/strong&gt;' feature, as well as dependencies, also simplify the process of writing complex deployment procedures. The plugin also allows for the organization of the deploy scripts into sub-folders and execution in a logical order.&lt;/p&gt;

&lt;h3&gt;
  
  
  Conclusion
&lt;/h3&gt;

&lt;p&gt;Overall, Hardhat Deploy is a powerful and versatile tool that can greatly simplify and streamline the deployment process for smart contracts. It is widely used by developers and organizations in the Ethereum community and can be a great addition to your development workflow.&lt;/p&gt;

&lt;p&gt;This comprehensive guide aims to provide assistance to developers of all skill levels and is intended to be beneficial for a wide range of developers. Despite its length, the information provided is intended to be easily understandable and actionable for all readers.&lt;/p&gt;

&lt;p&gt;If you found this content helpful, please consider giving it a clap and leaving any feedback for future improvements. Your suggestions and comments are greatly appreciated and will help make these articles even more valuable for you and other readers.&lt;/p&gt;

&lt;p&gt;Be sure to follow me to receive updates on my future articles and stay informed of new content.&lt;/p&gt;

&lt;p&gt;Thank you&lt;/p&gt;

&lt;p&gt;&lt;a class="mentioned-user" href="https://dev.to/alymurtazamemon"&gt;@alymurtazamemon&lt;/a&gt; &lt;/p&gt;

</description>
      <category>blockchain</category>
      <category>solidity</category>
      <category>javascript</category>
      <category>typescript</category>
    </item>
    <item>
      <title>Best Resources to Learn Blockchain Development in 2023</title>
      <dc:creator>Ali Murtaza Memon</dc:creator>
      <pubDate>Tue, 03 Jan 2023 16:11:23 +0000</pubDate>
      <link>https://dev.to/alymurtazamemon/best-resources-to-learn-blockchain-development-in-2023-5bfb</link>
      <guid>https://dev.to/alymurtazamemon/best-resources-to-learn-blockchain-development-in-2023-5bfb</guid>
      <description>&lt;p&gt;Blockchain technology is a decentralised ledger that records transactions between parties efficiently and in a verifiable and permanent way.&lt;/p&gt;

&lt;p&gt;This is not just some future-tech buzzword: it’s happening now, and it’s changing the world.&lt;/p&gt;

&lt;p&gt;I’ve put together a list of resources to help you learn about blockchain technology in 2023!&lt;/p&gt;

&lt;h3&gt;
  
  
  1. Crypto Zombies
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--6qHjrtib--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/awcq95p0z6ra8sieqib0.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--6qHjrtib--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/awcq95p0z6ra8sieqib0.png" alt="Crypto Zombies" width="800" height="398"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;CryptoZombies is the largest education platform for blockchain development, it’s been around for 4+ years, with over 400k registered users that have finished multiple courses.&lt;/p&gt;

&lt;p&gt;CryptoZombies was the first tutorial on the internet for NFTs and is still very relevant to the new crop of web3 developers looking to enter the industry today. Currently, the CryptoZombies curriculum is mostly focused on Ethereum and Solidity development but is a lot of demand for content targeting other chains such as Binance, TRON, and even projects like Chainlink.&lt;/p&gt;

&lt;p&gt;In-browser step-by-step lessons take you from the very basics of Solidity to creating your own fully-functional blockchain-based game. Even by the end of Lesson 1 (which can be completed in one sitting), you’ll know enough to officially call yourself a blockchain developer!&lt;/p&gt;

&lt;p&gt;If you starting out with zero knowledge about Solidity, Tokens Standards and Blockchain, then you can start your blockchain development journey with Crypto Zombies courses. At the start, I would recommend you to just take 5 lessons of the Solidity: Beginner to Intermediate Smart Contracts course and then move on to the next resource I have mentioned to get the most in less time.&lt;/p&gt;


&lt;div class="crayons-card c-embed text-styles text-styles--secondary"&gt;
      &lt;div class="c-embed__cover"&gt;
        &lt;a href="https://cryptozombies.io/" class="c-link s:max-w-50 align-middle" rel="noopener noreferrer"&gt;
          &lt;img alt="" src="https://res.cloudinary.com/practicaldev/image/fetch/s--Y272S6g0--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://cryptozombies.io/images/preview_image.png" height="418" class="m-0" width="800"&gt;
        &lt;/a&gt;
      &lt;/div&gt;
    &lt;div class="c-embed__body"&gt;
      &lt;h2 class="fs-xl lh-tight"&gt;
        &lt;a href="https://cryptozombies.io/" rel="noopener noreferrer" class="c-link"&gt;
          #1 Solidity Tutorial &amp;amp; Ethereum Blockchain Programming Course | CryptoZombies
        &lt;/a&gt;
      &lt;/h2&gt;
        &lt;p class="truncate-at-3"&gt;
          CryptoZombies is The Most Popular, Interactive Solidity Tutorial That Will Help You Learn Blockchain Programming by Building Your Own Fun Game with Zombies — Master Blockchain Development with Web3, Infura, Metamask &amp;amp; Ethereum Smart Contracts and Become a Blockchain Developer in Record Time!.
        &lt;/p&gt;
      &lt;div class="color-secondary fs-s flex items-center"&gt;
          &lt;img alt="favicon" class="c-embed__favicon m-0 mr-2 radius-0" src="https://res.cloudinary.com/practicaldev/image/fetch/s--yygLNp69--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://cryptozombies.io/images/favicon.ico" width="750" height="750"&gt;
        cryptozombies.io
      &lt;/div&gt;
    &lt;/div&gt;
&lt;/div&gt;


&lt;h3&gt;
  
  
  2. Learn Blockchain, Solidity, and Full Stack Web3 Development with JavaScript — 32-Hour Course
&lt;/h3&gt;

&lt;p&gt;&lt;iframe width="710" height="399" src="https://www.youtube.com/embed/gyMwXuJrbJQ"&gt;
&lt;/iframe&gt;
&lt;/p&gt;

&lt;p&gt;After learning the basics of Solidity from Crypto Zombies you continue this course. This course will start with the Fundamentals of Smart Contracts and Why they are needed for the future. In addition to that, it will cover the basics of transactions, gas, accounts, etc.&lt;/p&gt;

&lt;p&gt;This course will give you a full introduction to all of the core concepts related to blockchain, smart contracts, Solidity, ERC20s, full-stack Web3 dapps, decentralized finance (DeFi), JavaScript, TypeScript, Chainlink, Ethereum, upgradable smart contracts, DAOs, the graph, moralis, Aave, IPFS, and more.&lt;/p&gt;

&lt;p&gt;After this course, you will be a Blockchain Wizard and ready to create any Decentralised Application you want.&lt;/p&gt;

&lt;h3&gt;
  
  
  3. Alchemy University
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--VywJKL0P--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/vo2xa7n9mhe835um9xwk.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--VywJKL0P--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/vo2xa7n9mhe835um9xwk.png" alt="Alchemy University" width="800" height="420"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Alchemy University is the ultimate ecosystem for learning how to build and interact with web3. Their goal is to teach you everything you need to know to start building in web3, from hands-on, comprehensive bootcamps to starter code that expedites your workflow.&lt;/p&gt;

&lt;p&gt;They are offering 3 different paths and you can continue with anyone based on your level of experience;&lt;/p&gt;

&lt;h4&gt;
  
  
  1. JavaScript Fundamentals
&lt;/h4&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--oTS_uEmF--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/xrfn8uymms4nq6zmte78.jpeg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--oTS_uEmF--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/xrfn8uymms4nq6zmte78.jpeg" alt="JavaScript Fundamentals" width="800" height="299"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;JavaScript foundation is very necessary in order to understand things and become a Blockchain Developer so if you do not know about it or lagging with some concepts then you can start this course first to build your foundations of programming and then continue Blockchain.&lt;/p&gt;

&lt;p&gt;This JavaScript crash course covers the basics of programming through advanced topics like asynchronous requests and promises. The most used developer tools and libraries for Ethereum are JavaScript based, making it a key foundation for web3 development.&lt;/p&gt;

&lt;h4&gt;
  
  
  2. Ethereum Developer Bootcamp
&lt;/h4&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--LhAOfh7S--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/r24pc4bdzx3cq11k9kx7.jpeg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--LhAOfh7S--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/r24pc4bdzx3cq11k9kx7.jpeg" alt="Ethereum Developer Bootcamp" width="800" height="264"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;This Bootcamp will take you from the ground up with strong fundamentals that will provide you with the ability to adapt to this rapidly evolving ecosystem. This Bootcamp places a heavy emphasis on learning by doing. You will build a full Proof-of-Work blockchain, many smart contracts and several decentralized applications.&lt;/p&gt;

&lt;p&gt;Anything you learn conceptually, you will prove to yourself through coding exercises. They have crafted an IDE and collaborative classroom tool to provide you with the ultimate Bootcamp experience.&lt;/p&gt;

&lt;p&gt;I personally recommend starting 3 lessons no matter your experience level, these fundamentals are super awesome.&lt;/p&gt;

&lt;h4&gt;
  
  
  3. Road to Web3
&lt;/h4&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--8DTBe7kS--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/vr7bo8psf2fs36ag28bq.jpeg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--8DTBe7kS--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/vr7bo8psf2fs36ag28bq.jpeg" alt="Road to Web3" width="800" height="310"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Road to Web3 is a free 10-week program for learning Web3 development. You’ll get to build dApps in DeFi, NFTs, Staking, and more!&lt;/p&gt;

&lt;p&gt;This is an amazing course to learn and build the portfolio DApps for your future jobs.&lt;/p&gt;


&lt;div class="crayons-card c-embed text-styles text-styles--secondary"&gt;
      &lt;div class="c-embed__cover"&gt;
        &lt;a href="https://university.alchemy.com/" class="c-link s:max-w-50 align-middle" rel="noopener noreferrer"&gt;
          &lt;img alt="" src="https://res.cloudinary.com/practicaldev/image/fetch/s--cwiLGhRv--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://university.alchemypreview.com/metatag_image.png" height="420" class="m-0" width="800"&gt;
        &lt;/a&gt;
      &lt;/div&gt;
    &lt;div class="c-embed__body"&gt;
      &lt;h2 class="fs-xl lh-tight"&gt;
        &lt;a href="https://university.alchemy.com/" rel="noopener noreferrer" class="c-link"&gt;
          Alchemy University
        &lt;/a&gt;
      &lt;/h2&gt;
        &lt;p class="truncate-at-3"&gt;
          Fast track your web3 career through courses, projects and code. Totally free.
        &lt;/p&gt;
      &lt;div class="color-secondary fs-s flex items-center"&gt;
          &lt;img alt="favicon" class="c-embed__favicon m-0 mr-2 radius-0" src="https://res.cloudinary.com/practicaldev/image/fetch/s--y13d8crc--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://university.alchemy.com/favicon.svg" width="230" height="230"&gt;
        university.alchemy.com
      &lt;/div&gt;
    &lt;/div&gt;
&lt;/div&gt;


&lt;h3&gt;
  
  
  4. SPEEDRUN ETHEREUM
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--iCIYfO8c--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/m7p3mec7lev1na6oylfp.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--iCIYfO8c--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/m7p3mec7lev1na6oylfp.png" alt="SPEEDRUN ETHEREUM" width="800" height="396"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Speedrun Ethereum is a challenging based platform which gives you the option to learn by building quick projects on Ethereum. Some of the projects are Simple NFT Example, Decentralized Staking App, Token Vendor, etc.&lt;/p&gt;

&lt;p&gt;They have an amazing playlist on youtube that transitions you from Web2 to Web3.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--se5UVike--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/y48kjjrmy9ungj9mivdp.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--se5UVike--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/y48kjjrmy9ungj9mivdp.png" alt="Web2 to Web3 — learn how to build on Ethereum" width="800" height="447"&gt;&lt;/a&gt;&lt;/p&gt;


&lt;div class="crayons-card c-embed text-styles text-styles--secondary"&gt;
    &lt;a href="https://speedrunethereum.com/" rel="noopener noreferrer"&gt;
      speedrunethereum.com
    &lt;/a&gt;
&lt;/div&gt;


&lt;h3&gt;
  
  
  5. Buildspace
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--Zd3txwED--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/9scrvbzo6hf7whjm06pt.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--Zd3txwED--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/9scrvbzo6hf7whjm06pt.png" alt="Buildspace" width="800" height="397"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Buildspace is another awesome platform which provides project-based learning on Ethereum and other different chains such as Solana.&lt;/p&gt;

&lt;p&gt;It provides different courses such as Intro to Solidity: Ship an Ethereum dApp, Build your own Ethereum NFT Collection, Build a DAO, etc.&lt;/p&gt;

&lt;p&gt;This is another awesome platform where you can build amazing projects for your portfolio that can help you get into the blockchain space.&lt;/p&gt;


&lt;div class="crayons-card c-embed text-styles text-styles--secondary"&gt;
    &lt;a href="https://buildspace.so/" rel="noopener noreferrer"&gt;
      buildspace.so
    &lt;/a&gt;
&lt;/div&gt;


&lt;h3&gt;
  
  
  6. LearnWeb3
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--kwzCYcN0--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/z9w8e3xopsa0ne4hjrh2.jpeg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--kwzCYcN0--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/z9w8e3xopsa0ne4hjrh2.jpeg" alt="LearnWeb3" width="800" height="381"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;LearnWeb3 is another Web3 platform that provides different tracks for each level of developers out there. Each track contains many articles that cover tons of topics required for web3. If you are totally new you can start with their Freshman track which can provide a solid ground for your web3 journey.&lt;/p&gt;

&lt;p&gt;They have other three tracks, Sophomore, Junior, and Senior which can help you learn advanced topics with the flow.&lt;/p&gt;


&lt;div class="crayons-card c-embed text-styles text-styles--secondary"&gt;
      &lt;div class="c-embed__cover"&gt;
        &lt;a href="https://learnweb3.io/" class="c-link s:max-w-50 align-middle" rel="noopener noreferrer"&gt;
          &lt;img alt="" src="https://res.cloudinary.com/practicaldev/image/fetch/s--ExZnKyfe--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://learnweb3.io/api/og.png" height="420" class="m-0" width="800"&gt;
        &lt;/a&gt;
      &lt;/div&gt;
    &lt;div class="c-embed__body"&gt;
      &lt;h2 class="fs-xl lh-tight"&gt;
        &lt;a href="https://learnweb3.io/" rel="noopener noreferrer" class="c-link"&gt;
          LearnWeb3 - Become a Web3 Developer for free!
        &lt;/a&gt;
      &lt;/h2&gt;
        &lt;p class="truncate-at-3"&gt;
          LearnWeb3 is a free platform to take you from zero to hero in Web3. Join 90k+ developers in our mission to make learning permissionless and collaborative.
        &lt;/p&gt;
      &lt;div class="color-secondary fs-s flex items-center"&gt;
          &lt;img alt="favicon" class="c-embed__favicon m-0 mr-2 radius-0" src="https://res.cloudinary.com/practicaldev/image/fetch/s--6LmjxWwa--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://learnweb3.io/favicon-32x32.png%3Fv%3D1" width="32" height="32"&gt;
        learnweb3.io
      &lt;/div&gt;
    &lt;/div&gt;
&lt;/div&gt;


&lt;h3&gt;
  
  
  7. BANKLESS ACADEMY
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--K-dvq8bc--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/5lh4ebz2p3tp6kanprsv.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--K-dvq8bc--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/5lh4ebz2p3tp6kanprsv.png" alt="BANKLESS ACADEMY" width="800" height="370"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Bankless Academy is on a mission to ensure every web3 Explorer is ready for their crypto-verse voyage.&lt;/p&gt;

&lt;p&gt;Using the Academy platform you’ll be taking a confident first step into the new frontier, before diving down your own unique learning path and preparing to blaze new trails across blockchain space.&lt;/p&gt;


&lt;div class="crayons-card c-embed text-styles text-styles--secondary"&gt;
      &lt;div class="c-embed__cover"&gt;
        &lt;a href="https://app.banklessacademy.com/" class="c-link s:max-w-50 align-middle" rel="noopener noreferrer"&gt;
          &lt;img alt="" src="https://res.cloudinary.com/practicaldev/image/fetch/s--IXXgBod2--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://app.banklessacademy.com/images/bankless_academy_v3.jpg" height="419" class="m-0" width="800"&gt;
        &lt;/a&gt;
      &lt;/div&gt;
    &lt;div class="c-embed__body"&gt;
      &lt;h2 class="fs-xl lh-tight"&gt;
        &lt;a href="https://app.banklessacademy.com/" rel="noopener noreferrer" class="c-link"&gt;
          Bankless Academy
        &lt;/a&gt;
      &lt;/h2&gt;
        &lt;p class="truncate-at-3"&gt;
          Level up your knowledge of Web3 and DeFi
        &lt;/p&gt;
      &lt;div class="color-secondary fs-s flex items-center"&gt;
          &lt;img alt="favicon" class="c-embed__favicon m-0 mr-2 radius-0" src="https://res.cloudinary.com/practicaldev/image/fetch/s--23UZE-cK--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://app.banklessacademy.com/favicon.png" width="200" height="200"&gt;
        app.banklessacademy.com
      &lt;/div&gt;
    &lt;/div&gt;
&lt;/div&gt;


&lt;h3&gt;
  
  
  8. Developer DAO Academy
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--6_wXgykV--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/e4gl0i2txwt50lpo91bi.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--6_wXgykV--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/e4gl0i2txwt50lpo91bi.png" alt="Developer DAO Academy" width="800" height="398"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;D_D Academy is an open-source education platform created by the Developer DAO.&lt;/p&gt;

&lt;p&gt;They seek to empower learners with knowledge and tools that can be applied to real-world projects while promoting a healthy learning environment.&lt;/p&gt;

&lt;p&gt;In addition to that, Developer DAO is one the best community out there, which can help you grow your web3 carrier along with other link-minded people.&lt;/p&gt;


&lt;div class="crayons-card c-embed text-styles text-styles--secondary"&gt;
      &lt;div class="c-embed__cover"&gt;
        &lt;a href="https://school-of-code.vercel.app/" class="c-link s:max-w-50 align-middle" rel="noopener noreferrer"&gt;
          &lt;img alt="" src="https://res.cloudinary.com/practicaldev/image/fetch/s--1L2bbbIF--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://academy-jf0ektg6f-developdao.vercel.app/landing-page-screenshot.png" height="452" class="m-0" width="800"&gt;
        &lt;/a&gt;
      &lt;/div&gt;
    &lt;div class="c-embed__body"&gt;
      &lt;h2 class="fs-xl lh-tight"&gt;
        &lt;a href="https://school-of-code.vercel.app/" rel="noopener noreferrer" class="c-link"&gt;
          Developer DAO Academy | Learn Web3
        &lt;/a&gt;
      &lt;/h2&gt;
        &lt;p class="truncate-at-3"&gt;
          D_D Academy is on a mission to educate coders to the exciting possibilities of building web3 Open Source.
        &lt;/p&gt;
      &lt;div class="color-secondary fs-s flex items-center"&gt;
          &lt;img alt="favicon" class="c-embed__favicon m-0 mr-2 radius-0" src="https://res.cloudinary.com/practicaldev/image/fetch/s--SXs6IW8B--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://school-of-code.vercel.app/favicon/favicon.ico" width="48" height="48"&gt;
        school-of-code.vercel.app
      &lt;/div&gt;
    &lt;/div&gt;
&lt;/div&gt;


&lt;h3&gt;
  
  
  9. Ethereum Developer Resources
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--FEYoqdUt--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/5hh6ptiw6jzpgzb2bvr7.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--FEYoqdUt--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/5hh6ptiw6jzpgzb2bvr7.png" alt="Ethereum Developer Resources" width="800" height="395"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;ethereum.org is the official website of Ethereum to help you build with Ethereum with the documentation on foundational concepts as well as the development stack. Plus there are tutorials to get you up and running.&lt;/p&gt;

&lt;p&gt;Inspired by the Mozilla Developer Network, they placed great developer content and resources there. Everything here is open-source and ready for you to extend and improve.&lt;/p&gt;


&lt;div class="crayons-card c-embed text-styles text-styles--secondary"&gt;
      &lt;div class="c-embed__cover"&gt;
        &lt;a href="https://ethereum.org/en/developers/" class="c-link s:max-w-50 align-middle" rel="noopener noreferrer"&gt;
          &lt;img alt="" src="https://res.cloudinary.com/practicaldev/image/fetch/s--CB_X9oy8--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://ethereum.org/static/bf78b49d7e23b88a7eea934225b0cf96/1548e/enterprise-eth.png" height="548" class="m-0" width="800"&gt;
        &lt;/a&gt;
      &lt;/div&gt;
    &lt;div class="c-embed__body"&gt;
      &lt;h2 class="fs-xl lh-tight"&gt;
        &lt;a href="https://ethereum.org/en/developers/" rel="noopener noreferrer" class="c-link"&gt;
          Ethereum Developer Resources | ethereum.org
        &lt;/a&gt;
      &lt;/h2&gt;
        &lt;p class="truncate-at-3"&gt;
          Documentation, tutorials, and tools for developers building on Ethereum.
        &lt;/p&gt;
      &lt;div class="color-secondary fs-s flex items-center"&gt;
          &lt;img alt="favicon" class="c-embed__favicon m-0 mr-2 radius-0" src="https://res.cloudinary.com/practicaldev/image/fetch/s--lxs0_6zm--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://ethereum.org/favicon-32x32.png%3Fv%3D8b512faa8d4a0b019c123a771b6622aa" width="32" height="32"&gt;
        ethereum.org
      &lt;/div&gt;
    &lt;/div&gt;
&lt;/div&gt;


&lt;h3&gt;
  
  
  Conclusion
&lt;/h3&gt;

&lt;p&gt;Alright, so these were all the amazing resources that I know can create a great impact and give the push the start your blockchain development journey.&lt;/p&gt;

&lt;p&gt;Definatly you do not have to go throw each and every resource I mentioned just explore and continue with the one which makes you feel interested. Every person is different some likes to watch videos and some likes to read due to that I have mentioned all these for your choice.&lt;/p&gt;

&lt;p&gt;Knowledge grows by sharing it with others! I have devoted my time to helping others out there with the knowledge and resources I have. Make sure to do the same and share this with the ones who are starting their carrier in the blockchain space.&lt;/p&gt;

&lt;p&gt;Thanks&lt;br&gt;
&lt;a class="mentioned-user" href="https://dev.to/alymurtazamemon"&gt;@alymurtazamemon&lt;/a&gt; &lt;/p&gt;

</description>
      <category>blockchain</category>
      <category>web3</category>
      <category>solidity</category>
      <category>career</category>
    </item>
  </channel>
</rss>
