# Scaffold-Eth Quickstart | Web3.0 dApp Dev 0x03

By [leeduckgo](https://paragraph.com/@leeduckgo) · 2021-10-27

---

Introduction
------------

Scaffold-eth is a template for Ethereum dApp, and a combination of the best dApps. Scaffold-eth can help developers build app with efficiency and less bugs. It is a great resource for beginner developers of web3.0 dApp.

Scaffold-eth has the following components:

*   **hardhat:** run local Ethereum network to deploy and test smart contract
    
*   **React:** build front end with preset UI components and functional hooks
    
*   **Ant:** build customized UI and use Bootstrap or other libraries for front end
    
*   **Surge:** deploy and publish projects
    
*   Tenderly / The Graph / Etherscan / Infura / Blocknative...
    
*   Supports for L2 / Sidechains
    

Swift deployment
----------------

### Environment

Scafford Eth is based on Node.js, so you need to install `node.js` and `yarn`.

### Deploy Scaffold-eth scaffold

1.  Fetch scaffold source code
    

    git clone https://github.com/austintgriffith/scaffold-eth.git
    

1.  Open up 3 terminals
    

> **TIPS:** Many Terminal app supports split screen feature.

image-20210924203810255

1.  run 👷‍ Hardhat chain in the first terminal:
    

    cd scaffold-eth
    yarn install
    yarn chain
    

![](https://storage.googleapis.com/papyrus_images/f6eae9718eab81eea5c457f85642d57fd575652db23aefd4e38d18439cb30b36.png)

1.  deploy the smart contract at `/scaffold-eth/packages/hardhat/contracts/` in the second terminal:
    

    cd scaffold-eth
    yarn deploy
    

![](https://storage.googleapis.com/papyrus_images/759ec29951be8d77a84ce3390379bce7fb728b7b5e859cbd1a7d6d262a1a90ee.png)

1.  run front end app in the third terminal:
    

    cd scaffold-eth
    yarn start
    

![](https://storage.googleapis.com/papyrus_images/bbc45e0eb0dd9a0731684089d5e306778789a7bf370cbc396c3ff97e3e2b461f.png)

The sample contract under main branch stores and read the values. You can find the contract at `/scaffold-eth/packages/hardhat/contracts/` and modify it then redeploy.

> **TIPS：**
> 
> If you are interested in other contracts, you can checkout other branch to deploy different Dapp services. [switchable branches with different contracts](https://github.com/scaffold-eth/scaffold-eth/branches/active) for example nft contract branch [https://github.com/scaffold-eth/scaffold-eth/tree/simple-nft-example](https://github.com/scaffold-eth/scaffold-eth/tree/simple-nft-example)

play with the application
-------------------------

Back to the previous process. Now we have our contract deployed and front end and local chain network running.

Below is the code of the deployed contract.

    pragma solidity >=0.8.0 <0.9.0;
    //SPDX-License-Identifier: MIT
    
    import "hardhat/console.sol";
    //import "@openzeppelin/contracts/access/Ownable.sol"; //https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/access/Ownable.sol
    
    contract YourContract {
    
      //event SetPurpose(address sender, string purpose);
    
      string public purpose = "Building Unstoppable Apps!!!";
    
      constructor() {
        // what should we do on deploy?
      }
    
      // Storing purpose varible
      function setPurpose(string memory newPurpose) public {
          purpose = newPurpose;
          console.log(msg.sender,"set purpose to",purpose);
          //emit SetPurpose(msg.sender, purpose);
      }
    }
    

The contract sets a public string variable purpose. The default value for purpose is "Building..." It also provides a setPurpose method to modify the purpose variable.

Conclusion
----------

We built our Dapp with the scaffold scaffold-eth. Using hardhat, we can deploy local test network, switch networks and deploy your contracts in any networks. Here is the Quickstart for scaffold-eth.

About authors
-------------

**Author:** Core member of Nonce Geek Studio.

**Contact the author:**

WeChat: thf056 QQ: 1290017556 Email: [1290017556@qq.com](mailto:1290017556@qq.com)

> Github: [https://github.com/99kies](https://github.com/99kies)
> 
> CSDN: [https://blog.csdn.net/qq\_19381989](https://blog.csdn.net/qq_19381989)

**Translater：**

[msfew](https://noncegeek.com/namecards/msfew.svg?display=iframe)

---

*Originally published on [leeduckgo](https://paragraph.com/@leeduckgo/scaffold-eth-quickstart-web3-0-dapp-dev-0x03)*
