Skip to main content
Version: 0.9.1

Generate contract interface bindings

TzGo offers a code generator that produces smart contract interface bindings in native Golang via type descriptions available from the contract interface.

This can be used in a build script. You can find an example of using tzgen with the Hic et Nunc OBJKTs mainnet contract in tzgo/examples/tzgen/main.go.

Example

package main

//go:generate go run -mod=mod github.com/trilitech/tzgo/cmd/tzgen -address <contract address> -pkg <package name> -name <contract name> -out <output path for generated file>