mock

package
v0.8.6 Latest Latest
Warning

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

Go to latest
Published: Sep 8, 2023 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Service

type Service struct{}

Service is a mock execution client service.

func New

func New() (*Service, error)

New creates a new mock.

func (*Service) Address

func (s *Service) Address() string

Address returns the address of the client.

func (*Service) Balance

func (s *Service) Balance(_ context.Context, _ types.Address, _ string) (*big.Int, error)

Balance obtains the balance for the given address at the given block ID.

func (*Service) Block

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

Block returns the block with the given ID.

func (*Service) Call

func (s *Service) Call(_ context.Context, _ *execclient.CallOpts) ([]byte, error)

Call makes a call to the execution client.

func (*Service) ChainHeight

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

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

func (*Service) ChainID

func (s *Service) ChainID(_ context.Context) (uint64, error)

ChainID returns the chain ID.

func (*Service) Events

Events returns the events matching the filter.

func (*Service) Issuance

func (s *Service) Issuance(_ context.Context, _ string) (*api.Issuance, error)

Issuance returns the issuance of a block.

func (*Service) Name

func (s *Service) Name() string

Name returns the name of the client implementation.

func (*Service) NetworkID

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

NetworkID returns the network ID.

func (*Service) NewPendingTransactions

func (s *Service) NewPendingTransactions(_ context.Context, _ chan *spec.Transaction) (*util.Subscription, error)

NewPendingTransactions subscribes to new pending transactions.

func (*Service) ReplayBlockTransactions

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

ReplayBlockTransactions obtains traces for all transactions in a block.

func (*Service) Syncing

func (s *Service) Syncing(_ context.Context) (*api.SyncState, error)

Syncing obtains information about the sync state of the node.

func (*Service) Transaction

func (s *Service) Transaction(_ context.Context, _ types.Hash) (*spec.Transaction, error)

Transaction returns the transaction for the given transaction hash.

func (*Service) TransactionInBlock

func (s *Service) TransactionInBlock(_ context.Context, _ types.Hash, _ uint32) (*spec.Transaction, error)

TransactionInBlock returns the transaction for the given transaction in a block at the given index.

func (*Service) TransactionReceipt

func (s *Service) TransactionReceipt(_ context.Context, _ types.Hash) (*spec.BerlinTransactionReceipt, 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