messages

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Aug 30, 2022 License: CC0-1.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

CosmosMessageAddressesParser represents a MessageAddressesParser that parses a Chain message and returns all the involved addresses (both accounts and validators)

Functions

func BankMessagesParser

func BankMessagesParser(_ codec.Marshaler, cosmosMsg sdk.Msg) ([]string, error)

BankMessagesParser returns the list of all the accounts involved in the given message if it's related to the x/bank module

func CrisisMessagesParser

func CrisisMessagesParser(_ codec.Marshaler, cosmosMsg sdk.Msg) ([]string, error)

CrisisMessagesParser returns the list of all the accounts involved in the given message if it's related to the x/crisis module

func DefaultMessagesParser

func DefaultMessagesParser(_ codec.Marshaler, cosmosMsg sdk.Msg) ([]string, error)

DefaultMessagesParser represents the default messages parser that simply returns the list of all the signers of a message

func DistributionMessagesParser

func DistributionMessagesParser(_ codec.Marshaler, cosmosMsg sdk.Msg) ([]string, error)

DistributionMessagesParser returns the list of all the accounts involved in the given message if it's related to the x/distribution module

func EvidenceMessagesParser

func EvidenceMessagesParser(_ codec.Marshaler, cosmosMsg sdk.Msg) ([]string, error)

EvidenceMessagesParser returns the list of all the accounts involved in the given message if it's related to the x/evidence module

func GovMessagesParser

func GovMessagesParser(cdc codec.Marshaler, cosmosMsg sdk.Msg) ([]string, error)

GovMessagesParser returns the list of all the accounts involved in the given message if it's related to the x/gov module

func IBCTransferMessagesParser

func IBCTransferMessagesParser(_ codec.Marshaler, cosmosMsg sdk.Msg) ([]string, error)

IBCTransferMessagesParser returns the list of all the accounts involved in the given message if it's related to the x/iBCTransfer module

func MessageNotSupported

func MessageNotSupported(msg sdk.Msg) error

MessageNotSupported returns an error telling that the given message is not supported

func SlashingMessagesParser

func SlashingMessagesParser(_ codec.Marshaler, cosmosMsg sdk.Msg) ([]string, error)

SlashingMessagesParser returns the list of all the accounts involved in the given message if it's related to the x/slashing module

func StakingMessagesParser

func StakingMessagesParser(_ codec.Marshaler, cosmosMsg sdk.Msg) ([]string, error)

StakingMessagesParser returns the list of all the accounts involved in the given message if it's related to the x/staking module

Types

type MessageAddressesParser

type MessageAddressesParser = func(cdc codec.Marshaler, msg sdk.Msg) ([]string, error)

MessageAddressesParser represents a function that extracts all the involved addresses from a provided message (both accounts and validators)

func JoinMessageParsers

func JoinMessageParsers(parsers ...MessageAddressesParser) MessageAddressesParser

JoinMessageParsers joins together all the given parsers, calling them in order

type Module

type Module struct {
	// contains filtered or unexported fields
}

Module represents the module allowing to store messages inside database

func NewModule

func NewModule(parser MessageAddressesParser, cdc codec.Marshaler, db database.Database) *Module

func (*Module) Name

func (m *Module) Name() string

Name implements modules.Module

Jump to

Keyboard shortcuts

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