-
Notifications
You must be signed in to change notification settings - Fork 287
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
80a8987
commit 4e21fbc
Showing
1 changed file
with
65 additions
and
0 deletions.
There are no files selected for viewing
65 changes: 65 additions & 0 deletions
65
docs/build/isc/v1.3/docs/tutorials/defi-lend-borrow-tutorial-part-2.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
# DeFi Lend Borrow UI | ||
|
||
## Part II | ||
|
||
This is a comprehensive guide to the DeFi Lend Borrow DApp, a decentralized application built using React and the ethers library. The DApp allows users to lend and borrow cryptocurrency assets on Shimmer EVM Testnet. | ||
|
||
## Table of content | ||
|
||
- [Prerequisites](#prerequisites) | ||
- [Installation](#installation) | ||
- [Usage](#usage) | ||
- [Code Structure](#code-structure) | ||
|
||
|
||
## Prerequisites | ||
|
||
- [Node.js](https://nodejs.org) >= v18.0 | ||
- [React.js](https://react.dev/) >= v18.2.0 | ||
- [npx](https://www.npmjs.com/package/npx) >= v7.1.0. | ||
- [Metamask](https://metamask.io/) : Set up a Metamask wallet with some Shimmer EVM testnet tokens. | ||
|
||
## Installation | ||
|
||
1. Clone the repository: | ||
```bash | ||
git clone https://github.com/yourusername/defi-lend-borrow.git | ||
cd defi-lend-borrow/lend-borrow-ui | ||
``` | ||
2. Install dependencies: | ||
```bash | ||
npm install | ||
``` | ||
or | ||
```bash | ||
npm install --legacy-peer-deps | ||
``` | ||
3. Start the development server: | ||
```bash | ||
npm start | ||
``` | ||
|
||
|
||
## Usage | ||
|
||
- Connect your Metamask wallet: Click the "Connect Wallet" button to: | ||
- View your account balance: See your current token balance. | ||
- View the `total supplied` funds, `total borrowed` funds and `reserve factor mantissa` through your account. | ||
- View the `total supplied` funds, `total borrowed` funds and `reserve factor mantissa` on the platform. | ||
- Interact with the contract to `TransactionsCard` to `supply`, `borrow`, `repay` or `withdraw` funds. | ||
|
||
|
||
## Code Structure | ||
|
||
- `Context.js`: Defines the global context for web3 and other account data. | ||
- `Components`: Contains below components for the UI : | ||
- `NavigationBar` | ||
- `LendBorrowPlatformDetails` | ||
- `TransactionsCard` | ||
- `AccountDetails` | ||
- `ConnectWallet` | ||
- `TransactionsAlert` | ||
- `Utils`: | ||
- Handles interactions with smart contracts using ethers. | ||
- Handle Js logics to manage the UI of the platform. | ||
|