Documentation ¶
Index ¶
- type EtherScan
- func (etherScan *EtherScan) BalanceAt(ctx context.Context, account common.Address, blockNumber *big.Int) (*big.Int, error)
- func (etherScan *EtherScan) CallContract(ctx context.Context, msg ethereum.CallMsg, blockNumber *big.Int) ([]byte, error)
- func (etherScan *EtherScan) CodeAt(ctx context.Context, account common.Address, blockNumber *big.Int) ([]byte, error)
- func (etherScan *EtherScan) EstimateGas(ctx context.Context, msg ethereum.CallMsg) (uint64, error)
- func (etherScan *EtherScan) FilterLogs(ctx context.Context, q ethereum.FilterQuery) ([]types.Log, error)
- func (etherScan *EtherScan) HeaderByNumber(ctx context.Context, number *big.Int) (*types.Header, error)
- func (etherScan *EtherScan) PendingCodeAt(ctx context.Context, account common.Address) ([]byte, error)
- func (etherScan *EtherScan) PendingNonceAt(ctx context.Context, account common.Address) (uint64, error)
- func (etherScan *EtherScan) SendTransaction(ctx context.Context, tx *types.Transaction) error
- func (etherScan *EtherScan) SubscribeFilterLogs(ctx context.Context, q ethereum.FilterQuery, ch chan<- types.Log) (ethereum.Subscription, error)
- func (etherScan *EtherScan) SuggestGasPrice(ctx context.Context) (*big.Int, error)
- func (etherScan *EtherScan) TransactionReceiptWithBlockNumber(ctx context.Context, hash common.Hash) (*rpcclient.RPCTransactionReceipt, error)
- func (etherScan *EtherScan) Transactions(address common.Address, endBlock *big.Int, erc20Token *erc20.Token) ([]accounts.Transaction, error)
- type Transaction
- func (tx *Transaction) Addresses() []accounts.AddressAndAmount
- func (tx *Transaction) Amount() coin.Amount
- func (tx *Transaction) Fee() *coin.Amount
- func (tx *Transaction) Gas() uint64
- func (tx *Transaction) ID() string
- func (tx *Transaction) NumConfirmations() int
- func (tx *Transaction) Status() accounts.TxStatus
- func (tx *Transaction) Timestamp() *time.Time
- func (tx *Transaction) Type() accounts.TxType
- func (tx *Transaction) UnmarshalJSON(jsonBytes []byte) error
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 ¶
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 ¶
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 ¶
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 ¶
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) 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.