Huff (programming language)

Find resources about other languages in the Programming Languages Reference List.

Huff is an extremely low-level language for writing smart contracts. It compiles to EVM bytecode, so it functions on all blockchains that run an EVM. It is designed to make extremely gas-efficient smart contracts, at the cost of user-readability and developer sanity. It is similar to solidity assembly, with the notable distinction that it uses "macros", which can be easily tested on their own. It was developed by the AZTEC protocol team while writing their Weierstrudel smart contract.

Source Code Repository

Example Code

Guides

Video Introduction

3 Likes

:heart: the Huff guide:

Huff is also a game, played on a chess-board. One player has chess pieces, the other draughts pieces. The rules don’t make any sense, the game is deliberately confusing and it is an almost mathematical certainty that the draughts player will lose. You won’t find references to this game online because it was “invented” in a pub by some colleagues of mine in a past career and promptly forgotten about for being a terrible game.

I found that writing Huff macros invoked similar emotions to playing Huff, hence the name.

1 Like

Fully agree! Even if you don't plan to learn huff, reading the guides has some pretty great entertainment value

1 Like