Skip to content

NusaHub is a Web3 crowdfunding platform connecting Indonesian game developers with global investors through milestone-based funding and anti-fraud investor voting.

Notifications You must be signed in to change notification settings

NusaHub/smart-contract

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

30 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

NusaHub : A Web3 Crowdfunding Platform Connecting Indonesian Game Developers With Global Investors Through Milestone-Based Funding and Anti-Fraud Voting. 🚀

✨ Overview

🌏 NusaHub is a Web3 crowdfunding platform 🚀 that connects Indonesian game developers 🎮 with global investors 🌍 through milestone-based funding and anti-fraud investor voting ✅. Developers raise funds per milestone, investors review and vote to release payments 💰, ensuring honest and transparent progress 📊. With blockchain-powered security 🔗 and global access 🌐, NusaHub bridges local game innovation 🇮🇩 with the trust and scalability of Web3 🧠.

🧾 Contract Addresses (Sepolia Testnet)

Contract Description Blockscout Link
NusaHub The main contract that handles project listings, investor funding, and profit distribution. View on Blockscout
NusaGovernor Governance module used for proposing project milestone progress and voting by investors. View on Blockscout
NUSA Token Represents the amount of funds invested by investors — not used as an incentive or utility token. View on Blockscout
IDRX (Mock) Mock stablecoin pegged to Indonesian Rupiah, used for transaction simulation and testing. View on Blockscout
USDT (Mock) Mock USD-pegged stablecoin for testing cross-stablecoin interactions in a simulated environment. View on Blockscout

🔒 Built with OpenZeppelin Contracts

The smart contracts in this project are built using the OpenZeppelin Contracts library to ensure security, modularity, and upgradability.

🔧 Purpose 📦 OpenZeppelin Module 📄 Description
🪙 Fungible Token (NUSA) ERC20Upgradeable, ERC20VotesUpgradeable, ERC20PermitUpgradeable Fungible token with support for on-chain voting and off-chain approvals (via signatures)
🪙 Fungible Token (IDRX & USDT) ERC20 Standard ERC20 tokens for IDRX and USDT
🗳️ DAO Governance (NusaGovernor) GovernorUpgradeable, GovernorSettingsUpgradeable, GovernorCountingSimpleUpgradeable, GovernorVotesUpgradeable, GovernorVotesQuorumFractionUpgradeable Complete DAO module for proposals, voting, and secured execution
⏳ Upgradable & Initialization Initializable, UUPSUpgradeable Allows contract upgradeability using the UUPS proxy pattern and proper initialization
🛡️ Security ReentrancyGuardUpgradeable Protects critical functions from reentrancy attacks

🧩 Architecture

├── smart-contract/
│   ├── lib/                # External dependencies or installed libraries (via forge install)
│   ├── out/                # Build artifacts generated by Foundry after compilation
│   ├── script/             # Deployment and automation scripts using Forge
│   ├── src/                # Main smart contract source files
│   │   ├── core/           # Core logic and main contract implementations
│   │   ├── enums/          # Enum type definitions used across contracts
│   │   ├── errors/         # Custom error definitions for gas-efficient reverts
│   │   ├── events/         # Event declarations for logging on-chain actions
│   │   ├── libraries/      # Reusable utility libraries for contracts
│   │   ├── structs/        # Struct data definitions shared between contracts
│   │   └── tokens/         # Token-related contract logic (e.g., ERC standards)
│   ├── test/               # Smart contract test files
│   ├── .env                # Environment variables (RPC URL, private key, etc.)
│   ├── .gitignore          # Git ignore rules for temporary and build files
│   ├── .gitmodules         # Tracks git submodules (external contract sources)
│   ├── foundry.toml        # Foundry configuration (compiler, optimizer, remappings)
│   ├── Makefile            # Build, test, and deployment automation commands
│   └── README.md           # Project documentation and setup guide

🧭 How to Run

This project uses Foundry and a custom Makefile for a smoother development experience.
Just run make <task> without remembering long commands!

📦 1. Install Foundry

If you haven’t installed Foundry yet:

curl -L https://foundry.paradigm.xyz | bash
foundryup

📁 2. Clone Repository

> git clone https://github.com/NusaHub/smart-contract
> cd smart-contract

🔨 3. Compile Contracts

> make build

🧪 4. Run Test

> make test

🎯 5. Deploy and Verify Contracts

> make deploy

🔐 .env Configuration

Before running deploy or verification commands, make sure your .env file is properly set up in the root directory.

# 🔑 Private key of your deployer wallet (NEVER share this)
PRIVATE_KEY=your_private_key_here

# 🌐 RPC URL of the target network
RPC_URL=https://ethereum-sepolia-rpc.publicnode.com

# 🛡️ Set verifier type: "etherscan" or "blockscout"
VERIFIER=blockscout

# 🔗 Custom verifier URL (needed for blockscout)
VERIFIER_URL=https://eth-sepolia.blockscout.com/api/

🤝 Contributors

About

NusaHub is a Web3 crowdfunding platform connecting Indonesian game developers with global investors through milestone-based funding and anti-fraud investor voting.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published