gethwrappers

package
v1.7.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 22, 2022 License: MIT Imports: 23 Imported by: 0

Documentation

Overview

Package gethwrappers provides infrastructure for generating and verifying go-ethereum wrapper packages for smart contracts. See go_generate.go for more information.

Package gethwrappers provides tools for wrapping solidity contracts with golang packages, using abigen.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Abigen added in v0.8.7

func Abigen(a AbigenArgs)

Abigen calls Abigen with the given arguments

It might seem like a shame, to shell out to another golang program like this, but the abigen executable is the stable public interface to the geth contract-wrapper machinery.

Check whether native abigen is installed, and has correct version

func DeepCopyLog added in v0.10.11

func DeepCopyLog(l types.Log) types.Log

func Exit added in v0.8.7

func Exit(msg string, err error)

func GetProjectRoot added in v0.8.7

func GetProjectRoot() (rootPath string)

GetProjectRoot returns the root of the chainlink project

func ImproveAbigenOutput added in v0.9.10

func ImproveAbigenOutput(path string, abiPath string)

func TempDir added in v0.8.7

func TempDir(dirPrefix string) (string, func())

func VersionHash added in v0.10.5

func VersionHash(abiPath string, binPath string) (hash string)

VersionHash is the hash used to detect changes in the underlying contract

func WriteVersionsDB

func WriteVersionsDB(db *IntegratedVersion) (err error)

Types

type AbigenArgs added in v0.8.7

type AbigenArgs struct {
	Bin, ABI, Out, Type, Pkg string
}

AbigenArgs is the arguments to the abigen executable. E.g., Bin is the -bin arg.

type ContractVersion

type ContractVersion struct {
	// Hash of the artifact at the timem the wrapper was last generated
	Hash string
	// Path to compiled abi file
	AbiPath string
	// Path to compiled bin file (if exists, this can be empty)
	BinaryPath string
}

ContractVersion records information about the solidity compiler artifact a golang contract wrapper package depends on.

type IntegratedVersion

type IntegratedVersion struct {
	// Version of geth last used to generate the wrappers
	GethVersion string
	// { golang-pkg-name: version_info }
	ContractVersions map[string]ContractVersion
}

IntegratedVersion carries the full versioning information checked in this test

func ReadVersionsDB

func ReadVersionsDB() (*IntegratedVersion, error)

readVersionsDB populates an IntegratedVersion with all the info in the versions DB

Directories

Path Synopsis
generation
Package gethwrappers provides tools for wrapping solidity contracts with golang packages, using abigen.
Package gethwrappers provides tools for wrapping solidity contracts with golang packages, using abigen.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL