Documentation ¶
Index ¶
- Variables
- func ExtractConfigWithDivider(config, divider string) (string, error)
- func Parse(contracts map[string]*Contract) (map[string]stacktrace.SourceMap, map[string][]byte, error)
- func ParseBytecode(raw string) ([]byte, error)
- func ParseContract(contract *Contract) (stacktrace.SourceMap, error)
- func RandSeq(n int) string
- type ApiContract
- type ApiDeploymentInformation
- type Compiler
- type CompilerSettings
- type Config
- type Contract
- type ContractAst
- type ContractCompiler
- type ContractNetwork
- type ContractSource
- type DeploymentProvider
- type DeploymentProviderName
- type NetworkConfig
- type Node
- type Optimizer
Constants ¶
This section is empty.
Variables ¶
View Source
var AllProviders = []DeploymentProviderName{TruffleDeploymentProvider, OpenZeppelinDeploymentProvider}
Functions ¶
func ParseBytecode ¶
func ParseContract ¶
func ParseContract(contract *Contract) (stacktrace.SourceMap, error)
Types ¶
type ApiContract ¶
type ApiContract struct { ID string `json:"id"` AccountID string `json:"account_id"` ProjectID string `json:"project_id"` NetworkID string `json:"network_id"` Public bool `json:"public"` Address string `json:"address"` Name string `json:"contract_name"` Abi string `json:"abi"` Bytecode string `json:"bytecode"` Source string `json:"source"` SourceMap string `json:"source_map"` CreatedAt time.Time `json:"created_at"` }
type Compiler ¶
type Compiler struct { Version string `json:"version"` Settings *CompilerSettings `json:"settings"` Optimizer *Optimizer `json:"optimizer"` EvmVersion *string `json:"evmVersion"` }
type CompilerSettings ¶
type Config ¶
type Config struct { ProjectDirectory string `json:"project_directory"` BuildDirectory string `json:"contracts_build_directory"` Networks map[string]NetworkConfig `json:"networks"` Solc map[string]Optimizer `json:"solc"` Compilers map[string]Compiler `json:"compilers"` ConfigType string `json:"-"` }
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"` }
func GetContracts ¶
type ContractAst ¶
type ContractCompiler ¶
type ContractNetwork ¶
type ContractSource ¶
type ContractSource struct { Contracts map[string]*stacktrace.ContractDetails Client ethereum.Client }
func (*ContractSource) Get ¶
func (cs *ContractSource) Get(id string) (*stacktrace.ContractDetails, error)
type DeploymentProvider ¶
type DeploymentProvider interface { GetConfig(configName string, configDir string) (*Config, error) MustGetConfig() (*Config, error) CheckIfProviderStructure(directory string) bool NewContractSource(path string, networkId string, client ethereum.Client) (stacktrace.ContractSource, error) GetProviderName() DeploymentProviderName }
type DeploymentProviderName ¶
type DeploymentProviderName string
const ( TruffleDeploymentProvider DeploymentProviderName = "Truffle" OpenZeppelinDeploymentProvider DeploymentProviderName = "OpenZeppelin" )
func (DeploymentProviderName) String ¶ added in v0.8.2
func (d DeploymentProviderName) String() string
type NetworkConfig ¶
Click to show internal directories.
Click to hide internal directories.