repositorypackage
0.4.0
Repository: https://github.com/project-blanc/go-huffc.git
Documentation: pkg.go.dev
# README
go-huffc
: Go Bindings for the Huff Compiler
go-huffc
provides an easy way to compile Huff contracts from Go.
[!NOTE]
go-huffc
requires thehuffc
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.