RepoRewards is a cool blockchain-based platform designed to make rewarding open-source contributions on GitHub super easy and transparent.
- Deployed Contracts
- Live Project
- Project Overview
- Technical Stack
- Project Structure
- Smart Contracts
- Getting Started
Network | Explorer Link |
---|---|
Optimism Sepolia | View on Explorer |
Base Sepolia | View on Explorer |
Celo Alfajores Testnet | View on Explorer |
Mode Testnet | View on Explorer |
Explore the live application here.
In the world of open-source, there's a big issue: developers often don't get paid for their hard work. This isn't just frustrating—it's a real problem. Developers spend hours, even days, contributing to projects, but without payment or recognition, it can be incredibly demotivating. Worse, they have no proof to show future employers, making it tough to showcase their skills.
For open-source organizations, this lack of incentives slows down progress. Projects that could drive innovation get delayed or even abandoned. So, not only are developers losing out, but the entire open-source community suffers, slowing down the pace of technological advancement. We need to fix this to keep open source thriving.
Repo Rewards addresses these challenges by:
- Automated Contribution Tracking: Integrates with GitHub to monitor and recognize contributions in real-time.
- Decentralized Identity Verification: Utilizes Worldcoin's World ID for secure and private user verification without compromising anonymity.
- Transparent Reward Distribution: Employs smart contracts to manage and distribute rewards transparently and automatically.
- Attestations via EAS: Implements Ethereum Attestation Service (EAS) to attest to user actions and contributions, ensuring data integrity and trustworthiness.
- Frontend: React with Next.js framework.
- Smart Contracts: Solidity, deployed using Hardhat.
- Blockchain Networks: Optimism Sepolia, Base Sepolia, Celo Alfajores Testnet, Mode Testnet.
- Identity Verification: Worldcoin's World ID.
- Attestations: Ethereum Attestation Service (EAS).
- Authentication: Firebase Auth with GitHub provider.
- API Integration: Axios for HTTP requests.
repo-rewards/
├── packages/
│ ├── hardhat/ # Smart contracts and deployment scripts
│ └── github-bot-nestjs/ # nest.js backend application
│ └── nextjs/ # Frontend application
│ ├── components/ # React components
│ ├── hooks/ # Custom React hooks
│ ├── pages/ # Next.js pages
│ ├── public/ # Static assets
│ └── utils/ # Utility functions and configurations
├── .gitignore
├── README.md
└── package.json
The core smart contract, RepoRewards, facilitates the registration of users (both Pool Managers and Contributors) and manages the reward distribution. Key functionalities include:
- User Registration: Allows users to register by providing their GitHub username, GitHub ID, World ID, and selected role.
- Reward Distribution: Automates the distribution of rewards based on predefined criteria and contributions.
To get started with Repo Rewards (Scaffold-OP), follow the steps below:
- Clone this repo & install dependencies
git clone https://github.com/ethereum-optimism/scaffold-op.git
cd scaffold-op
yarn install
- Run a local network in the first terminal:
yarn chain
This command starts a local Ethereum network using Hardhat. The network runs on your local machine and can be used for testing and development. You can customize the network configuration in hardhat.config.ts
.
- On a second terminal, deploy the test contract:
yarn deploy
This command deploys a test smart contract to the local network. The contract is located in packages/hardhat/contracts
and can be modified to suit your needs. The yarn deploy
command uses the deploy script located in packages/hardhat/deploy
to deploy the contract to the network. You can also customize the deploy script.
- On the same terminal, start your NextJS app:
yarn start
Visit your app on: http://localhost:3000
. You can interact with your smart contract using the Debug Contracts
page. You can tweak the app config in packages/nextjs/scaffold.config.ts
.
Run smart contract test with yarn hardhat:test
- Edit your smart contract
YourContract.sol
inpackages/hardhat/contracts
- Edit your frontend in
packages/nextjs/pages
- Edit your deployment scripts in
packages/hardhat/deploy