{"id":21247155,"url":"https://github.com/alchemyplatform/contract-puzzles","last_synced_at":"2025-07-10T22:32:15.122Z","repository":{"id":38385341,"uuid":"339608377","full_name":"alchemyplatform/Contract-Puzzles","owner":"alchemyplatform","description":null,"archived":false,"fork":false,"pushed_at":"2023-02-04T14:04:19.000Z","size":181,"stargazers_count":20,"open_issues_count":4,"forks_count":158,"subscribers_count":4,"default_branch":"master","last_synced_at":"2024-05-21T04:11:07.203Z","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":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/alchemyplatform.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":"2021-02-17T04:14:09.000Z","updated_at":"2024-03-05T20:47:25.000Z","dependencies_parsed_at":"2023-02-18T17:00:59.022Z","dependency_job_id":null,"html_url":"https://github.com/alchemyplatform/Contract-Puzzles","commit_stats":null,"previous_names":["alchemyplatform/contract-puzzles"],"tags_count":null,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alchemyplatform%2FContract-Puzzles","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alchemyplatform%2FContract-Puzzles/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alchemyplatform%2FContract-Puzzles/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alchemyplatform%2FContract-Puzzles/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/alchemyplatform","download_url":"https://codeload.github.com/alchemyplatform/Contract-Puzzles/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":225658502,"owners_count":17503667,"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-21T02:16:45.360Z","updated_at":"2024-11-21T02:16:45.874Z","avatar_url":"https://github.com/alchemyplatform.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"## Contract Puzzles\n\nThe goal of the Smart Contract puzzles is to work on reading smart contracts and writing good tests to modify those smart contracts.\n\nEach Game contract will have a storage variable called `isWon`:\n\n```\nbool public isWon;\n```\n\nThe objective is to set this `isWon` to `true` without modifying the smart contract.\n\nAt the same time, you're more than welcome to use `console.log` from hardhat if you need to [debug your smart contracts](https://hardhat.org/tutorial/debugging-with-hardhat-network.html#solidity-console-log).\n\n### Running the tests\n\nFirst, install all the dependencies with `npm i`. Then, you can run all tests at once by running `npx hardhat test`. However, this might be frustrating when you are just trying to test an individual game.\n\nIf you are working on `Game1`, for instance, it will make more sense to run the test cases for the first game: `npx hardhat test test/game1Test.js`. Each Game contract will have a corresponding test file.\n\nYour goal is to modify the tests to make the test case pass without modifying the smart contract (and leaving the `isWon` assertion in place).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falchemyplatform%2Fcontract-puzzles","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Falchemyplatform%2Fcontract-puzzles","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falchemyplatform%2Fcontract-puzzles/lists"}