merklefruit / awesome-huff

A curated list of resources for Huff language

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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

  • Huff landing page The landing page for all things Huff. Here you can find links to Github, Twitter, and huff-docs.
  • The Huff Docs โžธ START HERE โžธ Here you'll find installation guides, reference, tutorials and everything you need to know about Huff. What are you waiting for, anon?
  • Huff GitHub List A curated Github list of Huff language resources, libraries, tools, and more by @pcaversaccio.

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.
  • 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 articles

Huff videos

Advanced EVM articles

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

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

About

A curated list of resources for Huff language