processedblocks

package
v0.9.10 Latest Latest
Warning

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

Go to latest
Published: Mar 24, 2026 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ProcessedBlock added in v0.9.10

type ProcessedBlock struct {
	Blockchain string     `json:"blockchain"`
	Number     int64      `json:"number"`
	Hash       string     `json:"hash"`
	CreatedAt  time.Time  `json:"created_at"`
	UpdatedAt  *time.Time `json:"updated_at"`
}

type Service

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

func New

func New(
	st store.IStore,
) *Service

func (*Service) Create

func (s *Service) Create(ctx context.Context, blockchain wconstants.BlockchainType, number int64, hash string, opts ...repos.Option) error

Create

func (*Service) LastBlock added in v0.9.10

func (s *Service) LastBlock(ctx context.Context, blockchain wconstants.BlockchainType) (*ProcessedBlock, error)

LastBlock returns the last block info including hash

func (*Service) LastBlockNumber

func (s *Service) LastBlockNumber(ctx context.Context, blockchain wconstants.BlockchainType) (int64, error)

LastBlockNumber

func (*Service) UpdateNumber

func (s *Service) UpdateNumber(ctx context.Context, blockchain wconstants.BlockchainType, number int64, opts ...repos.Option) error

UpdateNumber

func (*Service) UpdateNumberWithHash added in v0.9.10

func (s *Service) UpdateNumberWithHash(ctx context.Context, blockchain wconstants.BlockchainType, number int64, hash string, opts ...repos.Option) error

UpdateNumberWithHash

Jump to

Keyboard shortcuts

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