base

package
v0.22.0 Latest Latest
Warning

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

Go to latest
Published: May 20, 2024 License: MIT Imports: 9 Imported by: 0

Documentation

Overview

Package base contains the base sql implementation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetAllModels

func GetAllModels() (allModels []interface{})

GetAllModels gets all models to migrate. see: https://medium.com/@SaifAbid/slice-interfaces-8c78f8b6345d for an explanation of why we can't do this at initialization time

Types

type Store

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

Store is a store that implements an underlying gorm db.

func NewStore

func NewStore(db *gorm.DB, metrics metrics.Handler) *Store

NewStore creates a new store.

func (Store) DB

func (s Store) DB() *gorm.DB

DB gets the database object for mutation outside of the lib.

func (*Store) GetSTIPTransactionsNotRebated

func (s *Store) GetSTIPTransactionsNotRebated(ctx context.Context) ([]*db.STIPTransactions, error)

GetSTIPTransactionsNotRebated gets transactions that have not yet been rebated.

func (*Store) GetTotalArbRebated added in v0.0.8

func (s *Store) GetTotalArbRebated(ctx context.Context, address string) (*big.Int, error)

GetTotalArbRebated gets the total amount of arb rebated for a given address.

func (*Store) InsertNewStipTransactions

func (s *Store) InsertNewStipTransactions(ctx context.Context, stipTransactions []db.STIPTransactions) error

InsertNewStipTransactions inserts new transactions into the database.

func (Store) SubmitterDB

func (s Store) SubmitterDB() submitterDB.Service

SubmitterDB gets the submitter database object for mutation outside of the lib.

func (*Store) UpdateSTIPTransactionDoNotProcess

func (s *Store) UpdateSTIPTransactionDoNotProcess(ctx context.Context, hash string) error

UpdateSTIPTransactionDoNotProcess updates the rebated status of a transaction.

func (*Store) UpdateSTIPTransactionRebated

func (s *Store) UpdateSTIPTransactionRebated(ctx context.Context, hash string, nonce uint64, arbTransferAmount string) error

UpdateSTIPTransactionRebated updates the rebated status of a transaction.

Jump to

Keyboard shortcuts

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