ecosystem-contributions
ecosystem-contributions copied to clipboard
🧪 Mad Science Project Idea: Tokenized GitHub Repositories
What is an Mad Science Project Idea?
A Mad Science Project Idea is an idea for a project within the Optimism ecosystem that may not have clear value but is generally cool as heck. Mad Science Project Ideas make great hackathon projects and tend to be a great way to explore Optimism, OP Mainnet, and the OP Stack.
Summary
High level objective: Influence developers to reflect their work in tokens so we can fund them with RetroPGF. Rough idea: Make it easy to tokenize a GH repo. The owner can choose an initial allocation, automatic rewards for merged PRs, etc. They are then responsible for distributing the tokens to contributors, etc.
Possible Features
- Allow the repository owner to "tokenize" a repository by adding a GitHub app.
- Allow the owner to modify the mechanism to distribute tokens.
Did some explorations in this a while back in two repos: https://github.com/carlbarrdahl/git-dao https://github.com/carlbarrdahl/gitwork
Gitwork allows you to add bounties to GitHub issues. It works by finding the person who made the commit in a PR that closed the issue and generating a signature for them to send to the smart contract. Here are the relevant pieces of code:
-
https://github.com/carlbarrdahl/gitwork/blob/master/apps/web/pages/%5Bowner%5D/%5Brepo%5D/%5Bissue_number%5D/claim.tsx#L115-L149
-
https://github.com/carlbarrdahl/gitwork/blob/master/hardhat/contracts/BountryRegistryV1.sol#L90-L106