MetaLoan: Own Your Piece of the Metaverse

Break down the cost of your metaversal assets into small, affordable payments with MetaLoan's DApp on the Polygon blockchain. This project enables users to secure their stake in the expanding universe of digital experiences by facilitating manageable financial transactions.

metaloa

Technologies

  • Front-end: ReactJS
  • Smart Contract Language: Solidity
  • Blockchain: Polygon Mainnet
  • Testing: Foundry

Smart Contract Overview

The MetaLoan contract is designed to create and manage loan plans. It allows managers to create loan plans, users to apply for and pay loans, and also provides other functionalities such as the ability to delete a loan plan, withdraw tokens, and more.

MetaLoan Contract Functions

Modifiers

  • onlyOwner
  • onlyManager
  • PlanExists
  • NotZeroAddress
  • NotZeroValue

State-changing Functions

  • constructor
  • createPlan
  • requestLoan
  • payLoan
  • deletePlan
  • withdrawTokens
  • addManager

View Functions

  • fetchMyLoan
  • fetchPlan
  • fetchAllBorrowers
  • fetchallPlans

Events

  • PlanCreated
  • PaymentSent
  • LoanCreated
  • LoanDeleted
  • PlanDeleted
  • TransferOfTokens

Contract Address

View Metaloan Smart Contract on Polygon Mainnet

Local Setup

  1. Clone the Repository:
git clone <repository-url>
  1. Install Dependencies:
npm install
  1. Start the DApp:
npm start

Foundry Test

Follow the instructions to install Foundry.

Clone and install dependencies:git submodule update --init --recursive
Test Contract: forge test --contracts ./src/test/Metaloan.t.sol -vvvv

Visit http://localhost:3000/ to interact with the decentralized application.