voteevents

package
v0.0.0-...-db0507b Latest Latest
Warning

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

Go to latest
Published: Dec 5, 2024 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ExtendVoteEventsIndexer

func ExtendVoteEventsIndexer(indexer *indexer.Indexer) error

Types

type Event

type Event struct {
	EventBase
	Event isEvent_Event `json:"event,omitempty"`
}

func (*Event) MarshalJSON

func (p *Event) MarshalJSON() ([]byte, error)

type EventBase

type EventBase struct {
	Chain  github_com_axelarnetwork_axelar_core_x_nexus_exported.ChainName `json:"chain,omitempty"`
	Index  uint64                                                          `json:"index,omitempty"`
	Status string                                                          `json:"status,omitempty"`
	TxID   evmTypes.Hash                                                   `json:"tx_id,omitempty"`
}

type VoteEvents

type VoteEvents struct {
	Type   string                                                          `json:"@type,omitempty"`
	Chain  github_com_axelarnetwork_axelar_core_x_nexus_exported.ChainName `json:"chain,omitempty"`
	Events []Event                                                         `json:"events,omitempty"`
}

type VoteEventsParser

type VoteEventsParser struct {
	Id      string
	Indexer *indexer.Indexer
}

This defines the custom message parser for the call contract approve message type It implements the MessageParser interface

func (*VoteEventsParser) Identifier

func (p *VoteEventsParser) Identifier() string

func (*VoteEventsParser) IndexMessage

func (p *VoteEventsParser) IndexMessage(dataset *any, db *gorm.DB, message models.Message, messageEvents []parsers.MessageEventWithAttributes, cfg config.IndexConfig) error

This method is called during database insertion. It is responsible for storing the parsed data in the database. The gorm db is wrapped in a transaction, so any errors will cause a rollback. Any errors returned will be saved as a parser error in the database as well for later debugging.

func (*VoteEventsParser) ParseAnyMessage

func (p *VoteEventsParser) ParseAnyMessage(cosmosMsg types.Any, log *indexerTxTypes.LogMessage, cfg config.IndexConfig) (*any, error)

func (*VoteEventsParser) ParseMessage

func (p *VoteEventsParser) ParseMessage(cosmosMsg stdTypes.Msg, logMsg *indexerTxTypes.LogMessage, cfg config.IndexConfig) (*any, error)

Jump to

Keyboard shortcuts

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