Udemy
    •  
    •  
    •  
    •  
    •  
    •  
    •  
    •  
Turn what you know into an opportunity and reach millions around the world.
Learn More
Your cart is empty.
Keep shopping
Create First DApp Using Truffle and Ganache
Rating: 4.5 out of 5(49 ratings)
1,514 students

Create First DApp Using Truffle and Ganache

Learn to create DApp
Created byGaurav Garg
Last updated 4/2022
English

What you'll learn

  • Use Truffle for creating DApp
  • Compile, migrate and test run using Local Blockchain
  • Learn to use Ganache
  • Interact with DApp using local Blockchain

Course content

3 sections10 lectures32m total length
  • Introduction to get started with Truffle and Ganache1:00

    Blockchain has become a buzzword over the past few years.

    In this course we will take you through the process of building your first dapp called an adoption tracking system for a pet shop!

    This course, we're going to cover


    Truffle, which is a

    A world class development environment, testing framework for blockchains using the Ethereum Virtual Machine (EVM).



    and Ganahe which is a personal blockchain for rapid Ethereum distributed application development.


    Hi, I am Gaurav garg, It'll be my pleasure to bring you on this blockchain dApp journey with the Truffle and Ganache.

    In this tutorial we will be covering:

    Setting up the development environment

    Creating a Truffle project using a Truffle Box

    Writing the smart contract

    Compiling and migrating the smart contract

    Testing the smart contract

    and Interacting with the dapp in a browser

    So if you're ready to create your first dApp. lets get started.

  • What You Should Know0:33

    To Create Decentralized Application or in short say dApp, you should have some knowledge using blockchain, or at least understanding the basics of what blockchain is

    and how it works will help you.

    This tutorial is meant for those with a basic knowledge of Ethereum and smart contracts,

    who have some knowledge of HTML and JavaScript, but who are new to dapps.


    You can develop your dApp on a Mac, Windows, or Linux. So the environment you use won't have any impact on creating your dApp.

  • System Requirements3:47

    There are a few technical requirements before we start writing our first dApp. We need to install the following:


    Node.js v 16.14.2 LTS and npm version 8.5.0, these are the latest versions for node js and npm currently while making this tutorial.

    Then we are going to install Truffle and Ganache.


    so lets start with installing node js.

    To install the node js, we are going to open our web browser and search for node js, we can see the link which comes with nodejs website.

    we are going click this link and open the node js website. Once you enter the website click on Downloads button, and we can see here the lastest node

    version is 16.14.2 and this includes npm 8.5.0, so this installer actually includes both node js and npm, we dont require here to install the npm separately.

    I am using windows so I am going to install the windows installer. Once its Downloads we can left click here and then press on show in finder to go to the place

    where its actually downloaded.


    Now we are going to run this installer, click next, accept the license agreement, click next.

    You can change the location if you want but I would recommend to install on Program Files Folder in c Drive. Then we click next.

    We can see the npm package manager is here as well, we click next, next again and install. Once it done click finish. 


    To check if its install properly, We will use command prompt to open. 

    Use a shortcut, (window + R), for run prompt and type cmd to open it.


    now we will type node -v, to check the version of node

    we will do the same step for npm, type npm -v to check the npm version. we can see the versions here and we can say we are done with install node js and npm.

    Now its time to install truffle.


    To install the truffle we are going to type in command propmpt, npm install -g truffle.

    It will take few mins to install the truffle, so I am going to skip the waiting time.

    To verify that Truffle is installed properly, type truffle version on a command prompt

    and it will show the version number of truffle, we can see here that truffle is installed with version v5.5.7


    now last step is to install Ganache, we will open the web browser, and go for trufflesuite website and look for ganache.

    we click on download button to download the Ganache installer.

    Run the installer and

    We can click on Launch after installation to check if its working.

    We dont need to worry about Ganache for now, We will learn in the later lesson how to use and work with Ganache.


    Now we are done with installing all requirement to start with DApp.

    In the next video we are going to start creating the truffle project.

Requirements

  • Understanding of Blockchain, Ethereum and Solidity language

Description

This tutorial will take you through the process of building your first dapp---an adoption tracking system for a pet shop!

This tutorial is meant for those with a basic knowledge of Ethereum and smart contracts, who have some knowledge of HTML and JavaScript, but who are new to dapps.

  1. In this tutorial we will be covering:

    1. Setting up the development environment

    2. Creating a Truffle project using a Truffle Box

    3. Writing the smart contract

    4. Compiling and migrating the smart contract

    5. Testing the smart contract

    6. Creating a user interface to interact with the smart contract

    7. Interacting with the dapp in a browser.

Pete Scandlon of Pete's Pet Shop is interested in using Ethereum as an efficient way to handle their pet adoptions. The store has space for 16 pets at a given time, and they already have a database of pets. As an initial proof of concept, Pete wants to see a dapp which associates an Ethereum address with a pet to be adopted.

The website structure and styling will be supplied. Our job is to write the smart contract and front-end logic for its usage.


Truffle is a world class development environment, testing framework and asset pipeline for blockchains using the Ethereum Virtual Machine (EVM), aiming to make life as a developer easier. With Truffle, you get:

  • Built-in smart contract compilation, linking, deployment and binary management.

  • Automated contract testing for rapid development.

  • Scriptable, extensible deployment & migrations framework.

  • Network management for deploying to any number of public & private networks.

  • Package management with EthPM & NPM, using the ERC190 standard.

  • Interactive console for direct contract communication.

  • Configurable build pipeline with support for tight integration.

  • External script runner that executes scripts within a Truffle environment.

Who this course is for:

  • Beginners for Creating first Decentralised Application (DApp).