package abigen

import "github.com/ethereum/go-ethereum/accounts/abi/abigen"

Package abigen generates Ethereum contract Go bindings.

Detailed usage document and tutorial available on the go-ethereum Wiki page: https://geth.ethereum.org/docs/developers/dapp-developer/native-bindings

Index

Functions

func Bind

func Bind(types []string, abis []string, bytecodes []string, fsigs []map[string]string, pkg string, libs map[string]string, aliases map[string]string) (string, error)

Bind generates a Go wrapper around a contract ABI. This wrapper isn't meant to be used as is in client code, but rather as an intermediate struct which enforces compile time type safety and naming convention as opposed to having to manually maintain hard coded strings that break on runtime.

func BindV2

func BindV2(types []string, abis []string, bytecodes []string, pkg string, libs map[string]string, aliases map[string]string) (string, error)

BindV2 generates a Go wrapper around a contract ABI. This wrapper isn't meant to be used as is in client code, but rather as an intermediate struct which enforces compile time type safety and naming convention as opposed to having to manually maintain hard coded strings that break on runtime.

Source Files

bind.go bindv2.go template.go

Version
v1.15.11 (latest)
Published
May 5, 2025
Platform
linux/amd64
Imports
13 packages
Last checked
2 days ago

Tools for package owners.