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
- type ApiContract
- type ApiDeploymentInformation
- type Compiler
- type CompilerSettings
- type Config
- type Contract
- type ContractAst
- type ContractCompiler
- type ContractNetwork
- type ContractSource
- type ContractSources
- type DeploymentProvider
- type DeploymentProviderName
- type NetworkConfig
- type Node
- type OZCompilerSettings
- type OZOptimizer
- type OZProjectData
- type Optimizer
- type OzCompilerData
Constants ¶
View Source
const ( TruffleDeploymentProvider DeploymentProviderName = "Truffle" OpenZeppelinDeploymentProvider DeploymentProviderName = "OpenZeppelin" BuidlerDeploymentProvider DeploymentProviderName = "Buidler" HardhatDeploymentProvider DeploymentProviderName = "Hardhat" 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" )
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)
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"` }
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 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 GetContracts(buildDir string, networkIDs []string, objects ...*model.StateObject) ([]Contract, int, error) }
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 OzCompilerData ¶ added in v0.9.1
type OzCompilerData struct { CompilerSettings *OZCompilerSettings `json:"compilerSettings"` Version string `json:"solcVersion"` }
Click to show internal directories.
Click to hide internal directories.