state

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: 6 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 {
	Dir      string // bundle this
	Filename string

	// Name is the name of the contract
	Name string

	// Abi is the abi encoding of the contract
	Abi string `json:"abi"`

	// Bin is the bin bytecode to deploy the contract
	Bin string `json:"bin"`

	// BinRuntime is the deployed bytecode of the contract
	BinRuntime string `json:"bin-runtime"`

	// SrcMap is the source map object for the deployment transaction
	SrcMap string `json:"srcmap"`

	// SrcMapRuntime is the source map object for the deployed contract
	SrcMapRuntime string `json:"srcmap-runtime"`
}

func (*Contract) ABI

func (c *Contract) ABI() *abi.ABI

type Source

type Source struct {
	// Dir is the directory of the file
	Dir string

	// Filename is the name of the file
	Filename string

	// ModTime is the modified time of the source
	ModTime time.Time

	// Tainted signals whether the code has been modified
	Tainted bool

	// Versions are the required version for this source
	Version []string

	// Imports is the list of imports defined in this source
	Imports []string

	// AST is **compiled** ast tree of the solidity code
	AST *solidity.ASTNode
}

func (*Source) Copy

func (s *Source) Copy() *Source

func (*Source) GetLocalImports

func (s *Source) GetLocalImports() (local []string)

func (*Source) GetRemappings

func (s *Source) GetRemappings() (remappings []string)

func (*Source) Path

func (s *Source) Path() string

type State

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

func NewState

func NewState() (*State, error)

func (*State) ListContracts

func (s *State) ListContracts() ([]*Contract, error)

func (*State) ListSources

func (s *State) ListSources() ([]*Source, error)

func (*State) ListTaintedSources

func (s *State) ListTaintedSources() ([]*Source, error)

func (*State) SetTaintedSource

func (s *State) SetTaintedSource(dir, filename string) error

func (*State) UpsertContract

func (s *State) UpsertContract(contract *Contract) error

func (*State) UpsertSource

func (s *State) UpsertSource(src *Source) error

Jump to

Keyboard shortcuts

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