├── README.md ├── app ├── .gitignore ├── README.md ├── components │ ├── Footer.jsx │ └── Navbar.jsx ├── next.config.js ├── package-lock.json ├── package.json ├── pages │ ├── _app.js │ ├── _document.js │ ├── claimreward.js │ ├── index.js │ └── orgregister.js └── public │ ├── favicon.ico │ ├── github.svg │ ├── icons │ └── 4.jpg │ ├── logo.png │ ├── main.css │ ├── manifest.json │ ├── nprogress.css │ └── robots.txt ├── contracts ├── ChainLinkClient.sol ├── EIP20.sol ├── EIP20Interface.sol └── Gitsource.sol └── server ├── .gitignore ├── app.js ├── config.js ├── dokesend.js ├── package-lock.json └── package.json /README.md: -------------------------------------------------------------------------------- 1 |

2 |

Gitmony

3 |
Make open source sustainable so that developers are appropriately rewarded
4 | 5 | 6 | 7 | GitMony uses **Harmony Bridge** and **Chainlink oracle**, to make a completely decentralized platform to reward opensource contributors. 8 | 9 | - 🎥 [Project Demo](https://www.youtube.com/watch?v=M7-3AImM8mI) 10 | - 📰 [GitCoin Submission](https://gitcoin.co/hackathon/hack-the-horizon/projects/4190/gitmony) 11 | - 🌐 [Oracle Jobs](https://market.link/jobs/c2387021-cf1c-44a0-ae79-66fcdf39cff3/runs) 12 | ### Problem 13 | 14 | Every year, there are events like Hacktoberfest and also some platforms which reward open source contributors but this system is somewhat centralized. 15 | Some open-source platforms, constantly deploy bots to trace whether the commits have been made or not to the assigned repo or not which is not necessary. 16 | 17 | ### Solution and Product 18 | 19 | GitMony is a truly decentralized platform to reward this and uses Chainlink and Harmony to verify the contributions on Github. The organization will have to register on the smart-contract and its HRC20 coins named (Doke Coin) will be deposited into the contract. 20 | 21 | Now a contributor will commit on the organisation’s repo and also prefix his public key to the commit message. Then the contributor will have to call the smart contract from his wallet and provide the info of his repo to which he has committed and also the commit hash. 22 | Now chainlink will verify the commit from github and if the wallet address on the commit message and the smart-contract caller’s address match then the HRC20 tokens will be transferred to the sender to reward the contributor. 23 | 24 | ### Running the project on your machine 25 | 26 | ```bash 27 | git clone git clone https://github.com/BakaOtaku/git_mony.git 28 | 29 | # Start the server 30 | cd server 31 | npm i 32 | npm start 33 | 34 | # Start the client 35 | cd app 36 | npm i 37 | npm run dev 38 | ``` 39 | 40 | Claim some doke coins for testing --> 41 | Open `ERC20Interface.sol` in remix 42 | 43 | This account with private key `fbfacda64b334c48c95b9bfdd7b772a4549a4c3444e3b8db33e22f4eba056aa1` 44 | 45 | Contains some Doke tokens which can be transferred to your account for testing. 46 | Please ensure that your account contains sufficient Ether and One for testing. 47 | 48 | ### Tech Stack: 49 | 50 | - **Harmony Protocol** : Harmony has fast and low transaction fee, which we have utilized for our platform. 51 | - **Chainlink Oracle** : Chainlink has been linked to GitMony to call an external API to verify whether the commit has been made or not. 52 | 53 | ### Blockers we overcame: 54 | 55 | We asked on the community telegram and did not come across through any running chainlink node on harmony-one testnet , but we overcame this by utilizing harmony-kovan bridge where chainlink is connected to Kovan and then performing all the transactions. 56 | 57 | ## Team 58 | 59 | - [ 👨🏻‍💻 Aniket Dixit](https://github.com/dixitaniket) 60 | - [ 👨🏻‍🎓 Arpit Srivastava](https://github.com/fuzious) 61 | - [ 🌊 Aman Raj](https://github.com/AmanRaj1608) 62 | 63 | --- 64 | -------------------------------------------------------------------------------- /app/.gitignore: -------------------------------------------------------------------------------- 1 | # See https://help.github.com/articles/ignoring-files/ for more about ignoring files. 2 | 3 | # dependencies 4 | /node_modules 5 | /.pnp 6 | .pnp.js 7 | 8 | # testing 9 | /coverage 10 | 11 | # next.js 12 | /.next/ 13 | /out/ 14 | 15 | # production 16 | /build 17 | 18 | # misc 19 | .DS_Store 20 | *.pem 21 | 22 | # debug 23 | npm-debug.log* 24 | yarn-debug.log* 25 | yarn-error.log* 26 | 27 | # local env files 28 | .env.local 29 | .env.development.local 30 | .env.test.local 31 | .env.production.local 32 | 33 | # vercel 34 | .vercel 35 | -------------------------------------------------------------------------------- /app/README.md: -------------------------------------------------------------------------------- 1 |

Portfolio

2 | 3 | Webpage built using - 4 | 5 | - NextJS 6 | - Netlify 7 | 8 |
9 | -------------------------------------------------------------------------------- /app/components/Footer.jsx: -------------------------------------------------------------------------------- 1 | export default function Layout() { 2 | return ( 3 | 9 | ) 10 | } -------------------------------------------------------------------------------- /app/components/Navbar.jsx: -------------------------------------------------------------------------------- 1 | import Link from 'next/link' 2 | import { useRouter } from "next/router"; 3 | 4 | export default function Layout() { 5 | 6 | const router = useRouter(); 7 | 8 | return ( 9 | 39 | ) 40 | } -------------------------------------------------------------------------------- /app/next.config.js: -------------------------------------------------------------------------------- 1 | const withOffline = require('next-offline') 2 | 3 | module.exports = withOffline({ 4 | workboxOpts: { 5 | runtimeCaching: [ 6 | { 7 | urlPattern: /.jpg$/, 8 | handler: 'CacheFirst' 9 | }, 10 | { 11 | urlPattern: /api/, 12 | handler: 'NetworkFirst', 13 | options: { 14 | cacheableResponse: { 15 | statuses: [0, 200], 16 | headers: { 17 | 'x-test': 'true' 18 | } 19 | } 20 | } 21 | } 22 | ] 23 | } 24 | }) -------------------------------------------------------------------------------- /app/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "gitmony", 3 | "description": "Make open source sustainable", 4 | "version": "1.0.0", 5 | "author": "Aman Raj ", 6 | "main": "index.js", 7 | "scripts": { 8 | "dev": "next", 9 | "build": "next build && next export", 10 | "start": "next start" 11 | }, 12 | "dependencies": { 13 | "axios": "^0.21.1", 14 | "next": "^10.0.3", 15 | "next-offline": "^5.0.3", 16 | "nprogress": "^0.2.0", 17 | "react": "^17.0.1", 18 | "react-dom": "^17.0.1", 19 | "sharp": "^0.26.3" 20 | }, 21 | "license": "MIT" 22 | } 23 | -------------------------------------------------------------------------------- /app/pages/_app.js: -------------------------------------------------------------------------------- 1 | import Router from 'next/router'; 2 | import React from 'react'; 3 | import Head from 'next/head'; 4 | import NProgress from 'nprogress'; 5 | 6 | Router.events.on('routeChangeStart', () => { 7 | NProgress.start() 8 | }) 9 | Router.events.on('routeChangeComplete', () => NProgress.done()) 10 | Router.events.on('routeChangeError', () => NProgress.done()) 11 | 12 | export default function App({ Component, pageProps }) { 13 | return ( 14 | 15 | 16 | Aman Raj · AmanRaj1608 17 | 18 | 19 | 20 | 21 | ) 22 | } 23 | -------------------------------------------------------------------------------- /app/pages/_document.js: -------------------------------------------------------------------------------- 1 | import Document, { Html, Head, Main, NextScript } from 'next/document'; 2 | class MyDocument extends Document { 3 | static async getInitialProps(ctx) { 4 | const initialProps = await Document.getInitialProps(ctx) 5 | return { ...initialProps } 6 | } 7 | 8 | render() { 9 | return ( 10 | 11 | 12 | 13 | {/* Import Images */} 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 |
26 | 27 | 28 | 29 | ) 30 | } 31 | } 32 | 33 | export default MyDocument; -------------------------------------------------------------------------------- /app/pages/claimreward.js: -------------------------------------------------------------------------------- 1 | import { useState } from 'react'; 2 | import Navbar from '../components/Navbar'; 3 | import Head from 'next/head'; 4 | import axios from 'axios'; 5 | 6 | export default function Index() { 7 | const [orgName, setOrgName] = useState(null); 8 | const [repoName, setRepoName] = useState(null); 9 | const [hash, setHash] = useState(null); 10 | const [pkey, setPkey] = useState(null); 11 | const [link, setLink] = useState(''); 12 | const [isLoading, setIsLoading] = useState(false); 13 | 14 | const register = async (e) => { 15 | e.preventDefault(); 16 | setIsLoading(true); 17 | console.log(orgName, repoName, hash); 18 | const res = await axios.post(`https://gitmony.herokuapp.com/claimAward`, { 19 | "orgname": orgName, 20 | "reponame": repoName, 21 | "commithash": hash, 22 | "privatekey": pkey 23 | }) 24 | setIsLoading(false); 25 | console.log(res.data); 26 | setLink(res.data); 27 | } 28 | 29 | return ( 30 | <> 31 | 32 | Claim Reward 33 | 34 | 35 |
36 |
37 |

🎊 Claim your Reward 🎉

38 | 39 | Claim your crypto working. 40 | 41 |
42 | { 43 | link && 44 | Track here {' '} 45 | {`https://kovan.etherscan.io/tx/${link}`} 46 | 47 | } 48 |
49 |
50 | { 51 | isLoading ?
52 | : 53 | <>

Enter the ogranisation name

54 | setOrgName(e.target.value)} 59 | /> 60 |

Enter the repo name

61 | setRepoName(e.target.value)} 66 | /> 67 |

Enter the commit hash

68 | setHash(e.target.value)} 73 | /> 74 |

Enter your private key

75 | setPkey(e.target.value)} 80 | /> 81 | 84 | 85 | } 86 | 87 |
88 | 89 |
90 | 91 |
92 | 93 | ) 94 | } 95 | -------------------------------------------------------------------------------- /app/pages/index.js: -------------------------------------------------------------------------------- 1 | import Navbar from '../components/Navbar' 2 | import Footer from '../components/Footer' 3 | import Head from 'next/head' 4 | import Image from 'next/image' 5 | 6 | export default function Index() { 7 | return ( 8 | <> 9 | 10 | Gitmony · Open Source 11 | 12 | 13 |
14 |
15 |
16 | Aman 24 |
25 | 💰 26 |
27 |
28 |
29 |

30 | Gitmony 31 |
32 | Make open source sustainable 33 |

34 |
35 |

36 | We think enthusiastic open source developers are not appropriately rewarded 37 |

38 |
39 |
40 | {/*
*/} 41 |
42 |
Why Gitmony
43 |
44 |

45 | GitMony uses Harmony Bridge and Chainlink oracle, to make completely decentralized platform to reward opensource contributors. 46 | This is the issue-based bounty platform for open source projects. 47 |

48 |

49 | GitMony is a truly decentralized platform to reward this and uses Chainlink and Harmony to verify the contributions on Github. 50 | The organization will have to register on the smart-contract and its HRC20 coins named (Doke Coin) will be deposited into the contract. 51 | Now a contributor will commit on the organisation’s repo and also prefix his public key to the commit message. 52 |

53 |

54 | Then the contributor will have to call the smart contract from his wallet and provide the info of his repo to which he has committed and also the commit hash. 55 | Now chainlink will verify the commit from github and if the wallet address on the commit message and the smart-contract caller’s address match then the HRC20 tokens will be transferred to the sender to reward the contributor. 56 |

57 |
58 |
59 | 60 |
61 | 62 |
63 |