repo

package
v0.3.1-0...-684a909 Latest Latest
Warning

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

Go to latest
Published: Oct 21, 2024 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type EventRepository

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

func NewEventRepository

func NewEventRepository(dbHandler db.DB) (*EventRepository, error)

func (*EventRepository) ChainDataSyncedEventByBlockNumberOrGreater

func (r *EventRepository) ChainDataSyncedEventByBlockNumberOrGreater(
	ctx context.Context,
	srcChainId uint64,
	syncedChainId uint64,
	blockNumber uint64,
) (*relayer.Event, error)

func (*EventRepository) Close

func (r *EventRepository) Close() error

Close closes the database connection.

func (*EventRepository) Delete

func (r *EventRepository) Delete(
	ctx context.Context,
	id int,
) error

func (*EventRepository) DeleteAllAfterBlockID

func (r *EventRepository) DeleteAllAfterBlockID(blockID uint64, srcChainID uint64, destChainID uint64) error

DeleteAllAfterBlockID is used when a reorg is detected

func (*EventRepository) FindAllByAddress

func (r *EventRepository) FindAllByAddress(
	ctx context.Context,
	req *http.Request,
	opts relayer.FindAllByAddressOpts,
) (*paginate.Page, error)

func (*EventRepository) FindLatestBlockID

func (r *EventRepository) FindLatestBlockID(
	ctx context.Context,
	event string,
	srcChainID uint64,
	destChainID uint64,
) (uint64, error)

GetLatestBlockID get latest block id

func (*EventRepository) FirstByEventAndMsgHash

func (r *EventRepository) FirstByEventAndMsgHash(
	ctx context.Context,
	event string,
	msgHash string,
) (*relayer.Event, error)

func (*EventRepository) FirstByMsgHash

func (r *EventRepository) FirstByMsgHash(
	ctx context.Context,
	msgHash string,
) (*relayer.Event, error)

func (*EventRepository) LatestChainDataSyncedEvent

func (r *EventRepository) LatestChainDataSyncedEvent(
	ctx context.Context,
	srcChainId uint64,
	syncedChainId uint64,
) (uint64, error)

func (*EventRepository) Save

func (*EventRepository) UpdateFeesAndProfitability

func (r *EventRepository) UpdateFeesAndProfitability(
	ctx context.Context,
	id int,
	opts *relayer.UpdateFeesAndProfitabilityOpts,
) error

func (*EventRepository) UpdateStatus

func (r *EventRepository) UpdateStatus(ctx context.Context, id int, status relayer.EventStatus) error

Jump to

Keyboard shortcuts

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