explorer

package
v0.0.0-...-de788f2 Latest Latest
Warning

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

Go to latest
Published: Mar 25, 2024 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ChecksumAddress

func ChecksumAddress(address string) string

ChecksumAddress Convert address into checksum address

Types

type AddressInfo

type AddressInfo struct {
	Address        string `json:"address"`
	Contract       string `json:"contract"`
	Implementation string `json:"implementation"`
	Chain          string `json:"chain"`
}

type ApiResponse

type ApiResponse struct {
	Status  string      `json:"status"`
	Message string      `json:"message"`
	Results interface{} `json:"result"`
}

type ContractFile

type ContractFile struct {
	Name    string
	Content string
}

type ContractInfo

type ContractInfo struct {
	SourceCode           string `json:"SourceCode"`
	ABI                  string `json:"ABI"`
	ContractName         string `json:"ContractName"`
	CompilerVersion      string `json:"CompilerVersion"`
	OptimizationUsed     string `json:"OptimizationUsed"`
	Runs                 string `json:"Runs"`
	ConstructorArguments string `json:"ConstructorArguments"`
	EVMVersion           string `json:"EVMVersion"`
	Library              string `json:"Library"`
	LicenseType          string `json:"LicenseType"`
	Proxy                string `json:"Proxy"`
	Implementation       string `json:"Implementation"`
	SwarmSource          string `json:"SwarmSource"`
}

type Explorer

type Explorer struct {
	Chain            string `yaml:"chain"`
	ApiGetSourceCode string `yaml:"apiGetSourceCode"`
	ApiKey           string `yaml:"apiKey"`
}

func New

func New(explorerName string) (*Explorer, error)

func (*Explorer) GetSourceCode

func (e *Explorer) GetSourceCode(address string, proxyDepth int) ([]AddressInfo, []ContractFile, error)

type SourceCodeInfo

type SourceCodeInfo struct {
	Language string                       `json:"language"`
	Sources  map[string]map[string]string `json:"sources"`
	Settings map[string]interface{}       `json:"settings"`
}

Jump to

Keyboard shortcuts

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