staking

package
v0.1.1-experimental.5 Latest Latest
Warning

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

Go to latest
Published: Apr 9, 2024 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// Name of the Deposit event
	// in the deposit contract.
	DepositEventName = "Deposit"
)

Variables

View Source
var (
	// Signature and type of the Deposit event
	// in the deposit contract.
	DepositEventSig = crypto.Keccak256Hash(
		[]byte(DepositEventName + "(bytes,bytes,uint64,bytes,uint64)"),
	)
)

Functions

func WithBaseService

func WithBaseService(
	base service.BaseService,
) service.Option[Service]

WithBaseService sets the BaseService for the Service.

func WithDepositABI

func WithDepositABI(
	depositABI *abi.ABI,
) service.Option[Service]

WithDepositABI returns an Option that sets the deposit contract's ABI for the Service.

func WithExecutionEngine

func WithExecutionEngine(
	ee *execution.Engine,
) service.Option[Service]

Types

type Service

type Service struct {
	// BaseService is the base service.
	service.BaseService
	// contains filtered or unexported fields
}

Service represents the staking service.

func (*Service) ProcessBlockEvents

func (s *Service) ProcessBlockEvents(
	ctx context.Context,
	st state.BeaconState,
	logs []coretypes.Log,
) error

ProcessBlockEvents processes the logs from the deposit contract.

func (*Service) ProcessLogsInETH1Block

func (s *Service) ProcessLogsInETH1Block(
	ctx context.Context,
	st state.BeaconState,
	blockHash primitives.ExecutionHash,
) error

ProcessLogsInETH1Block gets logs in the Eth1 block received from the execution client and processes them to convert them into appropriate objects that can be consumed by other services.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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