Documentation ¶
Overview ¶
Package db contains the database implementation for the relayer
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CCTPRelayerDB ¶
type CCTPRelayerDB interface { CCTPRelayerDBReader CCTPRelayerDBWriter SubmitterDB() submitterDB.Service }
CCTPRelayerDB is the interface for the database service.
type CCTPRelayerDBReader ¶
type CCTPRelayerDBReader interface { // GetLastBlockNumber gets the last block number that had a message for the respective origin chain in the database. GetLastBlockNumber(ctx context.Context, chainID uint32) (uint64, error) // GetMessagesByState gets all messages with the given state. GetMessagesByState(ctx context.Context, states ...types.MessageState) ([]types.Message, error) // GetMessageByOriginHash gets a message by its origin hash. GetMessageByOriginHash(ctx context.Context, originHash common.Hash) (*types.Message, error) // GetMessageByRequestID gets a message by its request id. GetMessageByRequestID(ctx context.Context, requestID string) (*types.Message, error) }
CCTPRelayerDBReader is the interface for reading from the database.
Directories ¶
Path | Synopsis |
---|---|
Package sql provides a common interface for starting sql-lite databases
|
Package sql provides a common interface for starting sql-lite databases |
base
Package base contains the base sql implementation
|
Package base contains the base sql implementation |
mysql
Package mysql contains a mysql db
|
Package mysql contains a mysql db |
sqlite
Package sqlite implements the sqlite package
|
Package sqlite implements the sqlite package |
Click to show internal directories.
Click to hide internal directories.