{"id":23532903,"url":"https://github.com/jocoders/huff-puzzles","last_synced_at":"2026-04-24T21:31:22.533Z","repository":{"id":269742838,"uuid":"908024477","full_name":"jocoders/huff-puzzles","owner":"jocoders","description":"Solutions for Huff puzzles","archived":false,"fork":false,"pushed_at":"2025-01-14T21:01:10.000Z","size":579,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-06-14T13:43:47.580Z","etag":null,"topics":["ethereum","huff","smart-contracts"],"latest_commit_sha":null,"homepage":"","language":"Solidity","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jocoders.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,"zenodo":null}},"created_at":"2024-12-24T22:47:39.000Z","updated_at":"2025-02-05T19:59:39.000Z","dependencies_parsed_at":null,"dependency_job_id":"d8963311-3b74-41bd-9062-5563c082b57e","html_url":"https://github.com/jocoders/huff-puzzles","commit_stats":null,"previous_names":["jocoders/huff-puzzles"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/jocoders/huff-puzzles","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jocoders%2Fhuff-puzzles","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jocoders%2Fhuff-puzzles/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jocoders%2Fhuff-puzzles/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jocoders%2Fhuff-puzzles/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jocoders","download_url":"https://codeload.github.com/jocoders/huff-puzzles/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jocoders%2Fhuff-puzzles/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32241549,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-24T13:21:15.438Z","status":"ssl_error","status_checked_at":"2026-04-24T13:21:15.005Z","response_time":64,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["ethereum","huff","smart-contracts"],"created_at":"2024-12-25T23:13:07.676Z","updated_at":"2026-04-24T21:31:22.515Z","avatar_url":"https://github.com/jocoders.png","language":"Solidity","funding_links":[],"categories":[],"sub_categories":[],"readme":"# huff-puzzles by [RareSkills](https://www.rareskills.io)\n\nA series of puzzles that go from very easy to more difficult so that you can have a hands-on introduction to the [huff language](https://huff.sh) and learn EVM bytecode while doing it.\n\n## Pre-requisites\n\nMake sure you've installed the Huff Compiler as outlined in the [Huff Docs](https://docs.huff.sh/get-started/installing/#installing-huff).\n\nTLDR:\n\n    curl -L get.huff.sh | bash\n\nthen:\n\n     huffup\n\nTo verify your installation, run `huffc --help`. This should print a list of available commands for the huff compiler cli.\n\n## Installation\n\nTo install dependencies, run:\n\n    forge install\n\n## How to play\n\nGo to [Return1.huff](https://github.com/rareskills/huff-puzzles/blob/main/src/Return1.huff) in the src folder and edit it as follows\n\n```c\n#define macro MAIN() = takes(0) returns(0) {\n    // store 1 in memory at offset 0\n    0x01            // [1]\n    0x00            // [0, 1]\n    mstore          // []\n\n    // return 1\n    // return 32 bytes of memory starting at offset 0\n    0x20            // [32]\n    0x00            // [0, 32]\n    return          // []\n}\n```\n\nThen run the test with\n\n    forge test -vvv --mc Return1Test\n\nYou should see something like this\n\n    Running 1 test for test/Return1.t.sol:Return1Test\n    [PASS] testReturn1() (gas: 5358)\n    Test result: ok. 1 passed; 0 failed; finished in 4.56s\n\n## Suggested order for other exercises\n\n- [CallValue](https://github.com/rareskills/huff-puzzles/blob/main/src/CallValue.huff)\n- [CalldataLength](https://github.com/rareskills/huff-puzzles/blob/main/src/CalldataLength.huff)\n- [TimeAndBlock](https://github.com/rareskills/huff-puzzles/blob/main/src/TimeAndBlock.huff)\n- [MyEtherBalance](https://github.com/rareskills/huff-puzzles/blob/main/src/MyEtherBalance.huff)\n- [Add1](https://github.com/rareskills/huff-puzzles/blob/main/src/Add1.huff)\n- [Multiply](https://github.com/rareskills/huff-puzzles/blob/main/src/Multiply.huff)\n- [CountTime](https://github.com/rareskills/huff-puzzles/blob/main/src/CountTime.huff)\n- [NonPayable](https://github.com/rareskills/huff-puzzles/blob/main/src/NonPayable.huff)\n- [FooBar](https://github.com/rareskills/huff-puzzles/blob/main/src/FooBar.huff)\n- [MyCreator](https://github.com/rareskills/huff-puzzles/blob/main/src/MyCreator.huff)\n- [SimpleStore](https://github.com/rareskills/huff-puzzles/blob/main/src/SimpleStore.huff)\n- [RevertCustom](https://github.com/rareskills/huff-puzzles/blob/main/src/RevertCustom.huff)\n- [RevertString](https://github.com/rareskills/huff-puzzles/blob/main/src/RevertString.huff)\n- [SumArray](https://github.com/rareskills/huff-puzzles/blob/main/src/SumArray.huff)\n- [Keccak](https://github.com/rareskills/huff-puzzles/blob/main/src/Keccak.huff)\n- [MaxOfArray](https://github.com/rareskills/huff-puzzles/blob/main/src/MaxOfArray.huff)\n- [Create](https://github.com/rareskills/huff-puzzles/blob/main/src/Create.huff)\n- [Emitter](https://github.com/rareskills/huff-puzzles/blob/main/src/Emitter.huff)\n- [Donations](https://github.com/rareskills/huff-puzzles/blob/main/src/Donations.huff)\n- [SendEther](https://github.com/rareskills/huff-puzzles/blob/main/src/SendEther.huff)\n- [BasicBank](https://github.com/rareskills/huff-puzzles/blob/main/src/BasicBank.huff)\n- [Distribute](https://github.com/rareskills/huff-puzzles/blob/main/src/Distributor.huff)\n- [SimulateArray](https://github.com/rareskills/huff-puzzles/blob/main/src/SimulateArray.huff)\n\n## More resources\n\n- [Huff Documentation 🐴](https://docs.huff.sh/)\n- [Evm codes](https://evm.codes)\n- [Huffmate](https://github.com/huff-language/huffmate)\n- [Huff Console.log](https://github.com/AmadiMichael/Huff-Console)\n\n## Contributors\n\n- [Michael Amadi](https://github.com/AmadiMichael)\n- [Jesse Raymond](https://github.com/jesserc)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjocoders%2Fhuff-puzzles","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjocoders%2Fhuff-puzzles","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjocoders%2Fhuff-puzzles/lists"}