Initial commit: simple frontend helper for mortgageFi, basic debt repayment and debt viewing functionality works, tested for both cbbtc and wbtc and not weth
This commit is contained in:
58
README.md
58
README.md
@@ -1,36 +1,48 @@
|
||||
This is a [Next.js](https://nextjs.org) project bootstrapped with [`create-next-app`](https://nextjs.org/docs/app/api-reference/cli/create-next-app).
|
||||
## MortgageFi DApp
|
||||
|
||||
## Getting Started
|
||||
This is the MortgageFi DApp frontend (Next.js App Router). The landing page is the DApp itself.
|
||||
|
||||
First, run the development server:
|
||||
### First-time NFT scan and cache
|
||||
|
||||
- On first load (or after deleting cache), click the button: "Scan 12 more (ownerOf)" repeatedly until your NFTs are discovered and cached.
|
||||
- The app stores results per chain and per ERC-721 contract in localStorage. If you add a new NFT later, click "Scan 12 more (ownerOf)" again to extend the cache.
|
||||
- You can Reset (current wallet only) or Delete Local Cache (entire contract cache) from the Inputs panel.
|
||||
|
||||
### Paying another wallet's debt (Manual Wallet)
|
||||
|
||||
- To pay a different wallet’s debt (e.g., a multisig), enter its address into the "Manual Wallet" field. The app will scan and read using this wallet.
|
||||
- Stablecoin balance and allowance checks still use your connected wallet for approvals and payments, but loan reads will target the manual wallet’s NFTs.
|
||||
|
||||
### Blockchain logs
|
||||
|
||||
- Verbose on-chain logs are printed to the browser console (scan, reads, and actions). Open DevTools → Console to view progress and diagnostics.
|
||||
|
||||
### Networks and presets
|
||||
|
||||
- Supported networks include Base and Arbitrum. Use the Network selector to switch.
|
||||
- Presets are available per chain to quickly populate ERC-721 and Debt contract addresses (e.g., cbBTC–USDC, WETH–USDC, USDTO–WBTC).
|
||||
|
||||
### Development
|
||||
|
||||
```bash
|
||||
npm install
|
||||
npm run dev
|
||||
# or
|
||||
yarn dev
|
||||
# or
|
||||
pnpm dev
|
||||
# or
|
||||
bun dev
|
||||
# open http://localhost:3000
|
||||
```
|
||||
|
||||
Open [http://localhost:3000](http://localhost:3000) with your browser to see the result.
|
||||
### Environment
|
||||
|
||||
You can start editing the page by modifying `app/page.tsx`. The page auto-updates as you edit the file.
|
||||
- Set `NEXT_PUBLIC_WALLETCONNECT_PROJECT_ID` in `.env.local` for WalletConnect.
|
||||
|
||||
This project uses [`next/font`](https://nextjs.org/docs/app/building-your-application/optimizing/fonts) to automatically optimize and load [Geist](https://vercel.com/font), a new font family for Vercel.
|
||||
### Deployment on Vercel
|
||||
|
||||
## Learn More
|
||||
- Monorepo: set the project root to `mortgagefi-frontend/` in Vercel.
|
||||
- Build command: `next build` (Turbopack is enabled by default via script).
|
||||
- Environment vars: set `NEXT_PUBLIC_WALLETCONNECT_PROJECT_ID` in Vercel.
|
||||
|
||||
To learn more about Next.js, take a look at the following resources:
|
||||
#### Using Gitea with Vercel
|
||||
|
||||
- [Next.js Documentation](https://nextjs.org/docs) - learn about Next.js features and API.
|
||||
- [Learn Next.js](https://nextjs.org/learn) - an interactive Next.js tutorial.
|
||||
- Vercel does not natively integrate with Gitea. Options:
|
||||
- Mirror your Gitea repository to GitHub/GitLab/Bitbucket and connect that to Vercel.
|
||||
- Or use the Vercel CLI to deploy from your local machine or CI pipeline.
|
||||
|
||||
You can check out [the Next.js GitHub repository](https://github.com/vercel/next.js) - your feedback and contributions are welcome!
|
||||
|
||||
## Deploy on Vercel
|
||||
|
||||
The easiest way to deploy your Next.js app is to use the [Vercel Platform](https://vercel.com/new?utm_medium=default-template&filter=next.js&utm_source=create-next-app&utm_campaign=create-next-app-readme) from the creators of Next.js.
|
||||
|
||||
Check out our [Next.js deployment documentation](https://nextjs.org/docs/app/building-your-application/deploying) for more details.
|
||||
|
||||
Reference in New Issue
Block a user