etherscan

package
v4.14.1+incompatible Latest Latest
Warning

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

Go to latest
Published: Oct 30, 2019 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type EtherScan

type EtherScan struct {
	// contains filtered or unexported fields
}

EtherScan is a rate-limited etherscan api client. See https://etherscan.io/apis.

func NewEtherScan

func NewEtherScan(url string, socksProxy socksproxy.SocksProxy) *EtherScan

NewEtherScan creates a new instance of EtherScan.

func (*EtherScan) BalanceAt

func (etherScan *EtherScan) BalanceAt(ctx context.Context, account common.Address, blockNumber *big.Int) (*big.Int, error)

BalanceAt implements rpc.Interface

func (*EtherScan) CallContract

func (etherScan *EtherScan) CallContract(ctx context.Context, msg ethereum.CallMsg, blockNumber *big.Int) ([]byte, error)

CallContract implements rpc.Interface

func (*EtherScan) CodeAt

func (etherScan *EtherScan) CodeAt(ctx context.Context, account common.Address, blockNumber *big.Int) ([]byte, error)

CodeAt implements rpc.Interface

func (*EtherScan) EstimateGas

func (etherScan *EtherScan) EstimateGas(ctx context.Context, msg ethereum.CallMsg) (uint64, error)

EstimateGas implements rpc.Interface

func (*EtherScan) FilterLogs

func (etherScan *EtherScan) FilterLogs(ctx context.Context, q ethereum.FilterQuery) ([]types.Log, error)

FilterLogs implements rpc.Interface

func (*EtherScan) HeaderByNumber

func (etherScan *EtherScan) HeaderByNumber(ctx context.Context, number *big.Int) (*types.Header, error)

HeaderByNumber implements rpc.Interface

func (*EtherScan) PendingCodeAt

func (etherScan *EtherScan) PendingCodeAt(ctx context.Context, account common.Address) ([]byte, error)

PendingCodeAt implements rpc.Interface

func (*EtherScan) PendingNonceAt

func (etherScan *EtherScan) PendingNonceAt(ctx context.Context, account common.Address) (uint64, error)

PendingNonceAt implements rpc.Interface

func (*EtherScan) SendTransaction

func (etherScan *EtherScan) SendTransaction(ctx context.Context, tx *types.Transaction) error

SendTransaction implements rpc.Interface

func (*EtherScan) SubscribeFilterLogs

func (etherScan *EtherScan) SubscribeFilterLogs(ctx context.Context, q ethereum.FilterQuery, ch chan<- types.Log) (ethereum.Subscription, error)

SubscribeFilterLogs implements rpc.Interface

func (*EtherScan) SuggestGasPrice

func (etherScan *EtherScan) SuggestGasPrice(ctx context.Context) (*big.Int, error)

SuggestGasPrice implements rpc.Interface

func (*EtherScan) TransactionReceiptWithBlockNumber

func (etherScan *EtherScan) TransactionReceiptWithBlockNumber(
	ctx context.Context, hash common.Hash) (*rpcclient.RPCTransactionReceipt, error)

TransactionReceiptWithBlockNumber implements rpc.Interface

func (*EtherScan) Transactions

func (etherScan *EtherScan) Transactions(
	address common.Address, endBlock *big.Int, erc20Token *erc20.Token) (
	[]accounts.Transaction, error)

Transactions queries EtherScan for transactions for the given account, until endBlock. Provide erc20Token to filter for those. If nil, standard etheruem transactions will be fetched.

type Transaction

type Transaction struct {
	// contains filtered or unexported fields
}

Transaction implemements accounts.Transaction (TODO).

func (*Transaction) Addresses

func (tx *Transaction) Addresses() []accounts.AddressAndAmount

Addresses implements accounts.Transaction.

func (*Transaction) Amount

func (tx *Transaction) Amount() coin.Amount

Amount implements accounts.Transaction.

func (*Transaction) Fee

func (tx *Transaction) Fee() *coin.Amount

Fee implements accounts.Transaction.

func (*Transaction) Gas

func (tx *Transaction) Gas() uint64

Gas implements ethtypes.EthereumTransaction.

func (*Transaction) ID

func (tx *Transaction) ID() string

ID implements accounts.Transaction.

func (*Transaction) NumConfirmations

func (tx *Transaction) NumConfirmations() int

NumConfirmations implements accounts.Transaction.

func (*Transaction) Status

func (tx *Transaction) Status() accounts.TxStatus

Status implements accounts.Transaction.

func (*Transaction) Timestamp

func (tx *Transaction) Timestamp() *time.Time

Timestamp implements accounts.Transaction.

func (*Transaction) Type

func (tx *Transaction) Type() accounts.TxType

Type implements accounts.Transaction.

func (*Transaction) UnmarshalJSON

func (tx *Transaction) UnmarshalJSON(jsonBytes []byte) error

UnmarshalJSON implements json.Unmarshaler.

Jump to

Keyboard shortcuts

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