core

package
v1.1.1-rc0 Latest Latest
Warning

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

Go to latest
Published: Apr 12, 2024 License: MIT Imports: 22 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ModuleName = "core"
)

Variables

View Source
var (
	// CosmosMessageAddressesParser represents a MsgAddrParser that parses a
	// Cosmos message and returns all the involved addresses (both accounts and validators)
	CosmosMessageAddressesParser = JoinMessageParsers(
		BankMessagesParser,
		CrisisMessagesParser,
		DistributionMessagesParser,
		EvidenceMessagesParser,
		GovMessagesParser,
		IBCTransferMessagesParser,
		SlashingMessagesParser,
		StakingMessagesParser,
		FeeGrantMessagesParser,
		AuthzMessagesParser,
		GraphMessagesParser,

		DefaultMessagesParser,
	)
)

Functions

func AuthzMessagesParser

func AuthzMessagesParser(_ codec.Codec, incomingMsg sdk.Msg) []string

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

func BankMessagesParser

func BankMessagesParser(_ codec.Codec, incomingMsg sdk.Msg) []string

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.Codec, incomingMsg sdk.Msg) []string

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.Codec, incomingMsg sdk.Msg) []string

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

func DistributionMessagesParser

func DistributionMessagesParser(_ codec.Codec, incomingMsg sdk.Msg) []string

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.Codec, incomingMsg sdk.Msg) []string

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

func FeeGrantMessagesParser

func FeeGrantMessagesParser(_ codec.Codec, incomingMsg sdk.Msg) []string

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

func GovMessagesParser

func GovMessagesParser(cdc codec.Codec, incomingMsg sdk.Msg) []string

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

func GraphMessagesParser added in v1.0.0

func GraphMessagesParser(_ codec.Codec, incomingMsg sdk.Msg) []string

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

func IBCTransferMessagesParser

func IBCTransferMessagesParser(_ codec.Codec, incomingMsg sdk.Msg) []string

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

func SlashingMessagesParser

func SlashingMessagesParser(_ codec.Codec, incomingMsg sdk.Msg) []string

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.Codec, incomingMsg sdk.Msg) []string

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

Types

type Module

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

func New

func New(b broker, tbM tb.ToBroker, cdc codec.Codec, parser MsgAddrParser) *Module

func (*Module) HandleBlock

func (m *Module) HandleBlock(ctx context.Context, block *types.Block) error

func (*Module) HandleMessage

func (m *Module) HandleMessage(ctx context.Context, index int, msg sdk.Msg, tx *types.Tx) error

func (*Module) HandleTx

func (m *Module) HandleTx(ctx context.Context, tx *types.Tx) error

func (*Module) HandleValidators added in v0.3.0

func (m *Module) HandleValidators(ctx context.Context, vals *cometbftcoretypes.ResultValidators) error

HandleValidators handles validators for each block height.

func (*Module) Name

func (m *Module) Name() string

type MsgAddrParser added in v1.0.0

type MsgAddrParser = func(cdc codec.Codec, msg sdk.Msg) []string

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

func JoinMessageParsers

func JoinMessageParsers(parsers ...MsgAddrParser) MsgAddrParser

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

Jump to

Keyboard shortcuts

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