Documentation ¶
Index ¶
- func New(ctx context.Context, params ...Parameter) (execclient.Service, error)
- type Parameter
- type Service
- func (s *Service) Address() string
- func (s *Service) Balance(ctx context.Context, address types.Address, blockID string) (*big.Int, error)
- func (s *Service) BaseFee(_ context.Context, blockID string) (*big.Int, error)
- func (s *Service) Block(ctx context.Context, blockID string) (*spec.Block, error)
- func (s *Service) Call(_ context.Context, opts *execclient.CallOpts) ([]byte, error)
- func (s *Service) ChainHeight(_ context.Context) (uint32, error)
- func (s *Service) ChainID(_ context.Context) (uint64, error)
- func (s *Service) EstimateGas(_ context.Context, tx *spec.TransactionSubmission) (*big.Int, error)
- func (s *Service) Events(_ context.Context, filter *api.EventsFilter) ([]*spec.BerlinTransactionEvent, error)
- func (s *Service) Issuance(ctx context.Context, blockID string) (*api.Issuance, error)
- func (*Service) Name() string
- func (s *Service) NetworkID(_ context.Context) (uint64, error)
- func (s *Service) NewPendingTransactions(ctx context.Context, ch chan *spec.Transaction) (*util.Subscription, error)
- func (s *Service) ReplayBlockTransactions(ctx context.Context, blockID string) ([]*api.TransactionResult, error)
- func (s *Service) Syncing(_ context.Context) (*api.SyncState, error)
- func (s *Service) Transaction(_ context.Context, hash types.Hash) (*spec.Transaction, error)
- func (s *Service) TransactionInBlock(_ context.Context, blockHash types.Hash, index uint32) (*spec.Transaction, error)
- func (s *Service) TransactionReceipt(_ context.Context, hash types.Hash) (*spec.TransactionReceipt, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Parameter ¶
type Parameter interface {
// contains filtered or unexported methods
}
Parameter is the interface for service parameters.
func WithAddress ¶
WithAddress provides the address for the endpoint.
func WithLogLevel ¶
WithLogLevel sets the log level for the module.
func WithTimeout ¶
WithTimeout sets the maximum duration for all requests to the endpoint.
func WithWebSocketAddress ¶ added in v0.6.0
WithWebSocketAddress provides the address for the websocket endpoint. If not supplied it will use the value supplied as the address.
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
Service is an Ethereum execution client service.
func (*Service) Balance ¶ added in v0.7.0
func (s *Service) Balance(ctx context.Context, address types.Address, blockID string) (*big.Int, error)
Balance obtains the balance for the given address at the given block ID.
func (*Service) BaseFee ¶ added in v0.8.9
BaseFee provides the base fee of the chain at the given block ID.
func (*Service) ChainHeight ¶
ChainHeight returns the height of the chain as understood by the node.
func (*Service) EstimateGas ¶ added in v0.8.9
func (s *Service) EstimateGas(_ context.Context, tx *spec.TransactionSubmission, ) ( *big.Int, error, )
EstimateGas estimates the gas required for a transaction.
func (*Service) Events ¶ added in v0.3.0
func (s *Service) Events(_ context.Context, filter *api.EventsFilter) ([]*spec.BerlinTransactionEvent, error)
Events returns the events matching the filter.
func (*Service) NewPendingTransactions ¶ added in v0.6.0
func (s *Service) NewPendingTransactions(ctx context.Context, ch chan *spec.Transaction) (*util.Subscription, error)
NewPendingTransactions returns a subscription for pending transactions.
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) Syncing ¶ added in v0.2.0
Syncing obtains information about the sync state of the node.
func (*Service) Transaction ¶ added in v0.6.0
Transaction returns the transaction for the given transaction hash.
func (*Service) TransactionInBlock ¶ added in v0.7.6
func (s *Service) TransactionInBlock(_ context.Context, blockHash types.Hash, index 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, hash types.Hash) (*spec.TransactionReceipt, error)
TransactionReceipt returns the transaction receipt for the given transaction hash.