New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

huff-language

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

huff-language

A compiler for Huff, a low-level programming language for the Ethereum Virtual Machine

  • 0.0.2
  • unpublished
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
0
Maintainers
1
Weekly downloads
 
Created
Source

Huff: a low level programming language for the Ethereum Virtual Machine

Huff is a domain-specific programming language created for the purpose of writing highly optimized code for the Ethereum Virtual Machine. It enables the construction of EVM assembly "macros" - individual blocks of bytecode that can be rigorously tested and evaluated.

Huff barely hides the inner-workings of the EVM behind syntactic sugar. Rather than having variables, Huff directly exposes the EVM's program stack to the developer to be manually manipulated.

"That sounds terrible! Why learn Huff?"

Huff was orginally developed by Aztec Protocol to create Weierstrudel, an elliptic curve arithmetic library that required extremely optimized code.

Huff is designed for developing extremely optimized smart contract code, where the direct manipulation of the program's bytecode is preferred. Using the Huff runtime testing suite, Huff macros can be rigorously tested without having to split the program into functions and invoke jump instructions.

Beyond writing performant code, learning Huff can help you learn all about the Ethereum Virtual Machine as well as develop your understanding of other EVM programming languages like Solidity and Vyper.

"Where can I find example Huff code?"

ERC20, the ERC20 token standard written entirely in Huff.

Minisig.huff is a minimal multisignature wallet written in Huff.

EVM-Hypervisor is an EVM emulator, allowing you to execute the logic of another contract without using DELEGATECALL.

Proxies.huff, a collection of different Huff proxy implementations.

weierstrudel is an elliptic curve arithmetic library written entirely in Huff, with its contract code totalling over 14kb.

Keywords

FAQs

Package last updated on 29 Jul 2021

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc