app

package
v0.4.1 Latest Latest
Warning

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

Go to latest
Published: May 10, 2024 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrImpossibleParsing          = errors.New("parsing is impossible")
	ErrUnmatchedContractInterface = errors.New("account state does not match the contract interface description")
)

Functions

func GetBlockchainConfig added in v0.3.1

func GetBlockchainConfig(ctx context.Context, api ton.APIClientWrapped) (*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.APIClientWrapped

	AccountRepo filter.AccountRepository

	Parser ParserService
}

type FetcherService added in v0.3.1

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

type IndexerConfig

type IndexerConfig struct {
	DB *repository.DB

	API ton.APIClientWrapped

	Fetcher FetcherService
	Parser  ParserService

	FromBlock uint32
	Workers   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

	ParseAccountContractData(
		ctx context.Context,
		contractDesc *core.ContractInterface,
		acc *core.AccountState,
		others func(context.Context, addr.Address) (*core.AccountState, error),
	) error

	ExecuteAccountGetMethod(
		ctx context.Context,
		contract abi.ContractName,
		getMethod string,
		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

	API ton.APIClientWrapped
}

type RescanConfig added in v0.4.1

type RescanConfig struct {
	ContractRepo core.ContractRepository
	RescanRepo   core.RescanRepository
	BlockRepo    repository.Block
	AccountRepo  repository.Account
	MessageRepo  repository.Message

	Parser ParserService

	Workers int

	SelectLimit int
}

type RescanService added in v0.4.1

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

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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