{"id":19303336,"url":"https://github.com/commitground/commitground-contracts","last_synced_at":"2025-02-24T02:12:29.425Z","repository":{"id":137457436,"uuid":"140224007","full_name":"commitground/commitground-contracts","owner":"commitground","description":null,"archived":false,"fork":false,"pushed_at":"2018-07-09T03:09:31.000Z","size":10,"stargazers_count":0,"open_issues_count":0,"forks_count":1,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-01-05T23:40:41.522Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","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/commitground.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":"2018-07-09T02:59:01.000Z","updated_at":"2018-07-09T03:09:32.000Z","dependencies_parsed_at":null,"dependency_job_id":"249d3dee-3e30-488a-a4a9-8bd5a1594583","html_url":"https://github.com/commitground/commitground-contracts","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/commitground%2Fcommitground-contracts","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/commitground%2Fcommitground-contracts/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/commitground%2Fcommitground-contracts/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/commitground%2Fcommitground-contracts/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/commitground","download_url":"https://codeload.github.com/commitground/commitground-contracts/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240404755,"owners_count":19796064,"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-09T23:26:05.219Z","updated_at":"2025-02-24T02:12:29.368Z","avatar_url":"https://github.com/commitground.png","language":"JavaScript","readme":"# Commitground Contracts\n\nThis repository is used to develop \u0026 test the smart contracts for commitground using the truffle framework.\n\n# Repository Structure\n\n```.bash\n.\n├── .git\n├── contracts\n│   ├── .git\n│   ...\n│   └── Contracts.sol\n├── build\n├── migrations\n│   ├── 1_initial_migration.js\n│   └── 2_deploy_contracts.js\n├── package.json\n├── package-lock.json\n├── test\n│   ├── ...\n│   └── testcase.js\n└── truffle.js\n```\n\n- `contracts`:\n  Smart contracts written in Solidity are here.\n\n- `test`:\n  This is a directory for test cases. Keep in mind that writing test cases is dependent on the *contract* submodule.\n\n- Etc\n    - `build`: Build artifacts are stored in this directory.\n    - `migtrations`: Script to test or deploy the contracts\n\n# Prerequisites\n\n1. Install truffle\n\n    ```.bash\n    npm install -g truffle\n    ```\n    You can read truffle install doc [here](https://truffleframework.com/docs/getting_started/installation)\n\n1. Ganache(One click ethereum private net).\n\n    Two options exist. When you run this repository on your local environment, desktop app will help you know what's happening on the blockchain. But for the CI/CD environment, 'ganache-cli' will be a better option.\n    - [ganache-cli](https://github.com/trufflesuite/ganache-cli)\n    - [ganache desktop app](https://truffleframework.com/ganache)\n\n# Run test\n\n- Running test with ganache-cli.\n    ```.bash\n    ./run-test.sh\n    ```\n- Running test with ganache desktop app\n    - First, launch the ganache app\n    - Run the following command\n        ```\n        truffle test\n        ```\n\n# Contributing\n\n1. Fork this project.\n\n    - commitground-contracts: [![Fork](https://img.shields.io/github/forks/commitground/commitground-contracts.svg?style=social\u0026label=Fork)](https://github.com/commitground/commitground-contracts/fork)\n\n1. Clone your forked *commitground-contract* repository first.\n\n    ```.bash\n    $ git clone https://github.com/commitground/commitground-contracts\n    ```\n\n1. Make branches following the convention. Please check [this](https://github.com/commitground/guide)\n\n    ```.bash\n    $ git checkout -b $BRANCH_NAME #e.g. feature/create-project\n    ```\n\n1. Write test cases for a new contract. Read [this](https://truffleframework.com/docs/getting_started/javascript-tests) to know how to write a test case.\n\n    ```.bash\n    $ touch test/testCreateProject.js # write test cases here\n    ```\n\n1. Write a new contract \u0026 implement.\n\n    ```.bash\n    $ touch contracts/createProject.sol # write contracts here\n    ```\n\n1. Write a migration script. Read [this](https://truffleframework.com/docs/getting_started/migrations).\n\n    ```.bash\n    $ touch migrations/n_script_title.js # write contracts here\n    ```\n\n1. If it passes your test cases, push \u0026 make pull request.\n\n    ```.bash\n    $ ./run-test.sh\n    $ git add contracts test\n    $ git commit -m \"Add 'createProject' contract\"\n    $ git push origin $BRANCH_NAME # forked repository on your github account\n    ```\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcommitground%2Fcommitground-contracts","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcommitground%2Fcommitground-contracts","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcommitground%2Fcommitground-contracts/lists"}