jsonrpc

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Nov 16, 2021 License: Apache-2.0 Imports: 13 Imported by: 5

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New(ctx context.Context, params ...Parameter) (execclient.Service, error)

New creates a new execution client service, connecting with a standard HTTP.

Types

type Parameter

type Parameter interface {
	// contains filtered or unexported methods
}

Parameter is the interface for service parameters.

func WithAddress

func WithAddress(address string) Parameter

WithAddress provides the address for the endpoint.

func WithLogLevel

func WithLogLevel(logLevel zerolog.Level) Parameter

WithLogLevel sets the log level for the module.

func WithTimeout

func WithTimeout(timeout time.Duration) Parameter

WithTimeout sets the maximum duration for all requests to the endpoint.

type Service

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

Service is an Ethereum execution client service.

func (*Service) Address

func (s *Service) Address() string

Address provides the address for the connection.

func (*Service) Block

func (s *Service) Block(ctx context.Context, blockID string) (*spec.Block, error)

Block returns the block given an ID

func (*Service) ChainHeight

func (s *Service) ChainHeight(ctx context.Context) (uint32, error)

ChainHeight returns the height of the chain as understood by the node.

func (*Service) Name

func (s *Service) Name() string

Name provides the name of the service.

func (*Service) NetworkID

func (s *Service) NetworkID(ctx context.Context) (uint64, error)

NetworkID returns the network ID of the node.

func (*Service) ReplayBlockTransactions

func (s *Service) ReplayBlockTransactions(ctx context.Context, blockID string) ([]*api.TransactionResult, error)

ReplayBlockTransactions obtains traces for all transactions in a block.

func (*Service) TransactionReceipt

func (s *Service) TransactionReceipt(ctx context.Context, hash []byte) (*spec.TransactionReceipt, error)

TransactionReceipt returns the transaction receipt for the given transaction hash.

Jump to

Keyboard shortcuts

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