codegen

package
v0.0.12 Latest Latest
Warning

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

Go to latest
Published: Mar 7, 2022 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

View Source
const (
	SolidityBase  = "https://github.com/ethereum/solidity/releases/download/"
	SolidityLinux = "solc-static-linux"
	SolidityMacos = "solc-macos"
)

Variables

View Source
var ErrNoEvents = errors.New("no events")

Functions

func GenerateBindings

func GenerateBindings(path string, outdir string, config *BindingsConfig) error

func GenerateFake

func GenerateFake(typ string, cABI string, pkg string) (string, error)

func GenerateProcessor

func GenerateProcessor(types []string, abis []string, pkg string, inputs []InputType) (string, error)

Types

type BindingsConfig

type BindingsConfig struct {
	Fakes    bool
	Handlers HandlersConfig
}

type ContractMetadata

type ContractMetadata struct {
	ABIs  []string
	Bins  []string
	Types []string
	Sigs  []map[string]string
	Libs  map[string]string
}

func ParseContract

func ParseContract(src string) (ContractMetadata, error)

type HandlersConfig

type HandlersConfig struct {
	Generate   bool
	InputTypes []InputType
}

type InputType

type InputType struct {
	Name string
	Type interface{}
}

Jump to

Keyboard shortcuts

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