RFC Title: Create the GitHub for collaborating on contracts
Author: phrea
Created: 2021-11-28
Brief Overview of Proposal:
Web3 communities need to discuss contract code like teams do on GitHub.
This is often done to find bugs/holes/exploits before an official launch.
We need to comment on lines of code in a way that’s similar to GitHub. But code on GitHub may not be the code deployed to the blockchain.
This RFC is for a product that displays deployed, verified contract code in a way that’s similar to GitHub, with collaboration features such as commenting, and requesting changes.
Goals and Scope:
- Product reads deployed code from a blockchain (e.g. ETH mainnet or Rinkeby)
- Product displays code with code formatting and line numbers (similar to GitHub)
- Product allows for users to comment on code using their wallet
- Produce should display comments to users (and allow comments to be hidden for readability)
Background & Motivation:
On a few NFT projects, I have collaborated with other members of the community to audit the code and do a code review to find potential bugs or exploits that could undermine the project.
These code reviews were only done in Discord, and it was immensely hard to track (and must be done synchronously), which is not conducive to a productive code review.
Getting the code into a comment-able system like GitHub requires a lot of steps from the code owner, or copy/pasting code from Etherscan.
Then, if the code is on GitHub, there’s no assurances that this same code is also the code that is deployed, without manually checking the code to ensure consistency.
This project would greatly advance the web3 ethos of collaboratively working together to create projects that communities love.
Design:
I believe this project can be completed with a front end in React or Vue, and a web2 backend to store comments data to start.
It’s a straightforward backend of simply storing comments to a line number.
Timeline:
Ideally by end of Q1 2022
Risks:
That no one will use it (which I don’t think is an issue)
Resources:
- Front end design for displaying the code in a readable format.
- Code formatting library
- Initial design to display code.
- A place to store comments (blockchain is probably overkill for v1). Likely a web2 infrastructure stack like a Rails/Sinatra/Django/Flask/Express.js API.
- A means of displaying the code in a readable and interactive way. Likely a good amount of custom front-end work.
- A means of reading verified contract data (e.g. Contracts - Etherscan)