core

package
v0.0.0-...-23afbe8 Latest Latest
Warning

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

Go to latest
Published: Mar 17, 2022 License: MPL-2.0 Imports: 27 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CompileResult

type CompileResult struct {
	Contracts map[string]*state.Contract
}

type Config

type Config struct {
	Contracts    string
	Solidity     string
	Dependencies map[string]string
}

Config is the greenhouse project configuration

func DefaultConfig

func DefaultConfig() *Config

func LoadConfig

func LoadConfig(path string) (*Config, error)

func (*Config) Merge

func (c *Config) Merge(cc ...*Config) error

type ConsoleOutput

type ConsoleOutput struct {
	Err error
	Val []string
}

type File1

type File1 struct {
	Path    string
	ModTime time.Time
}

func Walk

func Walk(dirPath string) ([]*File1, error)

type FileDiff

type FileDiff struct {
	Path   string
	Type   FileDiffType
	Mod    time.Time
	Source *state.Source
}

func Diff

func Diff(sources []*state.Source, files []*File1) ([]*FileDiff, error)

type FileDiffType

type FileDiffType string
const (
	FileDiffAdd FileDiffType = "add"
	FileDiffDel FileDiffType = "del"
	FileDiffMod FileDiffType = "mod"
)

type Project

type Project struct {
	// contains filtered or unexported fields
}

func NewProject

func NewProject(logger hclog.Logger, config *Config) (*Project, error)

func (*Project) Compile

func (p *Project) Compile() error

Compile compiles the application

func (*Project) Test

func (p *Project) Test(input *TestInput) ([]*TestOutput, error)

type TestInput

type TestInput struct {
	Run string
}

type TestOutput

type TestOutput struct {
	Source   string
	Contract string
	Method   string
	Console  []*ConsoleOutput
	Output   *state.Output
}

Jump to

Keyboard shortcuts

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