Documentation
¶
Index ¶
- func NewContract(truffleContract Contract) (*stacktrace.Contract, error)
- func NewContractSource(config *Config, networkId string, client client.Client) (stacktrace.ContractSource, error)
- func Parse(contracts map[string]*Contract) (map[string]stacktrace.SourceMap, map[string][]byte, error)
- func ParseContract(contract *Contract) (stacktrace.SourceMap, error)
- type Config
- type Contract
- type ContractAst
- type ContractCompiler
- type ContractNetwork
- type ContractSource
- type NetworkConfig
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewContract ¶
func NewContract(truffleContract Contract) (*stacktrace.Contract, error)
func NewContractSource ¶
func NewContractSource(config *Config, networkId string, client client.Client) (stacktrace.ContractSource, error)
NewContractSource builds the Contract Source from the provided config, and scoped to the provided network.
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 ¶
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 ContractCompiler ¶
type ContractNetwork ¶
type ContractSource ¶
type ContractSource struct {
// contains filtered or unexported fields
}
func (*ContractSource) Get ¶
func (cs *ContractSource) Get(id string) (*stacktrace.ContractDetails, error)
type NetworkConfig ¶
Click to show internal directories.
Click to hide internal directories.