GithubHelp home page GithubHelp logo

ethvil-bank's Introduction

ETHvil-bank

This is a portfolio Dapp project, only meant to be deployed on Ethereum test networks.

Front-end : Next.js, EthersJS, TailwindCSS, Storybook Back-end : Solidity smart contract (100% test coverage), Subgraph

Application is deployed at : https://0xkheops.github.io/ethvil-bank/

Development environment

To be able to run the application locally, follow the instructions below :

  • Launch a local blockchain using Hardhat and deploy the contract on it
  • Launch a local subgraph node using Docker
  • Launch the front-end

Local dev

In the web directory, create a .env.local file (or create from .env.local.sample) that will allow front-end to connect to hardhat :

HOST_PATHNAME=
NEXT_PUBLIC_DEFAULT_CHAIN_ID=31337

NEXT_PUBLIC_EVILBANK_ADDRESS_HARDHAT=0x0B306BF915C4d645ff596e518fAf3F9669b97016
NEXT_PUBLIC_ENDPOINT_HARDHAT=http://localhost:8545
NEXT_PUBLIC_SUBGRAPH_HARDHAT=http://localhost:8000/subgraphs/name/ArnaultNouvel/ethvil-bank

Launch a terminal and start Hardhat (local dev blockchain)

cd blockchain
npm run dev

Launch another terminal and deploy the contract on hardhat

cd blockchain
# This will deploy and update the config files of subgraph and web projects with the deployed contract address
npm run deploy:local

Launch a local subgraph node, follow instructions in subgraph/README.md

Launch another terminal for the front-end

cd web
npm run dev

Then Browse http://localhost:3000

Metamask configuration

Make sure you configure Metamask to use Hardhat network (chain Id 31337)

Nonce too high error

This error happens if hardhat blockchain is reinitialized (or redeploy the contract), as Metamask will not expect that.

To get rid of the error, reset your Metamask wallet history :

  • Open Metamask
  • Click your account's avatar/icon
  • Click settings
  • Click advanced settings
  • Click Reset account and confirm

Verify on etherscan

cd blockchain
npx hardhat verify --network ropsten DEPLOYED_CONTRACT_ADDRESS

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.