Documentation ¶
Index ¶
- Variables
- type Client
- func (c *Client) CallContract(ctx context.Context, call ethereum.CallMsg, blockNumber *big.Int) ([]byte, error)
- func (c *Client) CodeAt(ctx context.Context, contract common.Address, blockNumber *big.Int) ([]byte, error)
- func (c *Client) EstimateGas(ctx context.Context, call ethereum.CallMsg) (gas uint64, err error)
- func (c *Client) FilterLogs(ctx context.Context, query ethereum.FilterQuery) ([]types.Log, error)
- func (c *Client) GetPendingTxReceipt(ctx context.Context, tx *types.Transaction) (*types.Receipt, error)
- func (c *Client) HeaderByNumber(ctx context.Context, number *big.Int) (*types.Header, error)
- func (c *Client) PendingCodeAt(ctx context.Context, account common.Address) ([]byte, error)
- func (c *Client) PendingNonceAt(ctx context.Context, account common.Address) (uint64, error)
- func (c *Client) SendTransaction(ctx context.Context, tx *types.Transaction) error
- func (c *Client) SubscribeFilterLogs(ctx context.Context, query ethereum.FilterQuery, ch chan<- types.Log) (ethereum.Subscription, error)
- func (c *Client) SubscribeNewHead(ctx context.Context, ch chan<- *types.Header) (ethereum.Subscription, error)
- func (c *Client) SuggestGasPrice(ctx context.Context) (*big.Int, error)
- func (c *Client) SuggestGasTipCap(ctx context.Context) (*big.Int, error)
- func (c *Client) TransactionByHash(ctx context.Context, hash common.Hash) (tx *types.Transaction, isPending bool, err error)
- func (c *Client) TransactionReceipt(ctx context.Context, txHash common.Hash) (*types.Receipt, error)
Constants ¶
This section is empty.
Variables ¶
var ( ErrTimeout = errors.New("timed out of attempts") ErrReceiptStatus = errors.New("the receipt has a status of 0") )
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
An ethereum client that implements the ContractBackend interface https://pkg.go.dev/github.com/ethereum/go-ethereum@v1.10.12/accounts/abi/bind#ContractBackend and reconnects automatically on failure
func (*Client) CallContract ¶
func (c *Client) CallContract(ctx context.Context, call ethereum.CallMsg, blockNumber *big.Int) ([]byte, error)
Implements the ContractCaller interface https://pkg.go.dev/github.com/ethereum/go-ethereum@v1.10.12/accounts/abi/bind#ContractCaller
func (*Client) CodeAt ¶
func (c *Client) CodeAt(ctx context.Context, contract common.Address, blockNumber *big.Int) ([]byte, error)
Implements the ContractCaller interface https://pkg.go.dev/github.com/ethereum/go-ethereum@v1.10.12/accounts/abi/bind#ContractCaller
func (*Client) EstimateGas ¶
Implements the ContractTransactor interface https://pkg.go.dev/github.com/ethereum/go-ethereum@v1.10.12/accounts/abi/bind#ContractTransactor
func (*Client) FilterLogs ¶
Implements the ContractFilterer interface https://pkg.go.dev/github.com/ethereum/go-ethereum@v1.10.12/accounts/abi/bind#ContractFilterer
func (*Client) GetPendingTxReceipt ¶
func (c *Client) GetPendingTxReceipt(ctx context.Context, tx *types.Transaction) (*types.Receipt, error)
Blocks until the transaction is mined and returns it's receipt. It returns an error if the receipt status is 0
func (*Client) HeaderByNumber ¶
Implements the ContractTransactor interface https://pkg.go.dev/github.com/ethereum/go-ethereum@v1.10.12/accounts/abi/bind#ContractTransactor
func (*Client) PendingCodeAt ¶
Implements the ContractTransactor interface https://pkg.go.dev/github.com/ethereum/go-ethereum@v1.10.12/accounts/abi/bind#ContractTransactor
func (*Client) PendingNonceAt ¶
Implements the ContractTransactor interface https://pkg.go.dev/github.com/ethereum/go-ethereum@v1.10.12/accounts/abi/bind#ContractTransactor
func (*Client) SendTransaction ¶
Implements the ContractTransactor interface https://pkg.go.dev/github.com/ethereum/go-ethereum@v1.10.12/accounts/abi/bind#ContractTransactor
func (*Client) SubscribeFilterLogs ¶
func (c *Client) SubscribeFilterLogs(ctx context.Context, query ethereum.FilterQuery, ch chan<- types.Log) (ethereum.Subscription, error)
Implements the ContractFilterer interface https://pkg.go.dev/github.com/ethereum/go-ethereum@v1.10.12/accounts/abi/bind#ContractFilterer
func (*Client) SubscribeNewHead ¶
func (*Client) SuggestGasPrice ¶
Implements the ContractTransactor interface https://pkg.go.dev/github.com/ethereum/go-ethereum@v1.10.12/accounts/abi/bind#ContractTransactor
func (*Client) SuggestGasTipCap ¶
Implements the ContractTransactor interface https://pkg.go.dev/github.com/ethereum/go-ethereum@v1.10.12/accounts/abi/bind#ContractTransactor