Documentation ¶
Index ¶
- type Client
- func (c *Client) BlockByHash(ctx context.Context, hash common.Hash) (*types.Block, error)
- func (c *Client) BlockByNumber(ctx context.Context, number *big.Int) (*types.Block, error)
- func (c *Client) BlockNumber(ctx context.Context) (hexutil.Uint64, error)
- func (c *Client) Close()
- func (c *Client) NetworkID(ctx context.Context) (*big.Int, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client defines typed wrappers for the Ethereum RPC API.
func (*Client) BlockByHash ¶
BlockByHash returns the given full block.
Note that loading full blocks requires two requests. Use HeaderByHash if you don't need all transactions or uncle headers.
func (*Client) BlockByNumber ¶
BlockByNumber returns a block from the current canonical chain. If number is nil, the latest known block is returned.
Note that loading full blocks requires two requests. Use HeaderByNumber if you don't need all transactions or uncle headers.
func (*Client) BlockNumber ¶
BlockNumber returns the block height.
Click to show internal directories.
Click to hide internal directories.