Documentation ¶
Overview ¶
Package base contains the base sql implementation
Index ¶
- func GetAllModels() (allModels []interface{})
- type Store
- func (s Store) DB() *gorm.DB
- func (s *Store) GetSTIPTransactionsNotRebated(ctx context.Context) ([]*db.STIPTransactions, error)
- func (s *Store) GetTotalArbRebated(ctx context.Context, address string) (*big.Int, error)
- func (s *Store) InsertNewStipTransactions(ctx context.Context, stipTransactions []db.STIPTransactions) error
- func (s Store) SubmitterDB() submitterDB.Service
- func (s *Store) UpdateSTIPTransactionDoNotProcess(ctx context.Context, hash string) error
- func (s *Store) UpdateSTIPTransactionRebated(ctx context.Context, hash string, nonce uint64, arbTransferAmount string) error
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 (*Store) GetSTIPTransactionsNotRebated ¶
GetSTIPTransactionsNotRebated gets transactions that have not yet been rebated.
func (*Store) GetTotalArbRebated ¶ added in v0.0.8
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 ¶
UpdateSTIPTransactionDoNotProcess updates the rebated status of a transaction.