filtering

package
v0.10.2-fix Latest Latest
Warning

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

Go to latest
Published: Jul 28, 2022 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BlockFilter

type BlockFilter struct {
	IncludeProgram blocknumBasedCELFilter
	ExcludeProgram blocknumBasedCELFilter
}

func NewBlockFilter

func NewBlockFilter(includeProgramCode, excludeProgramCode []string) (*BlockFilter, error)

func (*BlockFilter) Transform

func (f *BlockFilter) Transform(blk *bstream.Block) *bstream.Block

type CELFilter

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

func (*CELFilter) IsNoop

func (f *CELFilter) IsNoop() bool

func (*CELFilter) String

func (f *CELFilter) String() string

type CallActivation

type CallActivation struct {
	Trace *pbcodec.TransactionTrace
	Trx   *pbcodec.Transaction
	Call  *pbcodec.Call
	Cache *TrxFilterCache
}

CallActivation is used public in some private code.

*Warning* We reserve the rights to change it's signature at all time

func (*CallActivation) GetERC20Actors

func (a *CallActivation) GetERC20Actors() (erc20from, erc20to string, found bool)

func (*CallActivation) GetERC20From

func (a *CallActivation) GetERC20From() (string, bool)

func (*CallActivation) GetERC20To

func (a *CallActivation) GetERC20To() (string, bool)

func (*CallActivation) GetFrom

func (a *CallActivation) GetFrom() string

func (*CallActivation) GetInput

func (a *CallActivation) GetInput() string

func (*CallActivation) GetRawInput

func (a *CallActivation) GetRawInput() []byte

func (*CallActivation) GetTo

func (a *CallActivation) GetTo() string

func (*CallActivation) Parent

func (*CallActivation) ResolveName

func (a *CallActivation) ResolveName(name string) (interface{}, bool)

type FilteringPreprocessor

type FilteringPreprocessor struct {
	Filter *BlockFilter
}

func (*FilteringPreprocessor) PreprocessBlock

func (f *FilteringPreprocessor) PreprocessBlock(blk *bstream.Block) (interface{}, error)

type TrxFilter

type TrxFilter interface {
	fmt.Stringer
	Matches(transaction interface{}, cache *TrxFilterCache) (bool, []uint32)
}

func NewCELTrxFilter

func NewCELTrxFilter(includeProgramCode, excludeProgramCode string) (TrxFilter, error)

func NewPassthroughFilter

func NewPassthroughFilter() TrxFilter

func NewTrxHashFilter

func NewTrxHashFilter(id string) (TrxFilter, error)

func NewTrxHashFilterBytes

func NewTrxHashFilterBytes(hash []byte) TrxFilter

type TrxFilterCache

type TrxFilterCache struct {
	sync.Mutex
	// contains filtered or unexported fields
}

func NewTrxFilterCache

func NewTrxFilterCache() *TrxFilterCache

func (*TrxFilterCache) PurgeStaleCalls

func (c *TrxFilterCache) PurgeStaleCalls(trxBlockHash []byte)

Jump to

Keyboard shortcuts

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