Git Product home page Git Product logo

huffmate's Introduction

huffmate • ci version license Discord

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

Warning

These contracts are unaudited and are not recommended for use in production.

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.

Usage

Recommended 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"
├─ Hashmap — "Simple mapping utilities for 32 byte words"
proxies
├─ Clones — "Clones library for deploying minimal proxy contracts"
├─ Proxy — "Minimal ERC1967-compliant + upgradeable proxy contract"
mechanisms
|  ├─ huff-clones — "Library for creating clone contracts with immutable arguments"
|  |  ├─ ExampleClone — "Example clones-with-immutable-args clone contract"
|  |  ├─ ExampleCloneFactory — "Example clones-with-immutable-args factory contract"
|  |  ├─ HuffClone — "Clones-with-immutable-args Clone Instance"
|  |  └─ HuffCloneLib — "Library for creating a HuffClone"
|  └─ huff-vrgda — "Variable Rate Gradual Dutch Auctions written in Huff"
|      ├─ LinearVRGDA — "VRGDA with a linear issuance curve"
|      ├─ LogisticVRGDA — "VRGDA with a logistic issuance curve"
|      └─ VRGDA — "Sell tokens roughly according to an issuance schedule"
math
├─ FixedPointMath — "Arithmetic library with operations for fixed-point numbers"
├─ Math — "Refactored, common arithmetic macros"
├─ SafeMath — "Safe Wrappers over primitive arithmetic operations"
├─ Trigonometry — "Basic trigonometry functions where inputs and outputs are integers"
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 — "Minimal wrappers for constructing calls to other contracts"
├─ BitPackLib — "Efficient bit packing library"
├─ CustomErrors — "Wrappers for reverting with common error messages"
├─ ERC1155Receiver — "A minimal interface for receiving ERC1155 tokens"
├─ Errors — "Custom error utilities"
├─ JumpTableUtil — "Utility macros for retrieving jumpdest pcs from jump tables"
├─ LibBit — "A library ported from solady for bit twiddling operations"
├─ MerkleProofLib — "Gas optimized merkle proof verification library"
├─ Multicallable — "Enables a single call to call multiple methods within a contract"
├─ TSOwnable — "An Ownable Implementation using Two-Step Transfer Pattern"
├─ ReentrancyGuard — "Gas optimized reentrancy protection for smart contracts"
├─ SafeTransferLib — "Safe ETH and ERC20 transfer library that gracefully handles missing return values"
├─ Shuffling — "Refactored algorithms for shuffling and other bitwise algorithms"
└─ SSTORE2 — "Faster & cheaper contract key-value storage for Ethereum Contracts"

Acknowledgements

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

huffmate's People

Contributors

refcell avatar clabby avatar kadenzipfel avatar maddiaa0 avatar jetjadeja avatar jtriley-eth avatar manasbir avatar exp-table avatar benleim avatar sarhaang avatar devtooligan avatar mathisgd avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.