Coder Social home page Coder Social logo

awesome-huff's Introduction

awesome-huff

What the heck is Huff?

Huff is a low-level programming language designed for developing highly optimized smart contracts that run on the Ethereum Virtual Machine (EVM). Huff does not hide the inner workings of the EVM. Instead, Huff exposes its programming stack and provides useful tools like constants and macros.

Initially developed by the Aztec Protocol team, Huff was created to write Weierstrudel, an on-chain elliptical curve arithmetic library that requires incredibly optimized code which neither Solidity nor Yul could provide. Huff was later rewritten by Jet Jadeja in Typescript, and finally it has been rewritten in Rust as huff-rs which is the version we use today.

Huff can be used to write highly-efficient smart contracts for use in production, or it can serve as a way for beginners to learn more about the EVM.

Join the movement on Twitter

Drop a gm in the Discord

  • Huff is still young, but it already has a thriving community. People on the Huff discord are helpful, friendly, and chill.

Start here

Official huff-language Github repo

This is your main GH org for all things Huff: https://github.com/huff-language.

  • huff-rs You'll be installing this, the new compiler built in Rust, developed by the community and recently released to the public. After installing huffc it's time to start hacking! Write your first Huff function, anon. Start with something simple like adding two numbers. See the tutorials in the docs.
  • huff-project-template A template for bootstrapping new Huff projects. Includes Foundry HuffDeployer.
  • huffmate A library of modern, hyper-optimized, and secure Huff contracts. Currently the gold standard of Huff libraries.
  • vscode-huff A VSCode extension for Huff with syntax highlighting. Also available from within your VSCode in the Extensions Marketplace.
  • huff-examples Currently has wip versions of ERC20 and ERC721.
  • huff-breakage ๐Ÿ’ŽHIDDEN GEM๐Ÿ’Ž A repo containing incorrect, breaking, and footgunned Huff contracts. You'll learn a lot about Huff by reading what not to do in this excellent resource by @refcells.
  • huff-debug An easy hevm debug integration for hardhat-huff projects.
  • foundry-huff Foundry support for Huff. Includes HuffDeployer to compile and test Huff contracts.
  • hardhat-huff Huff support for Hardhat.

Huff tooling

  • Bytepeep Bytepeep is a minimal bytecode peephole optimizer by @0xKaden.
  • Murph Transpile EVM bytecode into Huff.
  • vim-huff Huff syntax highlighting for vim
  • hufflime A Sublime Text package for Huff syntax highlighting.
  • huff-stacker Automatically generate stack comments for huff macros.
  • Huff-Console Console logging functionality for debugging Huff contracts during development. Allows you log out the stack, memory and calldata easily and dynamically by Michael Amadi.
  • Huffpoint Create breakpoints in your Huff code to use with Foundry debugger.

Huff articles

Huff videos

Projects using Huff in the wild

Huff projects you can learn from and contribute to

We heard you like ERC20 implementations

  • huffmate ERC20 This is the current gold standard of Huff ERC20 (includes EIP-2612 Permit) and passing all Solmate tests.
  • erc20-huff An ERC20 with Foundry tests.
  • huff-pg An ERC20 implementation with SafeMath.
  • huff-examples-ERC20 Currently has wip versions of ERC20 and ERC721.
  • Solmate ERC20 ERC20 implemented on Huff fully complete with all functionality

Know your roots, anon

Advanced EVM articles

EVM opcodes

  • evm.codes WITH HUFF PLAYGROUND check it out! This is a fork of evm.codes with Huff language support in the playground. Prototype, practice, and learn Huff with real time feedback and interactive debugger.
  • evm.codes The ultimate resource for evm opcodes. The playground will soon have Huff support!
  • evm-puzzles 10 puzzles to get you thinking like an evm.
  • more-evm-puzzles 10 more puzzles!

Huff honorable mentions

awesome-huff's People

Contributors

devtooligan avatar pcaversaccio avatar shafu0x avatar amadimichael avatar philogy avatar praneshasp avatar massun-onibakuchi avatar 0xjcn avatar jameswenzel avatar jesserc avatar marktoda avatar nfurfaro avatar merklefruit avatar nguyenphuminh avatar 0xprinc avatar rareskills avatar rodrigoherrerai avatar 0xpanicerror avatar kopy-kat avatar tkzo 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.