Documentation
¶
Overview ¶
Package base contains the base sql implementation
Index ¶
- type Store
- func (s Store) DB() *gorm.DB
- func (s Store) GetDeadlineQueueEvents(ctx context.Context) ([]*model.DeadlineQueue, error)
- func (s Store) GetDestinationBridgeEvent(ctx context.Context, transactionID string) (*model.DestinationBridgeEvent, error)
- func (s Store) GetLastIndexed(ctx context.Context, chainID uint32, address common.Address) (uint64, error)
- func (s Store) GetOriginBridgeEvent(ctx context.Context, transactionID string) (*model.OriginBridgeEvent, error)
- func (s Store) GetToken(ctx context.Context, tokenID string) (*model.Token, error)
- func (s Store) RemoveDeadlineQueueEvent(ctx context.Context, transactionID string) error
- func (s Store) StoreDeadlineQueueEvent(ctx context.Context, entry *model.DeadlineQueue) error
- func (s Store) StoreDestinationBridgeEvent(ctx context.Context, log *types.Log, originEvent *model.OriginBridgeEvent) error
- func (s Store) StoreLastIndexed(ctx context.Context, contractAddress common.Address, chainID uint32, ...) error
- func (s Store) StoreOriginBridgeEvent(ctx context.Context, chainID uint32, log *types.Log, ...) error
- func (s Store) StoreToken(ctx context.Context, token *model.Token) error
- func (s Store) SubmitterDB() submitterDB.Service
- func (s Store) UNSAFE_DB() *gorm.DB
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Store ¶
type Store struct {
// contains filtered or unexported fields
}
Store is the store.
func (Store) GetDeadlineQueueEvents ¶
GetDeadlineQueueEvents gets all events in the deadline queue table.
func (Store) GetDestinationBridgeEvent ¶
func (s Store) GetDestinationBridgeEvent(ctx context.Context, transactionID string) (*model.DestinationBridgeEvent, error)
GetDestinationBridgeEvent gets a destination bridge event.
func (Store) GetLastIndexed ¶
func (s Store) GetLastIndexed(ctx context.Context, chainID uint32, address common.Address) (uint64, error)
GetLastIndexed gets the last indexed block by contract.
func (Store) GetOriginBridgeEvent ¶
func (s Store) GetOriginBridgeEvent(ctx context.Context, transactionID string) (*model.OriginBridgeEvent, error)
GetOriginBridgeEvent gets a origin bridge event.
func (Store) RemoveDeadlineQueueEvent ¶
RemoveDeadlineQueueEvent removes an event from the deadline queue table.
func (Store) StoreDeadlineQueueEvent ¶
StoreDeadlineQueueEvent inserts a deadline queue entry if it does not exist in the table.
func (Store) StoreDestinationBridgeEvent ¶
func (s Store) StoreDestinationBridgeEvent(ctx context.Context, log *types.Log, originEvent *model.OriginBridgeEvent) error
StoreDestinationBridgeEvent adds a new destination to the database.
func (Store) StoreLastIndexed ¶
func (s Store) StoreLastIndexed(ctx context.Context, contractAddress common.Address, chainID uint32, blockNumber uint64) error
StoreLastIndexed stores the last indexed block number for a contract. It will only insert if the current stored block number is less than the block number being inserted.
func (Store) StoreOriginBridgeEvent ¶
func (s Store) StoreOriginBridgeEvent(ctx context.Context, chainID uint32, log *types.Log, event *bindings.FastBridgeBridgeRequested) error
StoreOriginBridgeEvent adds a new origin event to the database.
func (Store) StoreToken ¶
StoreToken is an UPSERT operation that updates the token metadata if it exists, or inserts it if it doesn't.
func (Store) SubmitterDB ¶
func (s Store) SubmitterDB() submitterDB.Service
SubmitterDB gets the submitter database object for mutation.