{"id":18639236,"url":"https://github.com/brianwchou/hangman","last_synced_at":"2025-10-17T12:44:02.588Z","repository":{"id":41688845,"uuid":"188692177","full_name":"brianwchou/hangman","owner":"brianwchou","description":"Dapp that allows you to play Hangman on the Ethereum network","archived":false,"fork":false,"pushed_at":"2023-01-24T01:40:44.000Z","size":2644,"stargazers_count":6,"open_issues_count":40,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-11T16:53:47.963Z","etag":null,"topics":["hangman","solidity","truffle","truffle-development"],"latest_commit_sha":null,"homepage":"http://guillotine.eth.link/","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/brianwchou.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-05-26T14:18:56.000Z","updated_at":"2023-04-18T00:01:37.000Z","dependencies_parsed_at":"2023-02-04T07:31:16.135Z","dependency_job_id":null,"html_url":"https://github.com/brianwchou/hangman","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/brianwchou/hangman","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/brianwchou%2Fhangman","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/brianwchou%2Fhangman/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/brianwchou%2Fhangman/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/brianwchou%2Fhangman/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/brianwchou","download_url":"https://codeload.github.com/brianwchou/hangman/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/brianwchou%2Fhangman/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279344961,"owners_count":26152654,"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","status":"online","status_checked_at":"2025-10-17T02:00:07.504Z","response_time":56,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["hangman","solidity","truffle","truffle-development"],"created_at":"2024-11-07T05:46:05.600Z","updated_at":"2025-10-17T12:44:02.552Z","avatar_url":"https://github.com/brianwchou.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"## Hangman\nPlay hangman on the Ethereum network. (Available currently on Ropsten network)\n\nHangman is a game where a player has limited attempts to guess a secret word. The player is allowed to guess a letter contained in the secret or guess the entire secret. Each incorrect guess uses an attempt. When all attempts have been made or if the word has been guessed correctly the game ends.\n\n### Technical description\nThis project is centered around these two contracts: `HangmanFactory.sol` and `Hangman.sol`. \nHangmanFactory is a Chainlink Client that will fetch a random word from the [Wikipedia](https://en.wikipedia.org/api/rest_v1/page/random/title) API. After the word is fetched, the factory will deploy an instance of Hangman with the random word and return the contract address to the UI. A new game display appears with guessword and letter inputs. A game over screen appears when the word has been guessed or there are no more avaliable attempts.\n\n### Local Setup\n1. `npm install truffle -g`\n2. `git clone git@github.com:brianwchou/Hangman.git`\n3. `cd Hangman`\n4. `yarn`\n5. `yarn web:install`\n5. `yarn truffle:compile`\n5. `yarn truffle:migrate`\n5. `yarn web:start`\n\n### Tech Framework\n- chainlink\n- truffle\n- ganache-cli\n- gnosis mock-contract\n- ganache-time-traveler\n- react\n- ethers.js\n- ipfs\n\n### Contracts\n```javascript\n +  HangmanFactory (ChainlinkClient, Ownable)\n    - [Pub] \u003cConstructor\u003e #\n    - [Pub] requestCreateGame #\n    - [Pub] fullfillCreateGame #\n    - [Prv] bytes32ToBytes\n    - [Pub] withdrawLink #\n    - [Pub] setUrl #\n    - [Pub] cancelRequest #\n\n +  Hangman (Ownable)\n    - [Ext] setSolution #\n    - [Ext] getUsedCharacters\n    - [Ext] makeCharGuess #\n    - [Prv] computeGuess\n    - [Ext] makeWordGuess #\n    - [Ext] getNumberOfCharacters\n    - [Ext] getCorrectlyGuessedCharacters\n    - [Prv] hasBitAtIndex\n\n ($) = payable function\n # = non-constant function\n```\n\n### Running Unit Tests\n```\nyarn test\n```\n\n### Running Integration Tests\nMake sure you have `.env` file set up\n```\nMNEMONIC=\"\"\nINFURA_API_KEY=\"\"\n```\nThen run:\n```\nyarn test-integration --network ropsten\n```\nIf there is a failure check\n```\n//ROPSTEN TESTNET ADDRESS\nconst chainlinkTokenAddress = \"0x20fE562d797A42Dcb3399062AE9546cd06f63280\";\nconst chainlinkOracleAddress = \"0xc99B3D447826532722E41bc36e644ba3479E4365\";\nconst CHAINLINK_HTTP_GET_JSON_PARSE_JOB_ID = \"76ca51361e4e444f8a9b18ae350a5725\";\nconst PAYMENT = 1;\n```\nhttps://ropsten.explorer.chain.link/\n\n### Deployment\nregister ethereum name on [ENS](https://ens.domains/)\n\nRun the following:\n```\nipfs daemon\ncd web\nyarn build\nipfs add -r build/\n```\n```\nadded QmaHNhLf89FacunsrZDpHBSvZ8khsm5seCBNJBy8tqHEKr build\n 2.87 MiB / 2.87 MiB\n [====================] 100.00%\n```\n\nTake last hash displayed and add it to content on ens public resolver\n\nFollowed directions [here](https://medium.com/the-ethereum-name-service/how-to-host-your-dapp-with-ipfs-ens-and-access-it-via-ethdns-c96046059d87)\n\nUpload may take some time to propagate and be available.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbrianwchou%2Fhangman","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbrianwchou%2Fhangman","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbrianwchou%2Fhangman/lists"}