Coder Social home page Coder Social logo

build-lending-dapp-on-core's Introduction

Lending dApp on the Core Network

Pre-requisites

Following are the pre-requisites tools that you'll need:

Configure Git CLI

  • Open your favorite terminal.
  • Run gh --version to ensure that you have installed the Git CLI successfully.
  • Run gh auth login --web in your terminal and follow the steps given below:
    • First, it will ask for your preferred protocol for Git operations. I chose HTTPS, you can choose any.
    • Second, it will ask you to Authenticate Git with your GitHub credentials, and type Y.
    • Third, you will be able to see some code on your terminal. Copy it.
    • Then, press Enter. It will open a window in your browser.
    • Paste the code you copied and authorize your git. You might need to enter your GitHub password if you have yet to log in.
  • Do not close this terminal!

Contract Deployment

  • Fork and clone the repo by running gh repo fork <https://github.com/0xmetaschool/build-lending-dapp-on-core.git> --clone.
  • Navigate into the folder using cd build-lending-dapp-on-core.
  • Install dependencies by running npm install.
  • Create .env file and place your Private Key inside it.
  • Run npx hardhat compile to compile.
  • Run npx hardhat ignition deploy ./ignition/modules/deploy.js --network core_testnetto deploy.
  • Copy the addresses of DAPP, USD and BTC Contracts from Terminal and paste them in the .env file present inside ./interface/.env

Frontend Setup

  • Navigate to react app by running cd interface
  • Install dependencies using npm install
  • Copy the .json files containing the ABI from ./artifacts/contracts. You'll need to copy the following json files from their respective folders
    • Bitcoin.json
    • CoreLoanPlatform.json
    • IERC20.json
    • USD.json to interface/src/ABI/ folder.
  • Run the frontend using npm start.

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.