{"id":20169199,"url":"https://github.com/developer-dao/code-claim-site-prod","last_synced_at":"2026-06-07T08:32:49.685Z","repository":{"id":217972629,"uuid":"528109903","full_name":"Developer-DAO/code-claim-site-prod","owner":"Developer-DAO","description":null,"archived":false,"fork":false,"pushed_at":"2022-08-23T18:09:53.000Z","size":4677,"stargazers_count":0,"open_issues_count":1,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-01-13T15:17:31.127Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Developer-DAO.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-08-23T18:08:05.000Z","updated_at":"2024-01-18T23:13:52.000Z","dependencies_parsed_at":null,"dependency_job_id":"9c4adc55-9845-445f-b899-aafd0290a595","html_url":"https://github.com/Developer-DAO/code-claim-site-prod","commit_stats":null,"previous_names":["developer-dao/code-claim-site-prod"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Developer-DAO%2Fcode-claim-site-prod","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Developer-DAO%2Fcode-claim-site-prod/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Developer-DAO%2Fcode-claim-site-prod/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Developer-DAO%2Fcode-claim-site-prod/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Developer-DAO","download_url":"https://codeload.github.com/Developer-DAO/code-claim-site-prod/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241605819,"owners_count":19989612,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-14T01:11:44.020Z","updated_at":"2025-03-03T04:13:24.521Z","avatar_url":"https://github.com/Developer-DAO.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![MythXBadge](https://badgen.net/https/api.mythx.io/v1/projects/b24b61fa-1d1f-492c-aad9-8eb7bdbea289/badge/data?cache=300\u0026icon=https://raw.githubusercontent.com/ConsenSys/mythx-github-badge/main/logo_white.svg)](https://docs.mythx.io/dashboard/github-badges)\n\n# DeveloperDAO $CODE contract \u0026 claim site\n\nA monorepo containing both the $CODE token contract \u0026 the claim web app.\n\n## Contents\n\n\u003c!--ts--\u003e\n\n- [Related](#related)\n- [Development](#prerequisites)\n  - [Prerequisites](#prerequisites)\n  - [Libraries used](#libraries-used)\n  - [Run in Gitpod](#run-in-gitpod)\n  - [Run Locally](#run-locally)\n  - [Running Tests](#running-tests)\n  - [Scripts](#scripts)\n- [Acknowledgements](#acknowledgements)\n- [License](#license)\n\u003c!--te--\u003e\n\n## Related\n\n- [member-and-early-contributor-rewards](https://github.com/Developer-DAO/member-and-early-contributor-rewards): Snapshots for the NFT Holders (Memebr allocation) \u0026 POAP/Snapshot votes (Early contributors).\n- [developer-dao-erc20-contract](https://github.com/Developer-DAO/developer-dao-erc20-contract): Nader's initial ERC20 implementation, derived from the ENS token. We used the latest state here in /packages/hardhat.\n- [merkletreejs](https://github.com/miguelmota/merkletreejs): Utility to generate the Merkletree.\n\n## Main Scripts\n\nHere is a list of the main scripts to run:\n\n- Default dev environment, esp. when working on the web app: `yarn dev`\n- Spin-up the storybook for isolated UI development: `yarn storybook`\n- This will create the Merkle Tree: `yarn execute localhost scripts/getMerkleRoot data/nft_holders.json data/votes_and_poap_holders.json data/final_early_contributor_amounts.json`\n- This script sets the merkle root hash on the contract: `yarn execute localhost scripts/setMerkleRoot.ts \u003cmerkle root\u003e`\n\n### Generating Airdrop Data\n\nBefore deployment, we need to generate airdrop data first\n\n1. `./generate-airdrop.sh rinkeby` the script use `mainnet` as the default network\n2. Copy inner JSON data from `packages/hardhat/data/out/airdrop_ui_rinkeby.json` into the airdrop item in `packages/next-app/src/data/airdrop.ts`\n\n### Deploying\n\nTo deploy to **Mainnet**, these are the steps:\n\n1. Set env vars ETH_NODE_URI = 'https://rinkeby.infura.io/v3/$projectId' (or other node services e.g. alchemy, quicknode), MNEMONIC = 'words words words.... words'\n2. `yarn deploy mainnet`\n3. `cd packages/hardhat \u0026\u0026 npx hardhat --network mainnet etherscan-verify --api-key \u003cetherscan API key\u003e`\n4. `yarn execute mainnet scripts/merkleRootSanityCheck`\n\nThe code that gets network specific resources from env variables (like ETH_NODE_URI and MNEMONIC) is located at `packages/hardhat/utils/network.ts`.\nTo change how e.g. the accounts are defined (by setting PKs directly instead of using mnemonic), the `accounts` function in that file would need to be changed. This function is then used in hardhat.config.ts to get the accounts info per network.\n\n## Development\n\nThis section covers all info necessary to start development on the contract and website.\n\n### Prerequisites\n\n- [Yarn](https://yarnpkg.com/)\n- [Node.js](https://nodejs.org/en/download/)\n- [MetaMask wallet browser extension](https://metamask.io/download.html).\n\n### Libraries used\n\nHere's an overview of the included frameworks and tools.\n\n- **Next.js** - Minimalistic framework for server-rendered React applications.\n- **Typescript** - Superset of JavaScript which primarily provides optional static typing, classes and interfaces.\n- **ESLint** - The pluggable linting utility.\n- **Yarn Workspace** - Easier monorepo management.\n- **Github Actions** - Tools to automate all your software workflows.\n- **Chakra UI** - UI \u0026 Styling Library.\n- **Typechain** - TypeScript bindings for Ethereum smart contracts.\n- **Hardhat** - Ethereum development environment for professionals.\n- **Hardhat-deploy** - A Hardhat Plugin For Replicable Deployments And Easy Testing.\n- **Jest** - A delightful JavaScript Testing Framework with a focus on simplicity.\n- **Mocha** - A feature-rich JavaScript test framework.\n- **Cypress** - A JavaScript End to End Testing Framework.\n- **React Testing Library** - Simple and complete React DOM testing utilities that encourage good testing practices.\n\n### Run in Gitpod\n\nTo run this project in Gitpod, follow these steps:\n\u003cbr/\u003e\n\n1. Click this link to deploy to gitpod\n   \u003cbr/\u003e\n\n[![Open in Gitpod](https://gitpod.io/button/open-in-gitpod.svg)](https://gitpod.io/#github.com/Developer-DAO/code-claim-site)\n\n2. Import the RPC address given to you by GitPod into your MetaMask wallet\n\nThis endpoint will look something like this:\n\n```bash\nhttps://8545-copper-swordtail-j1mvhxv3.ws-eu18.gitpod.io/\n```\n\nThe chain ID should be 1337. If you have a localhost rpc set up, you may need to overwrite it.\n\u003cbr/\u003e\n\n![MetaMask RPC Import](./static/wallet.png)\n\nyou can also change your status of your open ports by going to port settings.\n\u003cbr/\u003e\n\n![port settings](./static/gitpod-port.png)\n\n### Run Locally\n\nClone the project, then Install dependencies\n\n```bash\n  yarn install\n```\n\nStart hardhat \u0026 Next.js server\n\n```bash\n  yarn dev\n```\n\n### Running Tests\n\nTo run tests, run the following command\n\n```bash\n  yarn test\n```\n\n### Scripts\n\nHere is the list of npm scripts you can execute:\n\nSome of them relies on [packages/hardhat/\\_scripts.js](./packages/hardhat/_scripts.js) to allow parameterizing it via command line argument\n\u003cbr/\u003e\u003cbr/\u003e\n\n`yarn prepare`\n\nAs a standard lifecycle npm script, it is executed automatically upon install. It generates typechain to get you started with type safe contract interactions.\n\u003cbr/\u003e\u003cbr/\u003e\n\n`yarn dev`\n\nthis will start a next.js and Hardhat development server .\n\u003cbr/\u003e\u003cbr/\u003e\n\n`yarn test`\n\nThese will execute your tests in `packages/next-app` and `packages/hardhat`.\n\u003cbr/\u003e\u003cbr/\u003e\n\n`yarn build`\n\nthis will build `packages/next-app` and compile `packages/hardhat` for production.\n\u003cbr/\u003e\u003cbr/\u003e\n\n`yarn deploy \u003cnetwork\u003e [args...]`\n\nThis will deploy the contract on the specified network.\n\nBehind the scene it uses `hardhat deploy` command so you can append any argument for it\n\u003cbr/\u003e\u003cbr/\u003e\n\n`yarn start`\n\nthis will start a production Next.js server located in `packages/next-app`.\n\u003cbr/\u003e\u003cbr/\u003e\n\n`yarn lint`, `yarn lint:fix`, `yarn format` and `yarn format:fix`\n\nThese will lint and format your code under `packages` folder. the `:fix` version will modify the files to match the requirement specified in `.eslintrc` and `.prettierrc.`.\n\n\u003cbr/\u003e\u003cbr/\u003e\n\n`yarn compile`\n\nThese will compile your contracts\n\u003cbr/\u003e\u003cbr/\u003e\n\n`yarn void:deploy`\n\nThis will deploy your contracts on the in-memory hardhat network and exit, leaving no trace. quick way to ensure deployments work as intended without consequences\n\u003cbr/\u003e\u003cbr/\u003e\n\n`yarn hardhat:test [mocha args...]`\n\nThese will execute your tests in `packages/hardhat` directory using mocha. you can also pass extra arguments to mocha\n\u003cbr/\u003e\u003cbr/\u003e\n\n`yarn hardhat:coverage`\n\nThese will produce a coverage report for `packages/hardhat` tests.\n\u003cbr/\u003e\u003cbr/\u003e\n\n`yarn gas`\n\nThese will produce a gas report for functions used in the `packages/hardhat` tests\n\u003cbr/\u003e\u003cbr/\u003e\n\n`yarn hardhat:dev`\n\nThese will run a local hardhat network on `localhost:8545` and deploy your contracts on it. Plus it will watch for any changes and redeploy them.\n\u003cbr/\u003e\u003cbr/\u003e\n\n`yarn local:dev`\n\nThis assumes a local node it running on `localhost:8545`. It will deploy your contracts on it. Plus it will watch for any changes and redeploy them.\n\u003cbr/\u003e\u003cbr/\u003e\n\n`yarn execute \u003cnetwork\u003e \u003cfile.ts\u003e [args...]`\n\nThis will execute the script `\u003cfile.ts\u003e` against the specified network\n\u003cbr/\u003e\u003cbr/\u003e\n\n`yarn export \u003cnetwork\u003e \u003cfile.json\u003e`\n\nThis will export the abi+address of deployed contract to `\u003cfile.json\u003e`\n\u003cbr/\u003e\u003cbr/\u003e\n\n`yarn fork:execute \u003cnetwork\u003e [--blockNumber \u003cblockNumber\u003e] [--deploy] \u003cfile.ts\u003e [args...]`\n\nThis will execute the script `\u003cfile.ts\u003e` against a temporary fork of the specified network\n\nif `--deploy` is used, deploy scripts will be executed\n\u003cbr/\u003e\u003cbr/\u003e\n\n`yarn fork:deploy \u003cnetwork\u003e [--blockNumber \u003cblockNumber\u003e] [args...]`\n\nThis will deploy the contract against a temporary fork of the specified network.\n\nBehind the scene it uses `hardhat deploy` command so you can append any argument for it\n\u003cbr/\u003e\u003cbr/\u003e\n\n`yarn fork:test \u003cnetwork\u003e [--blockNumber \u003cblockNumber\u003e] [mocha args...]`\n\nThis will test the contract against a temporary fork of the specified network.\n\u003cbr/\u003e\u003cbr/\u003e\n\n`yarn fork:dev \u003cnetwork\u003e [--blockNumber \u003cblockNumber\u003e] [args...]`\n\nThis will deploy the contract against a fork of the specified network and it will keep running as a node.\n\nBehind the scene it uses `hardhat node` command so you can append any argument for it\n\n## Acknowledgements\n\nThis project was started from the [nextjs-dapp-starter-ts](https://github.com/G3root/nextjs-dapp-starter-ts) starter project.\n\n## License\n\n[MIT](https://choosealicense.com/licenses/mit/)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdeveloper-dao%2Fcode-claim-site-prod","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdeveloper-dao%2Fcode-claim-site-prod","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdeveloper-dao%2Fcode-claim-site-prod/lists"}