contracts

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Nov 9, 2021 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ContractInfo

type ContractInfo struct {
	SourceCode           string `etherscan:"SourceCode"`
	ABI                  string `etherscan:"ABI"`
	ContractName         string `etherscan:"ContractName"`
	CompilerVersion      string `etherscan:"CompilerVersion"`
	OptimizationUsed     string `etherscan:"OptimizationUsed"`
	Runs                 uint32 `etherscan:"Runs"`
	ConstructorArguments string `etherscan:"ConstructorArguments"`
	EVMVersion           string `etherscan:"EVMVersion"`
	Library              string `etherscan:"Library"`
	LicenseType          string `etherscan:"LicenseType"`
	Proxy                bool   `etherscan:"Proxy,num"`
	Implementation       string `etherscan:"Implementation"`
	SwarmSource          string `etherscan:"SwarmSource"`
}

ContractInfo contains information on a contract's source code.

type ContractsClient

type ContractsClient struct {
	API *httpapi.APIClient
}

ContractsClient is the client for contracts actions.

func (ContractsClient) GetContractABI

func (c ContractsClient) GetContractABI(
	ctx context.Context, address common.Address,
) (result string, err error)

GetContractABI returns the contract ABI as a JSON string.

func (ContractsClient) GetContractSourceCode

func (c ContractsClient) GetContractSourceCode(
	ctx context.Context, address common.Address,
) (result []ContractInfo, err error)

GetContractSourceCode returns the Solidity source code of a verified smart contract.

Jump to

Keyboard shortcuts

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