Skip to content

MettaChain/PropChain-contract

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

120 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

PropChain Smart Contracts

🏠 Decentralized Real Estate Infrastructure | Rust-based smart contracts for blockchain-powered property transactions

PropChain Smart Contracts is a production-grade Rust-based smart contract system that enables the tokenization and trading of real estate assets through blockchain technology. Our contracts provide the core functionality needed to build decentralized real estate platforms, including property ownership, secure transfers, and escrow services.

Built with Rust and ink! for Substrate/Polkadot ecosystem, these smart contracts serve as the foundation for Web3 real estate applications, enabling developers to create platforms where physical properties can be represented as digital assets and traded seamlessly using cryptocurrency.

πŸš€ Features

Core Capabilities

  • 🏠 Asset Tokenization: Transform physical real estate properties into tradable NFTs with legal compliance
  • πŸ’° Secure Transfers: Multi-signature property transfers with escrow protection
  • πŸ”— Property Registry: On-chain property ownership registry with metadata storage
  • πŸ“Š Fractional Ownership: Enable partial ownership and investment pooling
  • πŸ” Access Control: Role-based permissions for property owners, agents, and regulators
  • πŸ’Ύ On-chain Storage: Decentralized storage for property documents and metadata

Advanced Features

  • ⛓️ Cross-Chain Compatibility: Designed for Substrate/Polkadot ecosystem with EVM compatibility
  • πŸ“ˆ Property Valuation: On-chain valuation oracle integration for real-time pricing
  • πŸ” Property Discovery: Efficient on-chain search and filtering capabilities
  • πŸ“± Mobile Integration: Lightweight contract interfaces for mobile dApps
  • πŸ›‘οΈ Security First: Formal verification and comprehensive audit coverage

πŸ‘₯ Target Audience

This smart contract system is designed for:

  • Real Estate Tech Companies building blockchain-based property platforms
  • Property Investment Firms seeking fractional ownership solutions
  • Blockchain Developers creating DeFi real estate applications on Substrate
  • Real Estate Agencies modernizing their transaction infrastructure
  • FinTech Startups integrating real estate into their crypto ecosystems

πŸ› οΈ Quick Start

Prerequisites

Ensure you have the following installed:

  • Rust 1.70+ (stable toolchain)
  • ink! CLI for smart contract development
  • Substrate Node for local testing
  • Git version control

Installation

# 1. Clone the repository
git clone https://github.com/MettaChain/PropChain-contract.git
cd PropChain-contract

# 2. Run automated setup
./scripts/setup.sh

# 3. Start local development environment
docker-compose up -d

# 4. Build the contracts
./scripts/build.sh --release

# 5. Run tests
./scripts/test.sh

# 6. Deploy locally (optional)
./scripts/deploy.sh --network local

The contracts will be compiled and ready for deployment to Substrate-based networks.

πŸš€ Development & Deployment

Development Environment

./scripts/build.sh        # Build contracts in debug mode
./scripts/test.sh         # Run unit tests
cargo test                 # Run all tests including integration

Production Deployment

./scripts/build.sh --release  # Build optimized contracts
./scripts/deploy.sh --network westend  # Deploy to testnet
./scripts/deploy.sh --network polkadot  # Deploy to mainnet

Testing Suite

./scripts/test.sh                      # Run all tests
./scripts/test.sh --coverage           # Run with coverage
./scripts/e2e-test.sh                  # Run E2E tests

🌐 Network Configuration

Supported Blockchains

  • Polkadot (Mainnet, Westend Testnet)
  • Kusama (Mainnet)
  • Substrate-based Parachains (Custom networks)
  • Local Development (Substrate Node)

Environment Configuration

# Network
NETWORK=westend
NODE_URL=ws://localhost:9944

# Contract
CONTRACT_ACCOUNT=5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY
SURI=//Alice

# Build
BUILD_MODE=debug
TARGET=wasm32-unknown-unknown

πŸ“š Documentation & Resources

Contract Documentation

Development Documentation

Repository Structure

PropChain-contract/
β”œβ”€β”€ πŸ“ contracts/           # Main smart contract source code
β”‚   β”œβ”€β”€ πŸ“ lib/            # Contract logic and implementations
β”‚   β”œβ”€β”€ πŸ“ traits/         # Shared trait definitions
β”‚   └── πŸ“ tests/          # Contract unit tests
β”œβ”€β”€ πŸ“ scripts/            # Deployment and utility scripts
β”œβ”€β”€ πŸ“ tests/              # Integration and E2E tests
β”œβ”€β”€ πŸ“ docs/               # Comprehensive documentation
β”œβ”€β”€ πŸ“ .github/            # CI/CD workflows and issue templates
β”œβ”€β”€ 🐳 docker-compose.yml  # Local development stack
└── πŸ“¦ Cargo.toml          # Rust project configuration

πŸ› οΈ Technology Stack

Smart Contract Development

  • πŸ¦€ Language: Rust - Memory safety and performance
  • ⚑ Framework: ink! - Substrate smart contract framework
  • ⛓️ Platform: Substrate/Polkadot - Enterprise blockchain framework
  • πŸ”— WASM: WebAssembly compilation for blockchain deployment

Development Tools

  • πŸ› οΈ Build: Cargo - Rust package manager and build system
  • πŸ§ͺ Testing: Built-in Rust testing framework + ink! testing
  • πŸ“– Documentation: rustdoc - Auto-generated documentation
  • πŸ”„ CI/CD: GitHub Actions - Automated testing and deployment

Blockchain Infrastructure

  • ⛓️ Networks: Polkadot, Kusama, Substrate parachains
  • πŸ” Wallets: Polkadot.js, Substrate-native wallets
  • πŸ“Š Oracles: Chainlink, Substrate price feeds
  • πŸ” Explorers: Subscan, Polkadot.js explorer

Security & Verification

  • πŸ›‘οΈ Security: Formal verification with cargo-contract
  • πŸ” Auditing: Comprehensive security audit process
  • πŸ“‹ Standards: ERC-721/1155 compatibility layers
  • πŸ§ͺ Testing: Property-based testing with proptest

πŸ† Project Status

βœ… Completed Features

  • Property Registry Contract
  • Escrow System
  • Token Contract (ERC-721 compatible)
  • Access Control System
  • Development Environment
  • CI/CD Pipeline
  • Comprehensive Testing
  • Documentation

🚧 In Progress

  • Oracle Integration
  • Cross-chain Bridge
  • Mobile SDK
  • Advanced Analytics

πŸ“‹ Planned Features

  • Governance System
  • Insurance Integration
  • Mortgage Lending Protocol
  • Property Marketplace

🀝 Contributing

We welcome contributions! Please read our Contributing Guide to get started.

Quick contribution steps:

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

πŸ“„ License

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

🀝 Support & Community

Get Help

Additional Resources


⭐ Star this repository if it helped you!

Made with ❀️ by the PropChain Team

About

No description, website, or topics provided.

Resources

Contributing

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages