truffle

package
v0.1.6 Latest Latest
Warning

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

Go to latest
Published: Dec 14, 2018 License: GPL-3.0 Imports: 17 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckIfTruffleStructure added in v0.1.6

func CheckIfTruffleStructure(directory string) bool

func FindTruffleDirectories added in v0.1.6

func FindTruffleDirectories() []string

func NewContract

func NewContract(truffleContract Contract) (*stacktrace.Contract, error)

func NewContractSource

func NewContractSource(path string, networkId string, client client.Client) (stacktrace.ContractSource, error)

NewContractSource builds the Contract Source from the provided config, and scoped to the provided network.

func Parse

func Parse(contracts map[string]*Contract) (map[string]stacktrace.SourceMap, map[string][]byte, error)

func ParseContract

func ParseContract(contract *Contract) (stacktrace.SourceMap, error)

Types

type Config

type Config struct {
	ProjectDirectory string                   `json:"project_directory"`
	BuildDirectory   string                   `json:"contracts_build_directory"`
	Networks         map[string]NetworkConfig `json:"networks"`
}

func (*Config) AbsoluteBuildDirectoryPath

func (c *Config) AbsoluteBuildDirectoryPath() string

type Contract

type Contract struct {
	Name              string                     `json:"contractName"`
	Abi               interface{}                `json:"abi"`
	Bytecode          string                     `json:"bytecode"`
	DeployedBytecode  string                     `json:"deployedBytecode"`
	SourceMap         string                     `json:"sourceMap"`
	DeployedSourceMap string                     `json:"deployedSourceMap"`
	Source            string                     `json:"source"`
	SourcePath        string                     `json:"sourcePath"`
	Ast               ContractAst                `json:"legacyAST"`
	Compiler          ContractCompiler           `json:"compiler"`
	Networks          map[string]ContractNetwork `json:"networks"`

	SchemaVersion string    `json:"schemaVersion"`
	UpdatedAt     time.Time `json:"updatedAt"`
}

type ContractAst

type ContractAst struct {
	AbsolutePath    string           `json:"absolutePath"`
	ExportedSymbols map[string][]int `json:"exportedSymbols"`
	Id              int              `json:"id"`
	NodeType        string           `json:"nodeType"`
	Nodes           interface{}      `json:"nodes"`
	Src             string           `json:"src"`
}

type ContractCompiler

type ContractCompiler struct {
	Name    string `json:"name"`
	Version string `json:"version"`
}

type ContractNetwork

type ContractNetwork struct {
	Events          interface{} `json:"events"`
	Links           interface{} `json:"links"`
	Address         string      `json:"address"`
	TransactionHash string      `json:"transactionHash"`
}

type ContractSource

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

func (*ContractSource) Get

type NetworkConfig

type NetworkConfig struct {
	Host      string      `json:"host"`
	Port      int         `json:"port"`
	NetworkID interface{} `json:"network_id"`
}

Jump to

Keyboard shortcuts

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