The Deed Protocol
  • General Information
    • Overview
    • Get Involved
    • Fees & Service Charges
  • How it Works
    • Owner Financing Guide
    • Flat Fee MLS Listings
    • Property Leasing Guide
    • Property Registration Guide
    • Property Purchase Guide
    • Property Management Guide
    • Mortgages and Lending Guide
  • Legal Framework
    • Property Wrappers
      • Nominee Trust Structure
      • Limited Liability Company
    • Identity Verification
    • Dispute Resolution
    • Corporate Structure
    • Third-Party Services
    • Traditional Legal Agreements
      • Privacy Policy
      • Terms of Service
      • Limited Power of Attorney
      • Nominee Trust Agreement
      • Owner Financing Agreement
      • Standard Lease Agreement
      • Property Purchase Agreement
  • Technical Overview
    • DeedNFT
    • LeaseNFT
    • Lease Smart Contract
    • Owner Finance Contract
    • Mortgage Smart Contract
    • DApp & UI Integrations
  • Smart Contracts
    • DeedNFT.sol
    • FixedSale.sol
    • FundManger.sol
    • FeeManager.sol
    • Fractionalize.sol
    • AccessManger.sol
    • AuctionStarter.sol
    • SubdivisonNFT.sol
    • OwnerFinancing.sol
      • LenderNFT.sol
      • BorrowerNFT.sol
    • ShortTermRental.sol
    • LeaseAgreement.sol
      • LeaseNFT.sol
    • MortgageContract.sol
      • LenderNFT.sol
      • BorrowerNFT.sol
Powered by GitBook
On this page
  • Overview
  • Minting & Burning
  • LeaseNFT Metadata

Was this helpful?

  1. Technical Overview

LeaseNFT

Overview

The LeaseNFT contract is responsible for representing lease agreements as NFTs. Each LeaseNFT is uniquely identifiable and stores essential lease agreement data, such as the lessee's address, rental amount, and duration.

Key features of the LeaseNFT contract:

  • Inherits from ERC721, ensuring compliance with the ERC721 standard.

  • Contains a mapping to store lease agreement data.

  • Provides a createLease function, allowing authorized creators to create new LeaseNFTs representing lease agreements.

  • Implements getter functions for querying lease agreement data.

  • Minting and burning of LeaseNFT tokens

  • Token URI for storing metadata related to the lease agreement

Minting & Burning

LeaseNFT minting and burning are implemented using the _mint and _burn functions provided by the OpenZeppelin ERC721 contract. These functions can only be called by the contract owner or authorized addresses.

function mintToken(address to, uint256 tokenId) external onlyOwner { _mint(to, tokenId); } 
function burn(uint256 tokenId) external onlyOwner { _burn(tokenId); }

LeaseNFT Metadata

The LeaseNFT metadata is stored off-chain in a JSON file and includes the following information:

  • Lease agreement ID

  • Property address

  • Lessee and lessor details

  • Lease start and end dates

  • Rent amount and payment frequency

  • Security deposit amount

The metadata is referenced using the token URI, which is a URL pointing to the JSON file. The token URI can be set and updated using the ERC721 setTokenURI function.

function mintToken(address to, uint256 tokenId) external onlyOwner { _mint(to, tokenId); } 
function burn(uint256 tokenId) external onlyOwner { _burn(tokenId); }
PreviousDeedNFTNextLease Smart Contract

Last updated 1 year ago

Was this helpful?