Documentation ¶
Index ¶
- Constants
- Variables
- func CheckIfFileDoesNotExist(path string) bool
- func ExtractConfigWithDivider(config, divider string) (string, error)
- func GetGlobalPathForModule(localPath string) string
- 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
- func ValidProviderStructure(baseDirectory string, providerDirectories []string) bool
- type ApiContract
- type ApiDeploymentInformation
- type Compiler
- type CompilerSettings
- type Config
- type Contract
- type ContractAst
- type ContractCompiler
- type ContractNetwork
- type ContractSource
- type ContractSources
- type ContractTag
- type DeploymentProvider
- type DeploymentProviderName
- type NetworkConfig
- type Node
- type OZCompilerSettings
- type OZOptimizer
- type OZProjectData
- type Optimizer
- type OptimizerDetails
- type OzCompilerData
- type Paths
- type YulDetails
Constants ¶
View Source
const ( TruffleDeploymentProvider DeploymentProviderName = "Truffle" OpenZeppelinDeploymentProvider DeploymentProviderName = "OpenZeppelin" BuidlerDeploymentProvider DeploymentProviderName = "Buidler" HardhatDeploymentProvider DeploymentProviderName = "Hardhat" BrownieDeploymentProvider DeploymentProviderName = "Brownie" HardhatConfigFile = "hardhat.config.js" HardhatConfigFileTs = "hardhat.config.ts" BuidlerConfigFile = "buidler.config.js" NewTruffleConfigFile = "truffle-config.js" OldTruffleConfigFile = "truffle.js" OpenzeppelinConfigFile = "networks.js" OpenZeppelinProjectConfigFile = "project.json" BrownieConfigFile = "brownie-config.yaml" )
Variables ¶
Functions ¶
func CheckIfFileDoesNotExist ¶ added in v0.9.0
func GetGlobalPathForModule ¶ added in v0.9.0
func ParseBytecode ¶
func ParseContract ¶
func ParseContract(contract *Contract) (stacktrace.SourceMap, error)
func ValidProviderStructure ¶ added in v1.5.0
ValidProviderStructure validates that the provider directories are present on the file system
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"` Tags []*ContractTag `json:"tags,omitempty"` 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" yaml:"version"` Settings *CompilerSettings `json:"settings" yaml:"settings"` Optimizer *Optimizer `json:"optimizer" yaml:"optimizer"` EvmVersion *string `json:"evmVersion" yaml:"evm_version"` Remappings []string `json:"remappings" yaml:"remappings"` }
type CompilerSettings ¶
type Config ¶
type Config struct { ProjectDirectory string `json:"project_directory" yaml:"project_directory"` BuildDirectory string `json:"contracts_build_directory" yaml:"build_directory"` Networks map[string]NetworkConfig `json:"networks" yaml:"-"` Solc map[string]Optimizer `json:"solc" yaml:"solc"` Compilers map[string]Compiler `json:"compilers" yaml:"compiler"` ConfigType string `json:"-"` Paths Paths `json:"paths" yaml:"paths"` }
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 { Contracts map[string]*stacktrace.ContractDetails Client ethereum.Client }
func (*ContractSource) Get ¶
func (cs *ContractSource) Get(id string) (*stacktrace.ContractDetails, error)
type ContractSources ¶ added in v0.9.0
type ContractSources struct {
Content string `json:"content"`
}
type ContractTag ¶ added in v1.4.0
type DeploymentProvider ¶
type DeploymentProviderName ¶
type DeploymentProviderName string
func (DeploymentProviderName) String ¶ added in v0.8.2
func (d DeploymentProviderName) String() string
type NetworkConfig ¶
type OZCompilerSettings ¶ added in v0.9.1
type OZCompilerSettings struct {
Optimizer *OZOptimizer `json:"optimizer"`
}
type OZOptimizer ¶ added in v0.9.1
type OZProjectData ¶ added in v0.9.1
type OZProjectData struct {
Compiler *OzCompilerData `json:"compiler"`
}
type Optimizer ¶
type Optimizer struct { Enabled *bool `json:"enabled"` Runs *int `json:"runs"` Details *OptimizerDetails `json:"details,omitempty"` }
type OptimizerDetails ¶ added in v1.2.2
type OptimizerDetails struct { Peephole *bool `json:"peephole,omitempty"` JumpdestRemover *bool `json:"jumpdestRemover,omitempty"` OrderLiterals *bool `json:"orderLiterals,omitempty"` Deduplicate *bool `json:"deduplicate,omitempty"` Cse *bool `json:"cse,omitempty"` ConstantOptimizer *bool `json:"constantOptimizer,omitempty"` Yul *bool `json:"yul,omitempty"` Inliner *bool `json:"inliner,omitempty"` YulDetails *YulDetails `json:"yulDetails,omitempty"` }
type OzCompilerData ¶ added in v0.9.1
type OzCompilerData struct { CompilerSettings *OZCompilerSettings `json:"compilerSettings"` Version string `json:"solcVersion"` }
type YulDetails ¶ added in v1.2.2
Click to show internal directories.
Click to hide internal directories.