app

package
v0.3.1 Latest Latest
Warning

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

Go to latest
Published: Jun 14, 2023 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrImpossibleParsing = errors.New("parsing is impossible")

Functions

func GetBlockchainConfig added in v0.3.1

func GetBlockchainConfig(ctx context.Context, api *ton.APIClient) (*cell.Cell, error)

func TimeTrack added in v0.3.1

func TimeTrack(start time.Time, fun string, args ...any)

Types

type FetcherConfig added in v0.3.1

type FetcherConfig struct {
	API *ton.APIClient

	Parser ParserService
}

type FetcherService added in v0.3.1

type FetcherService interface {
	UnseenBlocks(ctx context.Context, masterSeqNo uint32) (master *ton.BlockIDExt, shards []*ton.BlockIDExt, err error)
	BlockTransactions(ctx context.Context, b *ton.BlockIDExt) ([]*core.Transaction, error)
}

type IndexerConfig

type IndexerConfig struct {
	DB *repository.DB

	API *ton.APIClient

	Fetcher FetcherService
	Parser  ParserService

	FromBlock        uint32
	Workers          int
	InsertBlockBatch int
}

type IndexerService

type IndexerService interface {
	Start() error
	Stop()
}

type ParserConfig

type ParserConfig struct {
	BlockchainConfig *cell.Cell
	ContractRepo     core.ContractRepository
}

type ParserService

type ParserService interface {
	ParseAccountData(
		ctx context.Context,
		acc *core.AccountState,
		others func(context.Context, addr.Address) (*core.AccountState, error),
	) error

	ParseMessagePayload(
		ctx context.Context,
		message *core.Message,
	) error
}

type QueryConfig

type QueryConfig struct {
	DB *repository.DB
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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