repositorypackage
0.6.0
Repository: https://github.com/sprintertech/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 thehnc
binary to be installed. See the huff-neo repository for installation instructions.
go get github.com/sprintertech/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.