Skip to content

A library of modern, hyper-optimized, and secure Huff contracts

License

Notifications You must be signed in to change notification settings

Czar102/huffmate

 
 

Repository files navigation

huffmate • ci license Discord

A set of modern, opinionated, and secure Huff contracts.

Warning: Be cautious

Huffmate is still a work in progress and the majority of contracts have yet to be completed and audited. We do not give any warranties and will not be liable for any loss incurred through any use of this codebase.

Use these contracts at your own risk!

Usage

To install with Foundry:

forge install pentagonxyz/huffmate

To install with Hardhat or Truffle:

npm install @pentagonxyz/huffmate

Contracts

auth
├─ Auth"Flexible and updatable auth pattern"
├─ NonPayable"Modifier Macro that reverts the tx when msg.value > 0"
├─ OnlyContract"Basic Macro that reverts when the sender is an EOA"
├─ Owned"Simple single owner authorization"
├─ RolesAuthority"Role based Authority that supports up to 256 roles"
data-structures
├─ Arrays - "Memory translation handlers for arrays"
├─ BytesTODO
├─ Hashmap - "Simple mapping utilities for 32 byte words"
factories
├─ Factory - TODO
├─ ProxyFactoryTODO
math
├─ FixedPointMath - "Fixed-point number arithmetic"
├─ Math"Refactored, common arithmetic macros"
├─ SafeMath"Safe wrappers for primitive arithmetic operations"
tokens
├─ ERC20"Modern and gas efficient ERC20 + EIP-2612 implementation"
├─ ERC721"Modern, minimalist, and gas efficient ERC721 implementation"
├─ ERC1155"Minimalist and gas efficient standard ERC1155 implementation"
├─ ERC4626"Minimal ERC4626 tokenized Vault implementation"
utils
├─ Calls - TODO
├─ DataTODO
├─ MerkleProofLib"Gas optimized merkle proof verification library"
├─ Multicallable"Enables a single call to call multiple methods within a contract."
├─ ReentrancyGuardTODO
├─ SSTORE2TODO

Safety

Although contracts have been rigorously reviewed, this is experimental software and is provided on an "as is" and "as available" basis.

We do not give any warranties and will not be liable for any loss incurred through any use of this codebase.

Acknowledgements

These contracts were inspired by or directly modified from many sources, primarily:

About

A library of modern, hyper-optimized, and secure Huff contracts

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Solidity 100.0%