codegen

package
v0.0.21 Latest Latest
Warning

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

Go to latest
Published: Apr 5, 2024 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, solversionOverride *string) (string, error)

func GenerateProcessor

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

Types

type BindingsConfig

type BindingsConfig struct {
	Fakes        bool
	FakesVersion *string
	Handlers     HandlersConfig
	Setup        SetupConfig
}

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
	Alias *string
	Type  interface{}
}

type SetupConfig added in v0.0.19

type SetupConfig struct {
	InputTypes []InputType
}

Jump to

Keyboard shortcuts

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