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
// 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,
})
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.