-
Notifications
You must be signed in to change notification settings - Fork 43
[academy] : lending protocol example frontend #559
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
45e8fc4 to
07f442e
Compare
| ```bash | ||
| cd ../ # Move to the lending protocol directory | ||
| npx hardhat compile | ||
| npx hardhat run-lending-protocol |
There was a problem hiding this comment.
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_modulesfor this lending protocol dir package.json - a globally installed
hardhat - defined
.envin this lending protocol dir dotenvis not named as a dependency forlending-protocolpackage.json, I added it there
idea404
left a comment
There was a problem hiding this 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
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
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;