Skip to content

zkPull/web

Repository files navigation

zkPull Logo

zkPull

Decentralized Open Source Contribution Rewards System

Built on Mantle Network | Powered by zkTLS & AVS EigenLayer

Live Demo | Documentation | Smart Contracts


Table of Contents


Overview

zkPull is a decentralized platform that revolutionizes open source contribution rewards through blockchain technology. The platform enables repository owners to create bounties for GitHub issues and allows contributors to claim rewards automatically upon PR merge verification using zkTLS (Zero-Knowledge Transport Layer Security) and AVS (Actively Validated Services) from EigenLayer.

Key Innovation

Traditional bounty systems require manual verification and trust between parties. zkPull eliminates this through:

  • zkTLS Technology: Provides cryptographic proof of PR merge status without exposing sensitive data
  • AVS EigenLayer: Decentralized validation layer ensuring tamper-proof verification
  • Smart Contract Automation: Instant reward distribution upon successful validation
  • Mantle Network: Fast, low-cost transactions on L2 blockchain

Problem Statement

Open source contributors face several challenges:

  1. Payment Delays: Waiting for repository owners to manually release funds
  2. Trust Issues: Uncertainty whether bounties will be paid after contribution
  3. Manual Verification: Time-consuming PR merge verification process
  4. Lack of Transparency: No clear audit trail of contributions and payments
  5. Centralized Control: Dependency on platform operators for dispute resolution

Solution

zkPull addresses these challenges through:

1. Trustless Verification

  • zkTLS automatically verifies PR merge status directly from GitHub
  • No manual intervention required from repository owners
  • Cryptographic proofs ensure authenticity

2. Instant Rewards

  • Smart contracts hold bounty funds in escrow
  • Automatic distribution upon successful validation
  • No waiting periods or manual approvals

3. Decentralized Validation

  • AVS EigenLayer provides additional validation layer
  • Multiple validators ensure accuracy
  • Byzantine fault tolerance

4. Transparent Audit Trail

  • All transactions recorded on Mantle blockchain
  • Complete history of bounties, claims, and validations
  • Immutable proof of contributions

5. Maximum Claims Feature

  • Support for multiple contributors per issue
  • Fair reward distribution
  • Flexible bounty splitting

Technology Stack

Frontend Framework

  • Next.js 15.6.0 (Turbopack): React framework with server-side rendering and optimal performance
  • TypeScript 5.5.2: Type-safe development
  • Tailwind CSS: Utility-first styling framework

Blockchain Integration

  • Wagmi 2.14.5: React hooks for Ethereum
  • Viem 2.22.17: TypeScript Ethereum library
  • RainbowKit 2.2.4: Wallet connection interface

State Management

  • React Hooks: Built-in state handling

UI Components

  • Radix UI: Accessible component primitives
  • Framer Motion 12.0.0: Animation library
  • Lucide React: Icon system
  • Sonner: Toast notifications

Network Infrastructure

  • Mantle Sepolia Testnet: L2 blockchain for testing
  • Alchemy RPC: Private RPC endpoint for reliability

Development Tools

  • pnpm: Fast, disk space efficient package manager
  • ESLint: Code quality and consistency
  • Git Hooks: Pre-commit validation

System Architecture

High-Level Architecture

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚                         Frontend Layer                          β”‚
β”‚  Next.js App Router β”‚ React Components β”‚ Tailwind CSS           β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                       β”‚
                       β–Ό
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚                    Blockchain Integration                       β”‚
β”‚  Wagmi β”‚ Viem β”‚ RainbowKit β”‚ Wallet Connectors                 β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                       β”‚
                       β–Ό
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚                      Mantle Network                             β”‚
β”‚  Smart Contracts β”‚ ERC20 Token β”‚ Transaction Processing         β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                       β”‚
         β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
         β–Ό                            β–Ό
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”         β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚  zkTLS Protocol  β”‚         β”‚  AVS EigenLayer  β”‚
β”‚  PR Verification β”‚         β”‚  Validation      β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜         β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

Component Architecture

src/
β”œβ”€β”€ app/                          # Next.js App Router
β”‚   β”œβ”€β”€ (landing)/               # Landing page route group
β”‚   β”œβ”€β”€ (main)/                  # Main application routes
β”‚   β”‚   β”œβ”€β”€ issues/              # Browse bounty issues
β”‚   β”‚   β”œβ”€β”€ issues/[id]/         # Issue detail page
β”‚   β”‚   β”œβ”€β”€ create-bounty/       # Create new bounty
β”‚   β”‚   β”œβ”€β”€ profile/             # User profile
β”‚   β”‚   └── faucet/              # Test token faucet
β”‚   └── globals.css              # Global styles
β”‚
β”œβ”€β”€ components/                   # React components
β”‚   β”œβ”€β”€ pages/                   # Page-specific components
β”‚   β”‚   β”œβ”€β”€ (landing)/           # Landing page components
β”‚   β”‚   β”‚   β”œβ”€β”€ Hero.tsx         # Hero section
β”‚   β”‚   β”‚   β”œβ”€β”€ Work.tsx         # How it works section
β”‚   β”‚   β”‚   β”œβ”€β”€ PartnerMarquee.tsx # Partner logos
β”‚   β”‚   β”‚   └── CTA.tsx          # Call to action
β”‚   β”‚   └── (app)/               # Application components
β”‚   β”‚       β”œβ”€β”€ issues/          # Issue listing components
β”‚   β”‚       β”œβ”€β”€ issue-detail/    # Issue detail components
β”‚   β”‚       β”œβ”€β”€ create-bounty/   # Bounty creation form
β”‚   β”‚       β”œβ”€β”€ profile/         # Profile components
β”‚   β”‚       └── faucet/          # Faucet components
β”‚   └── ui/                      # Reusable UI components
β”‚       β”œβ”€β”€ button.tsx           # Button component
β”‚       β”œβ”€β”€ input.tsx            # Input component
β”‚       β”œβ”€β”€ WalletConnect.tsx    # Wallet connection
β”‚       └── ...                  # Other UI components
β”‚
β”œβ”€β”€ lib/                          # Utilities and hooks
β”‚   β”œβ”€β”€ hooks/                   # Custom React hooks
β”‚   β”‚   β”œβ”€β”€ use-create-issue.tsx # Issue creation logic
β”‚   β”‚   β”œβ”€β”€ use-claim-rewards.tsx # Reward claiming logic
β”‚   β”‚   β”œβ”€β”€ use-get-all-issue.tsx # Fetch all issues
β”‚   β”‚   β”œβ”€β”€ use-mint-tokens.tsx  # Token minting
β”‚   β”‚   β”œβ”€β”€ use-balance.tsx      # Balance checking
β”‚   β”‚   └── use-wallet.tsx       # Wallet management
β”‚   └── utils.ts                 # Utility functions
β”‚
β”œβ”€β”€ config/                       # Configuration files
β”‚   β”œβ”€β”€ const.ts                 # Smart contract addresses & ABIs
β”‚   └── wagmi.config.ts          # Wagmi configuration
β”‚
└── utils/                        # Type definitions
    └── types.ts                 # TypeScript interfaces

Application Flow

1. Repository Owner Creates Bounty

User Journey:
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚ Connect      β”‚
β”‚ Wallet       β”‚
β””β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”˜
       β”‚
       β–Ό
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚ Fill Bounty Form:                        β”‚
β”‚ - GitHub Project ID                      β”‚
β”‚ - Bounty Amount (mUSD)                   β”‚
β”‚ - Project Name                           β”‚
β”‚ - Description                            β”‚
β”‚ - Repository Link                        β”‚
β”‚ - Deadline                               β”‚
β”‚ - Maximum Claims (number of developers) β”‚
β””β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
       β”‚
       β–Ό
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚ Approve mUSD Token Spending  β”‚
β””β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
       β”‚
       β–Ό
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚ Submit Transaction           β”‚
β”‚ (createIssue function)       β”‚
β””β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
       β”‚
       β–Ό
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚ Bounty Created & Visible     β”‚
β”‚ on /issues page              β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

Smart Contract Flow:
1. User approves MANTLE_USD_ADDRESS to spend bountyAmount
2. Contract transfers tokens from user to escrow
3. Issue stored with id, metadata, and maxClaims
4. IssueCreated event emitted

2. Contributor Claims Reward

User Journey:
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚ Browse       β”‚
β”‚ Issues       β”‚
β””β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”˜
       β”‚
       β–Ό
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚ Select Issue         β”‚
β”‚ View Details         β”‚
β””β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
       β”‚
       β–Ό
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚ Create & Merge PR on GitHub  β”‚
β””β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
       β”‚
       β–Ό
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚ Connect with GitHub OAuth    β”‚
β”‚ (Access Token stored)        β”‚
β””β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
       β”‚
       β–Ό
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚ Enter PR Link & Submit Claim β”‚
β””β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
       β”‚
       β–Ό
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚ zkTLS Verifies Merge Status  β”‚
β””β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
       β”‚
       β–Ό
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚ AVS Validates Claim          β”‚
β””β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
       β”‚
       β–Ό
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚ Reward Distributed           β”‚
β”‚ (Bounty Γ· maxClaims)         β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

Smart Contract Flow:
1. User submits claimReward with:
   - issueId
   - prLink
   - isMerged (verified by zkTLS)
   - accessToken (from sessionStorage)
2. Contract validates:
   - Issue is open
   - PR not already used
   - Maximum claims not reached
   - Merge status is true
3. If AVS enabled: Creates validation task
4. Upon validation: Transfer reward to developer
5. RewardClaimed event emitted

3. Validation Process

zkTLS Validation:
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚ Contributor submits PR URL β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
          β”‚
          β–Ό
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚ zkTLS creates secure proof of:     β”‚
β”‚ - PR exists on GitHub              β”‚
β”‚ - PR is merged                     β”‚
β”‚ - No sensitive data exposed        β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
          β”‚
          β–Ό
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚ Proof sent to smart        β”‚
β”‚ contract for verification  β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

AVS Validation:
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚ Smart contract creates     β”‚
β”‚ validation task            β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
          β”‚
          β–Ό
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚ Multiple AVS operators validate:   β”‚
β”‚ - zkTLS proof authenticity         β”‚
β”‚ - PR merge correctness             β”‚
β”‚ - Issue-PR relationship            β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
          β”‚
          β–Ό
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚ Consensus reached          β”‚
β”‚ (Byzantine fault tolerant) β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
          β”‚
          β–Ό
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚ Validation result returned β”‚
β”‚ to smart contract          β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

Key Features

For Repository Owners

  1. Easy Bounty Creation

    • Simple form-based interface
    • Support for multiple claim limits
    • Deadline enforcement
    • Automatic fund escrow
  2. Cost Control

    • Set bounty amount per issue
    • Define maximum number of claimants
    • Withdraw unused funds after deadline
  3. Transparency

    • View all claims on issue
    • Track validation status
    • Blockchain audit trail

For Contributors

  1. Fair Rewards

    • Automatic distribution upon validation
    • Pro-rata sharing for multiple claimants
    • No manual approval needed
  2. Security

    • Funds guaranteed in smart contract escrow
    • Cryptographic proof of contribution
    • No risk of non-payment
  3. User Experience

    • GitHub OAuth integration
    • Real-time claim status
    • Wallet balance tracking
    • Test token faucet

Technical Features

  1. Maximum Claims System

    • Support multiple developers per bounty
    • Automatic reward calculation: Bounty Amount Γ· Max Claims
    • Current claims tracking
    • Prevents over-claiming
  2. Dual Validation

    • zkTLS: Cryptographic PR verification
    • AVS: Decentralized consensus validation
    • Byzantine fault tolerance
    • High security guarantee
  3. Token Management

    • ERC20 mUSD token on Mantle
    • Approval flow for security
    • Balance display in wallet
    • Faucet for testing
  4. Responsive Design

    • Mobile-first approach
    • Desktop optimization
    • Consistent UI across devices

Project Structure

Page Routes

/ (landing)
β”œβ”€β”€ Hero section with zkTLS highlight
β”œβ”€β”€ How it works (3-step process)
β”œβ”€β”€ Partner marquee (Mantle, EigenLayer, etc.)
└── Call to action

/issues
β”œβ”€β”€ Browse all open bounties
β”œβ”€β”€ Filter and search
β”œβ”€β”€ Highest reward badge
└── Issue cards with metadata

/issues/[id]
β”œβ”€β”€ Issue details
β”œβ”€β”€ Bounty information
β”œβ”€β”€ Maximum claims display
β”œβ”€β”€ Reward per claim calculation
β”œβ”€β”€ Claim form
└── Validation status

/create-bounty
β”œβ”€β”€ Bounty creation form
β”œβ”€β”€ Token approval
β”œβ”€β”€ Transaction confirmation
└── Success feedback

/profile
β”œβ”€β”€ Wallet connection status
β”œβ”€β”€ User statistics
β”œβ”€β”€ Contribution history
└── Achievement display

/faucet
β”œβ”€β”€ Test token minting
β”œβ”€β”€ Amount input
β”œβ”€β”€ Network information
└── Balance display

Custom Hooks

All blockchain interactions are abstracted into custom hooks:

  • use-create-issue: Handle bounty creation
  • use-claim-rewards: Manage reward claiming process
  • use-get-all-issue: Fetch and cache issues
  • use-mint-tokens: Test token minting
  • use-balance: Real-time balance updates
  • use-wallet: Wallet connection management

Smart Contract Integration

Primary Contract: IssuesClaim

Address: Configured via environment variable NEXT_PUBLIC_ISSUE_ADDRESS

Key Functions:

  1. createIssue

    function createIssue(
      string _githubProjectId,
      uint256 _bountyAmount,
      string _projectName,
      string _description,
      string _repoLink,
      uint256 _deadline,
      uint256 _maxClaims
    )

    Creates a new bounty with escrow.

  2. claimReward

    function claimReward(
      uint256 _issueId,
      string _prLink,
      bool _isMerged,
      string _accessToken
    )

    Claims reward after PR merge.

  3. getAllIssues

    function getAllIssues() returns (Issue[])

    Returns all bounty issues.

  4. getIssueDetails

    function getIssueDetails(uint256 _issueId) returns (Issue)

    Fetches specific issue details.

  5. validateClaim

    function validateClaim(
      uint256 _issueId,
      uint256 _claimIndex,
      bool _isValid
    )

    Validator function for AVS.

Token Contract: MantleUSD

Address: Configured via environment variable NEXT_PUBLIC_MANTLEUSD_ADDRESS

Key Functions:

  1. mint

    function mint(address to, uint256 amount)

    Mints test tokens (faucet).

  2. approve

    function approve(address spender, uint256 value)

    Approves contract to spend tokens.

  3. balanceOf

    function balanceOf(address account) returns (uint256)

    Returns token balance.

Event Monitoring

The frontend listens to these events:

  • IssueCreated: New bounty created
  • RewardClaimed: Claim submitted
  • ClaimValidated: Validation completed
  • AVSTaskCreated: AVS validation initiated
  • FundsWithdrawn: Owner withdrew funds

Setup Instructions

Prerequisites

  • Node.js: v18.0.0 or higher
  • pnpm: v8.0.0 or higher
  • Git: Latest version
  • Wallet: MetaMask or compatible Web3 wallet

Environment Configuration

  1. Clone the repository:

    git clone <repository-url>
    cd web
  2. Install dependencies:

    pnpm install
  3. Create .env.local file:

    # Smart Contract Addresses (Mantle Sepolia)
    NEXT_PUBLIC_ISSUE_ADDRESS=0x...
    NEXT_PUBLIC_MANTLEUSD_ADDRESS=0x...
    
    # RPC Configuration
    NEXT_PUBLIC_ALCHEMY_RPC=https://mantle-sepolia.g.alchemy.com/v2/YOUR_KEY
    
    # Application Configuration
    NEXT_PUBLIC_APP_URL=http://localhost:3000
  4. Configure wallet:

Development Server

Start the development server:

pnpm dev

Open http://localhost:3000 to view the application.

Key Development Commands

# Install dependencies
pnpm install

# Run development server
pnpm dev

# Build for production
pnpm build

# Start production server
pnpm start

# Run linter
pnpm lint

# Type checking
pnpm type-check

Build and Deployment

Production Build

  1. Build the application:

    pnpm run build
  2. Verify build output:

    • Check for zero errors
    • Check for zero warnings
    • Review bundle size
    • Test critical paths
  3. Test production build locally:

    pnpm start

Deployment Options

Vercel (Recommended)

  1. Connect repository to Vercel
  2. Configure environment variables
  3. Deploy automatically on push

Self-Hosted

  1. Build application: pnpm build
  2. Copy .next, public, package.json to server
  3. Install production dependencies: pnpm install --prod
  4. Start server: pnpm start

Environment Variables (Production)

Ensure all environment variables are set in production:

NEXT_PUBLIC_WALLETCONNECT_PROJECT_ID=
NEXT_PUBLIC_ISSUE_ADDRESS=
NEXT_PUBLIC_MANTLEUSD_ADDRESS=
NEXT_PUBLIC_GITHUB_CLIENT_ID=
NEXT_PUBLIC_ZK_BACKEND_GENERATE_PROOF=
NEXT_PUBLIC_ZK_BACKEND_GET_ACCESS_TOKEN=

Testing

Manual Testing Checklist

Wallet Connection:

  • Connect wallet successfully
  • Display correct address
  • Show MNT balance
  • Show mUSD balance
  • Handle network switching

Create Bounty Flow:

  • Fill form with valid data
  • Approve token spending
  • Submit transaction
  • Receive confirmation
  • Bounty appears on /issues

Claim Reward Flow:

  • Select issue from list
  • View issue details
  • GitHub OAuth connection
  • Submit claim with PR link
  • Receive validation feedback
  • Receive reward tokens

Faucet:

  • Request test tokens
  • Receive tokens in wallet
  • Balance updates correctly

UI/UX:

  • Responsive on mobile
  • Responsive on tablet
  • Responsive on desktop
  • Proper error messages
  • Loading states visible
  • Toast notifications work

Smart Contract Testing

Test scenarios on Mantle Sepolia:

  1. Create bounty with different maxClaims values
  2. Multiple users claim same bounty
  3. Verify reward splitting works correctly
  4. Test deadline enforcement
  5. Test maximum claims enforcement
  6. Verify zkTLS validation
  7. Verify AVS validation

Architecture Decisions

Why Next.js App Router?

  • Server-side rendering for SEO
  • File-based routing
  • Built-in API routes
  • Optimal code splitting
  • Fast refresh during development

Why Wagmi + Viem?

  • Modern React hooks for Ethereum
  • Type-safe contract interactions
  • Built-in caching and request deduplication
  • Extensive wallet support through RainbowKit
  • Better developer experience than ethers.js

Why Mantle Network?

  • Low transaction costs (L2 scaling)
  • EVM compatibility (easy smart contract deployment)
  • Fast finality (quick confirmations)
  • Growing ecosystem
  • Good documentation

Why Tailwind CSS?

  • Utility-first approach (rapid development)
  • Consistent design system
  • Minimal CSS bundle (unused styles purged)
  • Responsive design utilities
  • Easy customization

Contributing

This project follows strict code quality standards defined in CLAUDE.md:

  • SOLID principles for all code
  • Type safety required
  • Zero build warnings policy
  • Component structure must follow project conventions
  • Import discipline through index files only
  • Performance optimizations required

License

This project is part of a hackathon submission and is provided as-is for evaluation purposes.


Support

For technical support or questions:

  • Open an issue in the repository
  • Contact the development team
  • Review documentation in /docs directory

Acknowledgments

Built with:

  • Mantle Network
  • EigenLayer AVS
  • zkTLS Protocol
  • Reclaim Protocol
  • Next.js
  • Wagmi
  • RainbowKit

Built for open source, by open source.

zkPull - Empowering Contributors with Trustless Rewards

About

zkPull Frontend πŸ¦„.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published