Skip to content

Latest commit

 

History

History
35 lines (24 loc) · 1.21 KB

README.md

File metadata and controls

35 lines (24 loc) · 1.21 KB

go-huffc: Go Bindings for the Huff Compiler

Go Reference Go Report Card

go-huffc provides an easy way to compile Huff contracts from Go.

Note

go-huffc requires the huffc binary to be installed. See huff.sh for installation instructions.

go get github.com/project-blanc/go-huffc

Getting Started

// Compile a contract with default compiler settings
c := huffc.New()
contract, err := c.Compile("contract.huff", nil)

// Compile a contract with custom compiler settings
c := huffc.New()
contract, err := c.Compile("contract.huff", &huffc.Options{
    EVMVersion: huffc.EVMVersionIstanbul,
})

Example Project

See the example project for a basic reference on how to test and fuzz a Huff contract in Go.

Warning

This package is pre-1.0. There might be breaking changes between minor versions.