rpcclient

package
v0.7.1 Latest Latest
Warning

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

Go to latest
Published: Oct 19, 2022 License: AGPL-3.0 Imports: 3 Imported by: 0

Documentation

Index

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 is a lightweight Ethereum RPC client that aims to be compatible with different Ethereum based blockchains.

Unlike the official go-ethereum client, this client does not verify responses from the server. This is necessary because responses from some blockchains (such as Arbitrum) are not compatible with the go-ethereum client, so they do not pass verification.

func New

func New(rpc *rpc.Client) *Client

New returns a new Client instance.

func (*Client) BlockByNumber

func (c *Client) BlockByNumber(ctx context.Context, number types.BlockNumber) (*types.BlockTxHashes, error)

BlockByNumber implements the ethereumv2.Client.

func (*Client) BlockNumber

func (c *Client) BlockNumber(ctx context.Context) (uint64, error)

BlockNumber implements the ethereumv2.Client.

func (*Client) FilterLogs

func (c *Client) FilterLogs(ctx context.Context, q types.FilterLogsQuery) ([]types.Log, error)

FilterLogs implements the ethereumv2.Client.

func (*Client) FullBlockByNumber

func (c *Client) FullBlockByNumber(ctx context.Context, number types.BlockNumber) (*types.BlockTxObjects, error)

FullBlockByNumber implements the ethereumv2.Client.

func (*Client) GetStorageAt

func (c *Client) GetStorageAt(
	ctx context.Context,
	account types.Address,
	key types.Hash,
	block types.BlockNumber) (*types.Hash, error)

GetStorageAt implements the ethereumv2.Client.

func (*Client) GetTransactionCount

func (c *Client) GetTransactionCount(ctx context.Context, acc types.Address, block types.BlockNumber) (uint64, error)

GetTransactionCount implements the ethereumv2.Client.

func (*Client) SendRawTransaction

func (c *Client) SendRawTransaction(ctx context.Context, data types.Bytes) (*types.Hash, error)

SendRawTransaction implements the ethereumv2.Client.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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