{"id":13766709,"url":"https://github.com/huff-language/huffmate","last_synced_at":"2025-05-10T22:31:16.713Z","repository":{"id":48241223,"uuid":"504255843","full_name":"huff-language/huffmate","owner":"huff-language","description":"A library of modern, hyper-optimized, and extensible Huff contracts with extensive testing and documentation built by Huff maintainers.","archived":false,"fork":false,"pushed_at":"2024-06-24T09:06:29.000Z","size":1037,"stargazers_count":442,"open_issues_count":13,"forks_count":55,"subscribers_count":11,"default_branch":"main","last_synced_at":"2025-01-14T18:39:57.074Z","etag":null,"topics":["bytecode","ethereum","evm","huff"],"latest_commit_sha":null,"homepage":"https://github.com/pentagonxyz/huffmate","language":"Solidity","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/huff-language.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":"2022-06-16T17:59:47.000Z","updated_at":"2025-01-10T21:02:28.000Z","dependencies_parsed_at":"2024-01-11T23:43:26.206Z","dependency_job_id":"85cedfd2-49ab-4a4e-931b-10685ef2a650","html_url":"https://github.com/huff-language/huffmate","commit_stats":null,"previous_names":["pentagonxyz/huffmate"],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/huff-language%2Fhuffmate","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/huff-language%2Fhuffmate/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/huff-language%2Fhuffmate/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/huff-language%2Fhuffmate/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/huff-language","download_url":"https://codeload.github.com/huff-language/huffmate/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253492529,"owners_count":21916959,"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":["bytecode","ethereum","evm","huff"],"created_at":"2024-08-03T16:00:59.756Z","updated_at":"2025-05-10T22:31:15.805Z","avatar_url":"https://github.com/huff-language.png","language":"Solidity","readme":"\u003cimg align=\"right\" width=\"150\" height=\"150\" top=\"100\" src=\"./assets/huff.jpg\"\u003e\n\n# huffmate • [![ci](https://github.com/huff-language/huffmate/actions/workflows/test.yml/badge.svg)](https://github.com/huff-language/huffmate/actions/workflows/test.yml) [![version](https://img.shields.io/badge/version-v1.1-ff69b4)](https://github.com/huff-language/huffmate/releases/tag/v1.1) [![license](https://img.shields.io/badge/License-MIT-orange.svg?label=license)](https://opensource.org/licenses/MIT) ![Discord](https://img.shields.io/discord/980519274600882306?color=blue)\n\nA set of **modern**, **opinionated**, and **secure** [Huff](https://github.com/huff-language) contracts.\n\n\u003e **Warning**\n\u003e\n\u003e These contracts are **unaudited** and are not recommended for use in production.\n\u003e\n\u003e Although contracts have been rigorously reviewed, this is **experimental software** and is provided on an \"as is\" and \"as available\" basis.\n\u003e We **do not give any warranties** and **will not be liable for any loss** incurred through any use of this codebase.\n\n### Usage\n\n**Recommended** To install with [**Foundry**](https://github.com/foundry-rs/foundry):\n\n```sh\nforge install huff-language/huffmate\n```\n\nTo install with [**Hardhat**](https://github.com/nomiclabs/hardhat) or [**Truffle**](https://github.com/trufflesuite/truffle):\n\n```sh\nnpm install @pentagonxyz/huffmate\n```\n\n### Contracts\n\n```\nauth\n├─ Auth — \"Flexible and updatable auth pattern\"\n├─ NonPayable — \"Modifier Macro that reverts the tx when msg.value \u003e 0\"\n├─ OnlyContract — \"Basic Macro that reverts when the sender is an EOA\"\n├─ Owned — \"Simple single owner authorization\"\n├─ RolesAuthority — \"Role based Authority that supports up to 256 roles\"\ndata-structures\n├─ Arrays — \"Memory translation handlers for arrays\"\n├─ Hashmap — \"Simple mapping utilities for 32 byte words\"\n├─ Bytes — \"Helpers for working with Bytes\"\nproxies\n├─ Clones — \"Clones library for deploying minimal proxy contracts\"\n├─ Proxy — \"Minimal ERC1967-compliant + upgradeable proxy contract\"\nmechanisms\n|  ├─ huff-clones — \"Library for creating clone contracts with immutable arguments\"\n|  |  ├─ ExampleClone — \"Example clones-with-immutable-args clone contract\"\n|  |  ├─ ExampleCloneFactory — \"Example clones-with-immutable-args factory contract\"\n|  |  ├─ HuffClone — \"Clones-with-immutable-args Clone Instance\"\n|  |  └─ HuffCloneLib — \"Library for creating a HuffClone\"\n|  └─ huff-vrgda — \"Variable Rate Gradual Dutch Auctions written in Huff\"\n|      ├─ LinearVRGDA — \"VRGDA with a linear issuance curve\"\n|      ├─ LogisticVRGDA — \"VRGDA with a logistic issuance curve\"\n|      └─ VRGDA — \"Sell tokens roughly according to an issuance schedule\"\nmath\n├─ FixedPointMath — \"Arithmetic library with operations for fixed-point numbers\"\n├─ Math — \"Refactored, common arithmetic macros\"\n├─ SafeMath — \"Safe Wrappers over primitive arithmetic operations\"\n├─ Trigonometry — \"Basic trigonometry functions where inputs and outputs are integers\"\ntokens\n├─ ERC20 — \"Modern and gas efficient ERC20 + EIP-2612 implementation\"\n├─ ERC721 — \"Modern, minimalist, and gas efficient ERC721 implementation\"\n├─ ERC1155 — \"Minimalist and gas efficient standard ERC1155 implementation\"\n├─ ERC4626 — \"Minimal ERC4626 tokenized Vault implementation\"\nutils\n├─ Address — \"Simple Utils for working with addresses\"\n├─ BitPackLib — \"Efficient bit packing library\"\n├─ Calls — \"Minimal wrappers for constructing calls to other contracts\"\n├─ CommonErrors — \"Wrappers for reverting with common error messages\"\n├─ CREATE3 — \"Deploy to deterministic addresses without the initcode factor\"\n├─ ECDSA — \"An optimised ECDSA wrapper\"\n├─ ERC1155Receiver — \"A minimal interface for receiving ERC1155 tokens\"\n├─ ERC20Transfer — \"Efficient ERC20 transfer wrappers\"\n├─ Errors — \"Custom error utilities\"\n├─ Ethers — \"Utilities for working with ether at a low level\"\n├─ JumpTableUtil — \"Utility macros for retrieving jumpdest pcs from jump tables\"\n├─ LibBit — \"A library ported from solady for bit twiddling operations\"\n├─ MerkleProofLib — \"Gas optimized merkle proof verification library\"\n├─ Multicallable — \"Enables a single call to call multiple methods within a contract\"\n├─ Pausable — \"An implementation of the Pausable standard\"\n├─ ReentrancyGuard — \"Gas optimized reentrancy protection for smart contracts\"\n├─ Refunded — \"Efficient gas refunds distributed through a modifier\"\n├─ SafeTransferLib — \"Safe ETH and ERC20 transfer library that gracefully handles missing return values\"\n├─ Shuffling — \"Refactored algorithms for shuffling and other bitwise algorithms\"\n└─ SSTORE2 — \"Faster \u0026 cheaper contract key-value storage for Ethereum Contracts\"\n└─ Ternary — \"A collection of ternary operations with abstracted conditional logic\"\n└─ TSOwnable — \"An Ownable Implementation using Two-Step Transfer Pattern\"\n```\n\n### Acknowledgements\n\nThese contracts were inspired by or directly modified from many sources, primarily:\n\n- [solmate](https://github.com/transmissions11/solmate)\n- [solady](https://github.com/Vectorized/solady)\n- [zolidity](https://github.com/z0r0z/zolidity)\n- [huff-examples](https://github.com/huff-language/huff-examples)\n- [huff-rs](https://github.com/huff-language/huff-rs)\n- [huff-clones](https://github.com/clabby/huff-clones)\n- [huff-vrgda](https://github.com/cheethas/huff-vrgda)\n- [huff-tests](https://github.com/huff-language/huff-tests-action)\n- [erc721h](https://github.com/philogy/erc721h)\n- [Gnosis](https://github.com/gnosis/gp-v2-contracts)\n- [Uniswap](https://github.com/Uniswap/uniswap-lib)\n- [Dappsys](https://github.com/dapphub/dappsys)\n- [Dappsys V2](https://github.com/dapp-org/dappsys-v2)\n- [0xSequence](https://github.com/0xSequence)\n- [OpenZeppelin](https://github.com/OpenZeppelin/openzeppelin-contracts)\n","funding_links":[],"categories":["Huff projects you can learn from and contribute to"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhuff-language%2Fhuffmate","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhuff-language%2Fhuffmate","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhuff-language%2Fhuffmate/lists"}