processors

package
v1.3.0 Latest Latest
Warning

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

Go to latest
Published: May 20, 2026 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	TxTypePlay                        = "play"
	TxTypeManageEntity                = "manage_entity"
	TxTypeValidatorRegistration       = "validator_registration"
	TxTypeValidatorDeregistration     = "validator_deregistration"
	TxTypeValidatorRegistrationLegacy = "validator_registration_legacy"
	TxTypeSlaRollup                   = "sla_rollup"
	TxTypeValidatorMisbehaviorDereg   = "validator_misbehavior_deregistration"
	TxTypeStorageProof                = "storage_proof"
	TxTypeStorageProofVerification    = "storage_proof_verification"
	TxTypeRelease                     = "release"
)

Transaction type constants. Correspond to proto SignedTransaction union members.

Variables

This section is empty.

Functions

This section is empty.

Types

type Processor

type Processor interface {
	// TxType returns the transaction type string (e.g. "play", "manage_entity").
	TxType() string
	// Process handles the transaction and returns InsertTransactionParams for etl_transactions.
	Process(ctx context.Context, tx *corev1.SignedTransaction, txCtx *TxContext, q *db.Queries) (*Result, error)
}

Processor processes a specific transaction type.

func DefaultRegistry

func DefaultRegistry() []Processor

DefaultRegistry returns the default set of processors.

func ManageEntity

func ManageEntity() Processor

ManageEntity returns the manage_entity processor.

func Play

func Play() Processor

Play returns the play processor.

type Result

type Result struct {
	InsertTx db.InsertTransactionParams
}

Result is returned by processors. InsertTx is always set; the processor may perform additional entity inserts via the db.

type TxContext

type TxContext struct {
	Block     *corev1.Block
	TxHash    string
	TxIndex   int
	BlockTime pgtype.Timestamp
	InsertTx  db.InsertTransactionParams
}

TxContext holds block and transaction metadata for processing.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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