License: AGPL-3.0 CI Solidity Tests Frontend Tests TypeScript Next.js Hardhat Solidity
Decentralized Autonomous Organizations for Gaming Communities
GameDAO Protocol is a comprehensive Web3 platform that enables gaming communities to create, manage, and participate in decentralized autonomous organizations (DAOs). Built on Ethereum with Substrate pallets for enhanced functionality, GameDAO provides the tools necessary for transparent governance, fundraising, reputation systems, and community engagement.
GameDAO Protocol consists of four main modules working together:
┌─────────────────┐ ┌─────────────────┐ ┌─────────────────┐ ┌─────────────────┐
│ CONTROL │ │ FLOW │ │ SIGNAL │ │ SENSE │
│ │ │ │ │ │ │ │
│ Organization │ │ Campaign │ │ Proposal │ │ Profile │
│ Management │ │ Fundraising │ │ Governance │ │ Reputation │
│ Member Access │ │ Treasury │ │ Voting │ │ Achievements │
│ Role System │ │ Rewards │ │ Consensus │ │ Social Graph │
└─────────────────┘ └─────────────────┘ └─────────────────┘ └─────────────────┘
│ │ │ │
└───────────────────────┼───────────────────────┼───────────────────────┘
│ │
┌─────────────────────────────────────────────────────┐
│ GAMEDAO REGISTRY │
│ Central coordination and state │
└─────────────────────────────────────────────────────┘
- 🎮 CONTROL: Organization creation, membership management, and access control
- 💰 FLOW: Fundraising campaigns, treasury management, and reward distribution
- 🗳️ SIGNAL: Governance proposals, voting mechanisms, and consensus building
- 👤 SENSE: User profiles, reputation tracking, and achievement systems
- Node.js 18+ and npm/pnpm
- Git
- Ethereum wallet (MetaMask recommended)
# Clone the repository git clone https://github.com/gamedaoco/gamedao-protocol.git cd gamedao-protocol # Install dependencies pnpm install # Start local blockchain cd packages/contracts-solidity pnpm run node # Deploy contracts (in new terminal) pnpm run deploy:localhost # Start frontend development server (in new terminal) cd packages/frontend pnpm run dev
Visit http://localhost:3000 to access the GameDAO frontend.
Our continuous integration pipeline ensures code quality and reliability:
- Tests: Comprehensive test suite with coverage reporting
- Security: Automated security analysis with Slither and Mythril
- Gas Optimization: Gas usage reporting and optimization checks
- Contract Size: Validation that contracts stay under 24KB limit
- Deployment: Automated deployment testing on local networks
- ✅ All tests must pass
- ✅ Coverage threshold maintained
- ✅ Security vulnerabilities addressed
- ✅ Contract size limits enforced
- ✅ Compilation warnings resolved
The pipeline runs on every push and pull request to ensure consistent quality.
gamedao-protocol/
├── packages/
│ ├── contracts-solidity/ # Ethereum smart contracts
│ │ ├── contracts/
│ │ │ ├── core/ # Registry and base contracts
│ │ │ ├── modules/ # CONTROL, FLOW, SIGNAL, SENSE
│ │ │ ├── interfaces/ # Contract interfaces
│ │ │ └── staking/ # Staking mechanisms
│ │ ├── test/ # Contract tests
│ │ └── scripts/ # Deployment scripts
│ ├── frontend/ # Next.js web application
│ │ ├── src/
│ │ │ ├── app/ # App router pages
│ │ │ ├── components/ # Reusable UI components
│ │ │ ├── hooks/ # Custom React hooks
│ │ │ └── lib/ # Utilities and configurations
│ │ └── public/ # Static assets
│ ├── pallets/ # Substrate runtime modules
│ │ ├── control/ # Organization management
│ │ ├── flow/ # Campaign and treasury
│ │ ├── signal/ # Governance and voting
│ │ ├── sense/ # Reputation and profiles
│ │ └── traits/ # Shared traits and types
│ └── subgraph/ # The Graph protocol indexing
│ ├── src/ # Subgraph mappings
│ └── schema.graphql # GraphQL schema
└── docs/ # Documentation
The smart contracts are built with Hardhat and OpenZeppelin:
cd packages/contracts-solidity # Compile contracts pnpm run build # Run tests pnpm run test # Deploy to local network pnpm run deploy:localhost # Verify contracts pnpm run verify
The frontend is built with Next.js 14, TypeScript, and Tailwind CSS:
cd packages/frontend # Start development server pnpm run dev # Build for production pnpm run build # Run type checking pnpm run type-check # Run linting pnpm run lint
The Substrate pallets provide enhanced functionality:
cd packages/pallets # Build pallets cargo build --release # Run tests cargo test # Check code cargo check
Create .env.local in the frontend package:
# Blockchain Configuration NEXT_PUBLIC_CHAIN_ID=31337 NEXT_PUBLIC_RPC_URL=http://localhost:8545 NEXT_PUBLIC_SUBGRAPH_URL=http://localhost:8000/subgraphs/name/gamedao # IPFS Configuration (optional) NEXT_PUBLIC_PINATA_API_KEY=your_pinata_key NEXT_PUBLIC_PINATA_SECRET_KEY=your_pinata_secret # Application Settings NEXT_PUBLIC_APP_NAME=GameDAO Protocol NEXT_PUBLIC_APP_DESCRIPTION=Decentralized Gaming Communities
After deployment, contract addresses are automatically saved to deployment-addresses.json and used by the frontend.
- Connect your wallet
- Navigate to "Organizations" → "Create"
- Fill in organization details
- Set governance parameters
- Deploy your DAO
- Join or create an organization
- Navigate to "Campaigns" → "Create"
- Set funding goals and timeline
- Define reward structure
- Launch campaign
- Join an organization
- View active proposals in "Governance"
- Vote on proposals that interest you
- Create new proposals if you have permissions
- Track voting results and implementation
- Create your profile in "Profiles"
- Participate in organizations and campaigns
- Vote on governance proposals
- Complete achievements
- Build your reputation score
cd packages/contracts-solidity pnpm run test # Run specific test file pnpm run test test/Control.test.ts # Run with coverage pnpm run test:coverage # Run gas analysis pnpm run test:gas
cd packages/frontend # Run unit tests (when implemented) pnpm run test # Run E2E tests (when implemented) pnpm run test:e2e
Deploy to various networks:
# Sepolia testnet pnpm run deploy:testnet # Ethereum mainnet pnpm run deploy:mainnet # Verify contracts pnpm run verify --network sepolia
Deploy to Vercel:
# Install Vercel CLI npm i -g vercel # Deploy cd packages/frontend vercel --prod
Deploy to The Graph:
cd packages/subgraph # Build subgraph pnpm run build # Deploy to hosted service pnpm run deploy
- All contracts inherit from OpenZeppelin's secure base contracts
- Access control implemented via role-based permissions
- Reentrancy protection on all state-changing functions
- Comprehensive test coverage for security scenarios
- Environment variables for sensitive configuration
- Wallet connection security best practices
- Input validation and sanitization
- HTTPS enforcement in production
- ⏳ Smart Contracts: Security audit pending
- ✅ Dependencies: Regular automated security scans
- ✅ Code Quality: ESLint and TypeScript strict mode
We welcome contributions! Please see our Contributing Guidelines for details.
- Fork the repository
- Create a feature branch:
git checkout -b feature/amazing-feature - Make your changes and add tests
- Commit your changes:
git commit -m 'Add amazing feature' - Push to the branch:
git push origin feature/amazing-feature - Open a Pull Request
- TypeScript for type safety
- ESLint for code quality
- Prettier for code formatting
- Conventional commits for clear history
- Website: gamedao.co
- Documentation: docs.gamedao.co
- Discord: discord.gg/gamedao
- Twitter: @gamedaoco
- GitHub: github.com/gamedaoco
This project is licensed under the GNU Affero General Public License v3.0 - see the LICENSE file for details.
The AGPL-3.0 license ensures that:
- The source code remains open and available
- Any modifications must be shared back to the community
- Network use (like web applications) requires source disclosure
- Commercial use is permitted under the copyleft terms
- OpenZeppelin for secure smart contract primitives
- Substrate for blockchain runtime framework
- The Graph for decentralized indexing
- Next.js and Vercel for frontend infrastructure
- The broader Web3 and gaming communities
Built with ❤️ by the GameDAO community