Skip to content

About

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

Β 

History

3 Commits

Folders and files

NameName
Last commit message
Last commit date
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

IDProperty - RWA Real Estate Tokenization Platform

License: MIT

A decentralized application (dApp) for tokenizing real estate assets in Indonesia, built on Mantle Sepolia Testnet. This platform enables fractional ownership of property through ERC-20 compliant security tokens with built-in KYC compliance.

πŸš€ Live Demo

πŸ“‹ Deployed Contracts (Mantle Sepolia)

Contract Address Status
KYCRegistry 0xeaea25d2021e069aa6858b133e727b63ea5bce92 βœ… Verified
IndonesiaPropertyToken 0x96437740de3af7f644557f6c3371b86525d595e7 βœ… Verified

✨ Features

Core Functionality

  • Property Tokenization: View tokenized property details including location, valuation, and legal documents
  • KYC Compliance: Integrated KYC verification system with multiple levels (Basic, Verified, Accredited)
  • Token Transfers: Transfer tokens between verified investors with real-time balance updates
  • Portfolio Management: Track your token holdings and ownership percentage
  • Admin Dashboard: Manage KYC registrations, freeze accounts, and perform force transfers
  • Multi-wallet Support: Connect via MetaMask, Rainbow, Coinbase Wallet, and more

Security & Best Practices

  • 97 comprehensive smart contract tests
  • Custom errors for gas optimization
  • Pausable for emergency stops
  • Two-step admin transfer
  • Access control with admin functions
  • Freeze/unfreeze accounts for AML compliance
  • Investment limits enforcement (min/max)

πŸ—οΈ Project Structure

idproperty/
β”œβ”€β”€ contract/                    # Smart contracts (Foundry)
β”‚   β”œβ”€β”€ src/
β”‚   β”‚   β”œβ”€β”€ KYCRegistry.sol      # KYC verification (2.5 KB)
β”‚   β”‚   └── IndonesiaPropertyToken.sol  # ERC-20 token (6.0 KB)
β”‚   β”œβ”€β”€ test/
β”‚   β”‚   β”œβ”€β”€ KYCRegistry.t.sol    # 38 tests
β”‚   β”‚   └── IndonesiaPropertyToken.t.sol  # 59 tests
β”‚   β”œβ”€β”€ script/
β”‚   β”‚   └── Deploy.s.sol         # Deployment script
β”‚   └── foundry.toml
β”œβ”€β”€ frontend/                    # React frontend
β”‚   β”œβ”€β”€ src/
β”‚   β”‚   β”œβ”€β”€ components/          # UI components
β”‚   β”‚   β”œβ”€β”€ config/              # Contract ABIs & config
β”‚   β”‚   β”œβ”€β”€ hooks/               # Web3 hooks
β”‚   β”‚   β”œβ”€β”€ pages/               # App pages
β”‚   β”‚   └── lib/                 # Utilities
β”‚   └── package.json
β”œβ”€β”€ .env.example                 # Environment template
└── README.md                    # This file

⚑ Quick Start

Prerequisites

  • Foundry
  • Node.js 18+
  • MetaMask or compatible Web3 wallet

Installation

# Clone repository
git clone https://github.com/azharpratama/idproperty
cd idproperty

# Install contract dependencies
cd contract && forge install

# Install frontend dependencies
cd ../frontend && npm install

πŸ”§ Smart Contract Development

Build Contract

cd contract
forge build

Run Tests

cd contract

# Run all tests
forge test

# Run with gas report
forge test --gas-report

# Run with verbosity
forge test -vvv

Expected: All 97 tests passing βœ…

Deploy Contract

cd contract

# 1. Configure ../.env with your PRIVATE_KEY
# 2. Deploy to Mantle Sepolia
forge script script/Deploy.s.sol \
  --rpc-url https://rpc.sepolia.mantle.xyz \
  --broadcast \
  --verify \
  -vvvv

Interact with Contract (using Cast)

# Check contract balance
cast call <CONTRACT_ADDRESS> "totalSupply()" --rpc-url https://rpc.sepolia.mantle.xyz

# Get token name
cast call <CONTRACT_ADDRESS> "name()" --rpc-url https://rpc.sepolia.mantle.xyz

🌐 Frontend Development

Development Server

cd frontend
npm install
npm run dev

Visit http://localhost:5173

Build for Production

cd frontend
npm run build

Available Pages

Page Path Description
Home / Platform overview and key statistics
Property /property Detailed property information
Portfolio /portfolio User's token holdings
Transfer /transfer Send tokens to other investors
KYC Status /kyc View KYC verification status
Admin /admin Admin functions (owner only)

πŸ“‹ Contract Interface

KYCRegistry

Function Description Access
registerInvestor(address, level, countryCode, validDays) Register KYC verified investor Admin
updateInvestor(address, newLevel) Update KYC level Admin
revokeInvestor(address) Revoke KYC (blacklist) Admin
isVerified(address) Check if investor is verified Public
meetsLevel(address, level) Check minimum KYC level Public

IndonesiaPropertyToken

Function Description Access
transfer(to, value) Transfer tokens (KYC required) Public
freezeAccount(account, reason) Freeze account (AML) Admin
unfreezeAccount(account) Unfreeze account Admin
forceTransfer(from, to, value) Force transfer (legal) Admin
getOwnershipPercent(owner) Get ownership % (basis points) Public
canTransfer(from, to, value) Check if transfer allowed Public

πŸ” KYC Levels

Level Code Requirements
NONE 0 Not verified
BASIC 1 KTP only
VERIFIED 2 KTP + NPWP
ACCREDITED 3 KTP + NPWP + Asset Proof

πŸ”§ Tech Stack

Smart Contracts

  • Solidity 0.8.30
  • Foundry (Forge, Cast, Anvil)

Frontend

  • React 19, TypeScript, Vite 6
  • Tailwind CSS 4
  • Wagmi 2, Viem 2, RainbowKit 2
  • TanStack React Query 5

πŸ“„ Environment Variables

Root .env (for contract deployment)

PRIVATE_KEY=your_private_key
ETHERSCAN_API_KEY=your_mantlescan_api_key

Frontend .env

VITE_CONTRACT_ADDRESS=0x96437740de3af7f644557f6c3371b86525d595e7
VITE_KYC_REGISTRY_ADDRESS=0xeaea25d2021e069aa6858b133e727b63ea5bce92

πŸ”— Resources

🀝 Contributing

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add some amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

πŸ‘€ Author

Azhar Aditya Pratama

Built for HackQuest Indonesia: Co-Learning Camp 6 - Mantle

πŸ“ License

This project is licensed under the MIT License - see the LICENSE file for details.

Copyright (c) 2025 Azhar Aditya Pratama

About

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages