Skip to content

Conversation

@gitshreevatsa
Copy link
Contributor

This PR adds a frontend for our lending protocol and enables users to transact via the frontend and explain how to build frontend for applictions built on =nil; leveraging nil.js and our wallet SDK. The frontend is built using react.js and provides a detailed walkthrough to help developers grasp how to build frontends with =nil;

```bash
cd ../ # Move to the lending protocol directory
npx hardhat compile
npx hardhat run-lending-protocol
Copy link
Contributor

@idea404 idea404 Mar 17, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

running the npx commands here requires:

  • installed node_modules for this lending protocol dir package.json
  • a globally installed hardhat
  • defined .env in this lending protocol dir
  • dotenv is not named as a dependency for lending-protocol package.json, I added it there

Copy link
Contributor

@idea404 idea404 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. A couple ideas:

  • show on dashboard:
    • total tokens available for lending
    • total tokens lent
    • total paid back interest
    • total loans processed
  • Maybe also good to extract the nil-specific portions of code into components, that helps find where in code you are using nil, could put them in a dir components/nil/CompA.tsx

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Don't add lockfile here. use this as a workspace of monorepo.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This project works as a template, such that anyone can just cp -r /this-repo /desired-location and build their application logic with the wallet integration already existing. If lockfile is removed then it would no longer serve as a template for quick development I believe.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why it can not serve as a template without package-lock? Moreover removal of package-lock will only improve the template because you don't know which package manager our potential developer uses.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agreed, previously the lending protocol hardhat project had mismatched dependencies for the local package.json and the root package.json especially with niljs versions and the lockfile actually evaded this issue and hence retained in this project. But I agree to your point that any package manager could be used.

@gitshreevatsa gitshreevatsa requested a review from ukorvl March 21, 2025 07:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants