Coder Social home page Coder Social logo

hardhat-local-deploy's Introduction

Hardhat-Local-Deploy

All the commands from creating a react app to deploying to localhost

Local creation Commands:

1. npx create-react-app react-dapp
2. cd react-dapp/
3. npm install ethers hardhat @nomiclabs/hardhat-waffle ethereum-waffle chai @nomiclabs/hardhat-ethers

i. Ethers - To interact with Smart Contract from Frontend.
ii. Hardhat - Hardhat is an Ethereum development environment. Compile your contracts and run them on a development network.
Hardhat dependencies - hardhat-waffle, ethereum-waffle, hardhat-ethers
iii. Chai - For testing

4. npx hardhat

Initializes hardhat developement envioronment also creates a basic project with all the configurations we will need(You can choose between Js or Ts)
(Delete the default README.md file created before to solve the conflict). Will also create a basic smart contract by default, creates hardhat.config.js / hardhat.config.ts

5. npx hardhat compile    

To compile all the solidity files

6. npx hardhat node

To run local test network giving us multiple accounts to transact

7. npx hardhat run scripts/deploy.js --network localhost

To deploy in local network

8. npm start

Start the frontend react app

hardhat.config.js file

require("@nomicfoundation/hardhat-toolbox");

/** @type import('hardhat/config').HardhatUserConfig */
module.exports = {
  networks: {
    hardhat: {
      chainId: 1337,
    },    
  },
  solidity: "0.8.9",
};

hardhat-local-deploy's People

Contributors

labib147 avatar

Watchers

 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.