GithubHelp home page GithubHelp logo

dapp-template's Introduction

Harmony Dapp Template Beginner

Template setup

  1. npm install.
  2. After npm install, setup Metamask wallet in your browser. The setup guide can follow via link [https://docs.harmony.one/home/network/wallets/browser-extensions-wallets/metamask-wallet].
  3. Once you done setting up the Metamask wallet with Harmony Testnet, in the file hardhat.config.js replace the HARMONY_PRIVATE_KEY with your own Harmony private key. At the bottom of the file you will see network testnet with using this private key which mean the later contract transaction will link to this account.
  4. Next, open node and run npx hardhat run --network testnet scripts/deploy.js, the testnet here is what we setup in the previous step. Once the command executed, you are suppose to see a line in node which mentioned contract deployed to which address, copy the address and go to App.js, paste the address to the line PASTE_YOUR_CONTRACT_ADDRESS_HERE
  5. Everything should be work now, You are now test and play around with the template.

How it works

template-showcase

How to edit the contract

  1. You can edit the Transaction.sol inside the contracts folder.
  2. Everytime you edit the contract, you are required to compile with using command npx hardhat compile.

Other

  • This template can help you connect to Metamask, MathWallet and WalletConnect. But for test case, signing of contract is using ONLY Metamask. If you need to execute transaction with other wallet, you may need to edit the signing methods based on different wallets connected.
  • A simple template for beginner can play around and get the concept. Hope the UI can help also for whoever need some UI template for Hackhathon etc.
  • Happy Coding.

#ReactJS #Hardhat #etherjs

dapp-template's People

Contributors

nicholasangks avatar

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.