Documentation ¶
Index ¶
- Constants
- func CreateBlockEventParserError(db *gorm.DB, blockEvent models.BlockEvent, parser models.BlockEventParser, ...) error
- func CreateMessageParserError(db *gorm.DB, message models.Message, parser models.MessageParser, ...) error
- func DeleteCustomBlockEventParserError(db *gorm.DB, blockEvent models.BlockEvent, parser models.BlockEventParser) error
- func DeleteCustomMessageParserError(db *gorm.DB, message models.Message, parser models.MessageParser) error
- func FindOrCreateAddressByAddress(db *gorm.DB, address string) (models.Address, error)
- func FindOrCreateCustomBlockEventParsers(db *gorm.DB, parsers map[string]models.BlockEventParser) error
- func FindOrCreateCustomMessageParsers(db *gorm.DB, parsers map[string]models.MessageParser) error
- func FindOrCreateDenomByBase(db *gorm.DB, base string) (models.Denom, error)
- func GetBlocksFromStart(db *gorm.DB, chainID uint, startHeight int64, endHeight int64) ([]models.Block, error)
- func GetChains(db *gorm.DB) ([]models.Chain, error)
- func GetDBChainID(db *gorm.DB, chain models.Chain) (uint, error)
- func GetHighestEventIndexedBlock(db *gorm.DB, chainID uint) (models.Block, error)
- func GetHighestIndexedBlock(db *gorm.DB, chainID uint) models.Block
- func IndexCustomBlockEvents(conf config.IndexConfig, db *gorm.DB, dryRun bool, ...) error
- func IndexCustomMessages(conf config.IndexConfig, db *gorm.DB, dryRun bool, ...) error
- func MigrateInterfaces(db *gorm.DB, interfaces []any) error
- func MigrateModels(db *gorm.DB) error
- func PostgresDbConnect(host string, port string, database string, user string, password string, ...) (*gorm.DB, error)
- func UpsertFailedBlock(db *gorm.DB, blockHeight int64, chainID string, chainName string) error
- func UpsertFailedEventBlock(db *gorm.DB, blockHeight int64, chainID string, chainName string) error
- type BlockDBWrapper
- type BlockEventDBWrapper
- type DenomDBWrapper
- type MessageDBWrapper
- type MessageEventDBWrapper
- type TxDBWrapper
Constants ¶
View Source
const ( OsmosisRewardDistribution uint = iota TendermintLiquidityDepositCoinsToPool TendermintLiquidityDepositPoolCoinReceived TendermintLiquiditySwapTransactedCoinIn TendermintLiquiditySwapTransactedCoinOut TendermintLiquiditySwapTransactedFee TendermintLiquidityWithdrawPoolCoinSent TendermintLiquidityWithdrawCoinReceived TendermintLiquidityWithdrawFee OsmosisProtorevDeveloperRewardDistribution )
Variables ¶
This section is empty.
Functions ¶
func CreateBlockEventParserError ¶
func CreateBlockEventParserError(db *gorm.DB, blockEvent models.BlockEvent, parser models.BlockEventParser, parserError error) error
func DeleteCustomBlockEventParserError ¶
func DeleteCustomBlockEventParserError(db *gorm.DB, blockEvent models.BlockEvent, parser models.BlockEventParser) error
func FindOrCreateDenomByBase ¶
func GetBlocksFromStart ¶
func IndexCustomBlockEvents ¶
func IndexCustomBlockEvents(conf config.IndexConfig, db *gorm.DB, dryRun bool, blockDBWrapper *BlockDBWrapper, identifierLoggingString string, beginBlockParserTrackers map[string]models.BlockEventParser, endBlockParserTrackers map[string]models.BlockEventParser) error
func IndexCustomMessages ¶
func IndexCustomMessages(conf config.IndexConfig, db *gorm.DB, dryRun bool, blockDBWrapper []TxDBWrapper, messageParserTrackers map[string]models.MessageParser) error
func MigrateModels ¶
MigrateModels runs the gorm automigrations with all the db models. This will migrate as needed and do nothing if nothing has changed.
func PostgresDbConnect ¶
func PostgresDbConnect(host string, port string, database string, user string, password string, level string) (*gorm.DB, error)
PostgresDbConnect connects to the database according to the passed in parameters
func UpsertFailedBlock ¶
Types ¶
type BlockDBWrapper ¶
type BlockDBWrapper struct { Block *models.Block BeginBlockEvents []BlockEventDBWrapper EndBlockEvents []BlockEventDBWrapper UniqueBlockEventTypes map[string]models.BlockEventType UniqueBlockEventAttributeKeys map[string]models.BlockEventAttributeKey }
func IndexBlockEvents ¶
func IndexBlockEvents(db *gorm.DB, dryRun bool, blockDBWrapper *BlockDBWrapper, identifierLoggingString string) (*BlockDBWrapper, error)
type BlockEventDBWrapper ¶
type BlockEventDBWrapper struct { BlockEvent models.BlockEvent Attributes []models.BlockEventAttribute BlockEventParsedDatasets []parsers.BlockEventParsedData }
type DenomDBWrapper ¶
type MessageDBWrapper ¶
type MessageDBWrapper struct { Message models.Message MessageEvents []MessageEventDBWrapper MessageParsedDatasets []parsers.MessageParsedData }
type MessageEventDBWrapper ¶
type MessageEventDBWrapper struct { MessageEvent models.MessageEvent Attributes []models.MessageEventAttribute }
type TxDBWrapper ¶
type TxDBWrapper struct { Tx models.Tx Messages []MessageDBWrapper UniqueMessageTypes map[string]models.MessageType UniqueMessageEventTypes map[string]models.MessageEventType UniqueMessageAttributeKeys map[string]models.MessageEventAttributeKey }
Store transactions with their messages for easy database creation
func IndexNewBlock ¶
func IndexNewBlock(db *gorm.DB, block models.Block, txs []TxDBWrapper, indexerConfig config.IndexConfig) (models.Block, []TxDBWrapper, error)
Click to show internal directories.
Click to hide internal directories.