Giter VIP home page Giter VIP logo

angular-hardhat-starter-dapp's Introduction

Angular Starter DApp Template

This template uses following versions

  • Angular 13
  • Hardhat 2.8
  • Ethers 5.5
  • Solidity 0.8.4

Getting started

  1. Clone this repository
git clone [email protected]:pguso/angular-hardhat-starter-dapp.git
  1. Install dependencies
npm install
  1. Install Metamask (if you not already did) https://metamask.io/download/
  2. Configure Polygon in Metamask https://docs.matic.today/docs/develop/metamask/config-polygon-on-metamask/ (switch to the Mumbai-Testnet Tab)
  3. Rename .env.dist to .env and paste your Metamask private key into PRIVATE_KEY
  4. Upload the contract to the Polygon Mumbai Testnet, make sure you have enough MATIC in Metamask (you can get test MATIC from here https://faucet.polygon.technology/)
npm run deploy:testnet
  1. Paste the contract address, you get on the command line, into src/environments/environment.ts
export const environment = {
  // ...
  contractAddress: '0x04215C89a6af0f7ed9103c48BaF6A8e19f119470',
  // ...
};
  1. Run angular application and test the app under http://localhost:4200
ng serve

This template has three pages

The Homepage

A list of all uploaded images.

The authors page

Only images are shown on this page that are uploaded by the selected account in Metamask.

The upload form

Here anybody who is connected via Metamask can upload an image with title and description. The image and the image metadata get uploaded to IPFS.

Hardhat config

The default config hardhat.config.js is configured for the Polygon Network. Here you find examples for other Blockchains.

Binance Smart Chain

require('@nomiclabs/hardhat-waffle')
require('dotenv').config()

const privateKey = process.env.PRIVATE_KEY

module.exports = {
  networks: {
    hardhat: {
      chainId: 1337,
    },
    testnet: {
      url: 'https://data-seed-prebsc-1-s1.binance.org:8545',
      chainId: 97,
      gasPrice: 20000000000,
      accounts: [privateKey],
    },
    mainnet: {
      url: 'https://bsc-dataseed.binance.org/',
      chainId: 56,
      gasPrice: 20000000000,
      accounts: [privateKey],
    },
  },
  solidity: '0.8.4',
}

angular-hardhat-starter-dapp's People

Contributors

pguso avatar iminde09 avatar

Forkers

prathamesh913

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.