internal

package
v0.0.0-...-b6889b5 Latest Latest
Warning

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

Go to latest
Published: Jan 24, 2021 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ProcessBlocks

func ProcessBlocks(cfg Configuration, metrics MetricDefinitions)

func ServeMetrics

func ServeMetrics(registry *prom.Registry)

Types

type Configuration

type Configuration struct {
	BlocksSince  time.Time
	FromAccounts []string
	ToAccounts   []string
}

type DateFilter

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

func NewDateFilter

func NewDateFilter(start time.Time, end time.Time) (*DateFilter, error)

func (DateFilter) QualifyTransaction

func (f DateFilter) QualifyTransaction(blk EthBlock, txn EthTransaction) (bool, error)

type DestinationFilter

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

func NewDestinationFilter

func NewDestinationFilter(ver int, id big.Int, addr string) (*DestinationFilter, error)

func (DestinationFilter) QualifyTransaction

func (f DestinationFilter) QualifyTransaction(blk EthBlock, txn EthTransaction) (bool, error)

type EthBlock

type EthBlock interface {
	Time() uint64
}

type EthMessage

type EthMessage interface {
	To() *common.Address
	From() common.Address
}

type EthTransaction

type EthTransaction interface {
	ChainId() *big.Int
	Hash() common.Hash
	AsMessage(s types.Signer) (types.Message, error)
}

type FilterChain

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

func (FilterChain) QualifyTransaction

func (fc FilterChain) QualifyTransaction(blk EthBlock, txn EthTransaction) (bool, error)

type Lot

type Lot struct {
	LotId   ulid.ULID
	Date    time.Time
	Rate    decimal.Decimal
	TxnList []LotTxn
}

func NewLot

func NewLot(date time.Time) Lot

func (*Lot) AddTxn

func (l *Lot) AddTxn(from common.Address, nonce uint64, amt decimal.Decimal) error

type LotTxn

type LotTxn struct {
	TxnFrom   common.Address
	TxnNonce  uint64
	EthAmount decimal.Decimal
}

func NewLotTxn

func NewLotTxn(from common.Address, nonce uint64, amt decimal.Decimal) LotTxn

type MetricDefinitions

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

func GetMetricDefinitions

func GetMetricDefinitions() MetricDefinitions

func InitializeMetrics

func InitializeMetrics() MetricDefinitions

type SourceFilter

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

func NewSourceFilter

func NewSourceFilter(ver int, id big.Int, addr string) (*SourceFilter, error)

func (SourceFilter) QualifyTransaction

func (f SourceFilter) QualifyTransaction(blk EthBlock, txn EthTransaction) (bool, error)

type TransactionFilter

type TransactionFilter interface {
	QualifyTransaction(EthBlock, EthTransaction) (bool, error)
}

Jump to

Keyboard shortcuts

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