voterequest

package
v0.0.0-...-5efa85e Latest Latest
Warning

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

Go to latest
Published: Sep 6, 2024 License: MIT Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ExtendVoteRequestIndexer

func ExtendVoteRequestIndexer(indexer *indexer.Indexer) error

Types

type VoteRequestParser

type VoteRequestParser 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 (*VoteRequestParser) Identifier

func (p *VoteRequestParser) Identifier() string

func (*VoteRequestParser) IndexMessage

func (p *VoteRequestParser) 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 (*VoteRequestParser) ParseMessage

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

func (*VoteRequestParser) ParseVoteEvents

func (p *VoteRequestParser) ParseVoteEvents(codec client.Codec, vote *codecTypes.Any, logMsg *txTypes.LogMessage, cfg config.IndexConfig) (*any, error)

type VoteRequestValue

type VoteRequestValue struct {
	Type   string          `json:"@type,omitempty"`
	Sender sdk.AccAddress  `json:"sender,omitempty"`
	PollID exported.PollID `json:"poll_id,omitempty"`
	Vote   any             `json:"vote,omitempty"`
}

Jump to

Keyboard shortcuts

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