processor

package
v0.0.0-...-1971f33 Latest Latest
Warning

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

Go to latest
Published: Jun 29, 2022 License: GPL-3.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BlockProcessor

type BlockProcessor interface {
	Process(context.Context, *jsonrpc.Client, *types.Block) (func(*ent.Tx) error, error)
}

type ERC20Contract

type ERC20Contract struct {
	EventProcessor
	MatchableContract
	// contains filtered or unexported fields
}

ERC20

func NewERC20Contract

func NewERC20Contract(address string) *ERC20Contract

func (*ERC20Contract) Address

func (c *ERC20Contract) Address() string

func (*ERC20Contract) Match

func (c *ERC20Contract) Match(ctx context.Context, provider *jsonrpc.Client) bool

func (*ERC20Contract) Process

func (c *ERC20Contract) Process(ctx context.Context, rpc *jsonrpc.Client, b *types.Block, txn *types.Transaction, evt *Event) (func(tx *ent.Tx) error, error)

func (*ERC20Contract) Type

func (c *ERC20Contract) Type() string

type ERC721Contract

type ERC721Contract struct {
	EventProcessor
	MatchableContract
	// contains filtered or unexported fields
}

ERC721

func NewERC721Contract

func NewERC721Contract(address string) *ERC721Contract

func (*ERC721Contract) Address

func (c *ERC721Contract) Address() string

func (*ERC721Contract) Match

func (c *ERC721Contract) Match(ctx context.Context, provider *jsonrpc.Client) bool

func (*ERC721Contract) Process

func (c *ERC721Contract) Process(ctx context.Context, rpc *jsonrpc.Client, b *types.Block, txn *types.Transaction, evt *Event) (func(tx *ent.Tx) error, error)

func (*ERC721Contract) Type

func (c *ERC721Contract) Type() string

type Event

type Event struct {
	*types.Event
	Index uint64
}

type EventProcessor

type EventProcessor interface {
	Process(context.Context, *jsonrpc.Client, *types.Block, *types.Transaction, *Event) (func(*ent.Tx) error, error)
}

type MatchableContract

type MatchableContract interface {
	Address() string
	Type() string
	Match(ctx context.Context, provider *jsonrpc.Client) bool
}

func Match

func Match(ctx context.Context, provider *jsonrpc.Client, address string) MatchableContract

type ProcessorError

type ProcessorError struct {
	Scope string
	Err   error
}

func (*ProcessorError) Error

func (e *ProcessorError) Error() string

type StoreBlock

type StoreBlock struct {
	BlockProcessor
}

Handle block persistence

func (*StoreBlock) Process

func (p *StoreBlock) Process(ctx context.Context, rpc *jsonrpc.Client, b *types.Block) (func(tx *ent.Tx) error, error)

type StoreContract

type StoreContract struct {
	TransactionProcessor
}

func (*StoreContract) Process

func (p *StoreContract) Process(ctx context.Context, rpc *jsonrpc.Client, b *types.Block, txn *types.Transaction) (func(tx *ent.Tx) error, error)

Handle contract persistence

type StoreEvent

type StoreEvent struct {
	EventProcessor
}

Handle event persistence

func (*StoreEvent) Process

func (p *StoreEvent) Process(ctx context.Context, rpc *jsonrpc.Client, b *types.Block, txn *types.Transaction, evt *Event) (func(tx *ent.Tx) error, error)

type StoreTransaction

type StoreTransaction struct {
	TransactionProcessor
}

Handle transaction persistence

func (*StoreTransaction) Process

func (p *StoreTransaction) Process(ctx context.Context, rpc *jsonrpc.Client, b *types.Block, txn *types.Transaction) (func(tx *ent.Tx) error, error)

type TransactionProcessor

type TransactionProcessor interface {
	Process(context.Context, *jsonrpc.Client, *types.Block, *types.Transaction) (func(*ent.Tx) error, error)
}

type UnknownContract

type UnknownContract struct {
	MatchableContract
	// contains filtered or unexported fields
}

Unknown

func NewUnknownContract

func NewUnknownContract(address string) *UnknownContract

func (*UnknownContract) Address

func (c *UnknownContract) Address() string

func (*UnknownContract) Type

func (c *UnknownContract) Type() string

Jump to

Keyboard shortcuts

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