Giter VIP home page Giter VIP logo

sample-dapp's Introduction

Sample Dapp

Instructions

  1. yarn add ethers hardhat @nomiclabs/hardhat-waffle ethereum-waffle chai @nomiclabs/hardhat-ethers

  2. npx hardhat to initialize the smart contract

    init-smart-contract
  3. npx hardhat compile to compile the Greeter.sol and create the smart contract

  4. We will use abi(application binary interface) inside of src/artifacts/contracts/Greeter.sol/Greeter.json We are going to be importing this to our frontend app to interact with the smart contract

  5. npx hardhat node to run a local test network to deploy this smart contract inside our local blockchain, it will give us 20 accounts to work with

  6. npx hardhat run scripts/deploy.js --network localhost is going to deploy smart contract to the local test network. It will give the address of the deployed smart contract at the end

  7. deploy-smart-contract-local
  8. You need to install metamask as an extension to the browser

  9. Connect to localhost 8545 instead of Ethereum Mainnet

  10. import-test-account
  11. Import the first test account that is created by running npx hardhat node

  12. import-test-account
  13. As a result you will see (10.00 ETH - smart contract gas fee) amount of Tets Ethereum in your metamask

  14. our-imported-local-account

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.