Help us shape the future of Go! Take the 2026 Go Developer Survey

contracts

package
v0.17.0 Latest Latest
Warning

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

Go to latest
Published: Apr 7, 2021 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Contract

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

func (*Contract) Code

func (c *Contract) Code() string

func (*Contract) Dependencies

func (c *Contract) Dependencies() map[string]*Contract

func (*Contract) ID

func (c *Contract) ID() int64

func (*Contract) Name

func (c *Contract) Name() string

func (*Contract) Target

func (c *Contract) Target() flow.Address

func (*Contract) TranspiledCode

func (c *Contract) TranspiledCode() string

type CyclicImportError

type CyclicImportError struct {
	Cycles [][]*Contract
}

func (*CyclicImportError) Error

func (e *CyclicImportError) Error() string

type FilesystemLoader

type FilesystemLoader struct{}

func (FilesystemLoader) Load

func (f FilesystemLoader) Load(source string) (string, error)

func (FilesystemLoader) Normalize

func (f FilesystemLoader) Normalize(base, relative string) string

type Loader

type Loader interface {
	Load(source string) (string, error)
	Normalize(base, relative string) string
}

type Preprocessor

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

func NewPreprocessor

func NewPreprocessor(loader Loader, aliases map[string]string) *Preprocessor

func (*Preprocessor) AddContractSource

func (p *Preprocessor) AddContractSource(
	contractName,
	contractSource string,
	target flow.Address,
) error

func (*Preprocessor) ContractBySource

func (p *Preprocessor) ContractBySource(contractSource string) *Contract

func (*Preprocessor) ContractDeploymentOrder

func (p *Preprocessor) ContractDeploymentOrder() ([]*Contract, error)

func (*Preprocessor) ResolveImports

func (p *Preprocessor) ResolveImports() error

Jump to

Keyboard shortcuts

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