Documentation ¶
Index ¶
- type EtherscanClient
- func (c *EtherscanClient) GetSmartContractData(ctx context.Context, hexAddress string) (*SmartContractData, error)
- func (c *EtherscanClient) GetSourcecode(ctx context.Context, hexAddress string) (*EtherscanGetSourcecodeResponse, string, error)
- func (c *EtherscanClient) GetTxlist(ctx context.Context, hexAddress string) (*EtherscanGetTxlistResponse, error)
- type EtherscanGetSourcecodeResponse
- type EtherscanGetTxlistResponse
- type SmartContractData
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type EtherscanClient ¶
type EtherscanClient struct {
// contains filtered or unexported fields
}
func NewEtherscanClient ¶
func NewEtherscanClient( ethNetwork types.ETHNetwork, apikey string, ) (*EtherscanClient, error)
func (*EtherscanClient) GetSmartContractData ¶
func (c *EtherscanClient) GetSmartContractData( ctx context.Context, hexAddress string, ) (*SmartContractData, error)
func (*EtherscanClient) GetSourcecode ¶
func (c *EtherscanClient) GetSourcecode(ctx context.Context, hexAddress string) (*EtherscanGetSourcecodeResponse, string, error)
func (*EtherscanClient) GetTxlist ¶
func (c *EtherscanClient) GetTxlist(ctx context.Context, hexAddress string) (*EtherscanGetTxlistResponse, error)
type EtherscanGetSourcecodeResponse ¶
type EtherscanGetSourcecodeResponse struct { Status string `json:"status"` Message string `json:"message"` Result []struct { SourceCode string `json:"SourceCode"` ABI string `json:"ABI"` ContractName string `json:"ContractName"` CompilerVersion string `json:"CompilerVersion"` ConstructorArguments string `json:"ConstructorArguments"` } `json:"result"` }
API: contract -> getsourcecode
type EtherscanGetTxlistResponse ¶
type EtherscanGetTxlistResponse struct { Status string `json:"status"` Message string `json:"message"` Result []struct { Input string `json:"input"` } `json:"result"` }
API: account -> txlist
Click to show internal directories.
Click to hide internal directories.