nguyenphuminh / awesome-huff

A curated list of resources for Huff language

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

awesome-huff

A curated list of resources for Huff language.

                          ,....,
                        ,::::::<
                      ,::/^\"``.
                      ,::/, `   e`.
                     ,::; |        '.
                     ,::|  \___,-.  c)
                    ;::|     \   '-'
                    ;::|      \
                    ;::|   _.=`\
                     `;:|.=` _.=`\
                      '|_.=`   __\
                       `\_..==`` /
                        .'.___.-'.
                       /          \
                     ('--......--')
                      /'--......--'\
                     `"--......--"`

        _____ _ _ _ _____  ___  ___  ____  _____
        (____ | | | | ___ |/___)/ _ \|    \| ____)
        / ___ | | | | ____|___ | |_| | | | | ____|
        \_____|\___/|_____|___/ \___/|_|_|_|_____)

                 _              ___    ___
                | |            / __)  / __)
                | |__  _   _ _| |__ _| |__
                |  _ \| | | (_   __|_   __)
                | | | | |_| | | |    | |
                |_| |_|____/  |_|    |_|

18-Jul-22 -- HUFF-DOCS is now LIVE! -- Start with the official docs for setup, usage, and tutorials at https://docs.huff.sh/

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 NEW! Sites up! 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?

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.
  • hufflime A Sublime Text package for Huff syntax highlighting.
  • huff-examples Currently has wip versions of ERC20 and ERC721.
  • huff-breakage Incorrect, Breaking, and Footgunned Huff Contracts. You'll learn a lot about Huff by reading what not to do in this excellent resource by @asnared.
  • 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 articles

Huff projects you can learn from and contribute to

  • huff-clones Rewrite of clones-with-immutable-args in Huff.
  • TSOwnable-huff An Ownable Implementation using Two-Step Transfer Pattern written by @merkleplant_eth.
  • Solmate ERC20 The only ERC20 implemented on Huff fully complete with all functionality (includes EIP-2612 Permit) and passing all Solmate tests.
  • huff-learning Some math and other functions implemented in Huff.
  • huff-tools A WIP set of tools for use with the huff language. Contains useful SafeMath functions.
  • 8-bit-array An implementation of an array in huff. It can store up to 32 8-bit values in a single storage slot.
  • proxies A few Ethereum delegate-call proxies written in raw bytecode via Huff.
  • huff-pg An ERC20 implementation with SafeMath.

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!

**ASCII art of knight used in title by Joan Stark (jgs)

About

A curated list of resources for Huff language