{"id":16253378,"url":"https://github.com/eugenioclrc/huffswap-v2-core","last_synced_at":"2025-08-22T19:10:34.516Z","repository":{"id":242964854,"uuid":"808227353","full_name":"eugenioclrc/huffswap-v2-core","owner":"eugenioclrc","description":"A DEX with BALLs","archived":false,"fork":false,"pushed_at":"2024-08-13T03:38:51.000Z","size":743,"stargazers_count":12,"open_issues_count":0,"forks_count":2,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-02-28T21:02:59.007Z","etag":null,"topics":["balls","defi","dex","evm","huff"],"latest_commit_sha":null,"homepage":"","language":"Solidity","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/eugenioclrc.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-05-30T16:27:37.000Z","updated_at":"2024-12-05T17:36:07.000Z","dependencies_parsed_at":"2024-08-13T03:53:37.405Z","dependency_job_id":null,"html_url":"https://github.com/eugenioclrc/huffswap-v2-core","commit_stats":null,"previous_names":["eugenioclrc/huffswap-v2-core"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eugenioclrc%2Fhuffswap-v2-core","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eugenioclrc%2Fhuffswap-v2-core/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eugenioclrc%2Fhuffswap-v2-core/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eugenioclrc%2Fhuffswap-v2-core/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/eugenioclrc","download_url":"https://codeload.github.com/eugenioclrc/huffswap-v2-core/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244019343,"owners_count":20384736,"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":["balls","defi","dex","evm","huff"],"created_at":"2024-10-10T15:17:02.340Z","updated_at":"2025-03-19T20:31:55.289Z","avatar_url":"https://github.com/eugenioclrc.png","language":"Solidity","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003ccenter\u003e\n  \u003cimg src=\"logo.png\" width=\"250px\" alt=\"HuffSwap Logo\" /\u003e\n\u003c/center\u003e\n\n# HuffSwap \n**A Simple DEX with BALLs**\n\n## HuffSwap V2 Core\n\nHuffSwap V2 Core is a decentralized trading protocol that facilitates permissionless and trustless trading of ERC20 tokens through smart contracts. Its based on Uniswap V2, and should be compatible.\n\n## Previous Work\n\nThis project builds upon the [UniswapV2-core](https://github.com/Uniswap/v2-core/) contracts and maintains full compatibility. It also draws inspiration from previous efforts to rebuild the pair contract in Huff, such as [UniswapV2-Huff](https://github.com/AmadiMichael/UniswapV2-Huff/).\n\n### Prerequisites\n\nThese steps are optional if you want to modify the Pair code and recompile everything.\n\n1. Install [BALLs](https://github.com/Philogy/balls/tree/main)\n2. Install [Huff](https://github.com/huff-language/huff-rs?tab=readme-ov-file#installation)\n\n### Recompilation\n\nTo recompile the contracts, run the following commands:\n\n```bash\nsh build-erc20.sh\nsh build-erc1363.sh\nsh build-libs.sh\nsh build-lp.sh\nsh create-bytecode-pair.sh\n```\n\nIf you are on a liunx env you might want to limit the max amount of RAM to avoid deadlocks, example;\n```\nsystemd-run --scope -p MemoryLimit=14000M ./build-lp.sh\n```\n\nAfter recompiling, paste your new bytecode into [`Factory:getCreationCode`](https://github.com/eugenioclrc/huffswap-v2-core/blob/7b7572305d2ccce80c0d431beeba8948d9491080/src/Factory.sol#L32).\n\n### Setup Instructions\n\nTo get started with HuffSwap V2 Core, ensure you have Foundry installed. Follow these steps:\n\n1.  Clone the HuffSwap V2 Core repository:\n\n```bash\ngit clone https://github.com/eugenioclrc/huffswap-v2-core.git\n```\n\n2.  Navigate to the project directory:\n\n```bash\ncd huffswap-v2-core\n```\n\n3.  Install dependencies:\n\n```bash\nforge update\n```\n\n4.  Build the project:\n\n```bash\nforge build\n```\n\n5.  Run tests to ensure everything is set up correctly:\n\n```bash\nforge test\n```\n\nContributing\n------------\n\nWe welcome contributions from the community! To contribute, please follow these steps:\n\n1.  Fork the repository.\n2.  Create a new branch for your feature or bugfix.\n3.  Make your changes.\n4.  Submit a pull request with a detailed description of your changes.\n\nLicense\n-------\n\nHuffSwap V2 Core is released under the MIT License.\n\nContact\n-------\n\nFor questions or support, please open an issue in this repository or [reach out me on twitter](https://twitter.com/eugenioclrc).\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feugenioclrc%2Fhuffswap-v2-core","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Feugenioclrc%2Fhuffswap-v2-core","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feugenioclrc%2Fhuffswap-v2-core/lists"}