msgs

package
v0.0.0-...-baf6593 Latest Latest
Warning

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

Go to latest
Published: Dec 21, 2023 License: AGPL-3.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (

	// Inner msgs.
	MsgSoftwareUpgrade = &upgrade.MsgSoftwareUpgrade{
		Authority: constants.Bob_Num0.Owner,
		Plan: upgrade.Plan{
			Name:   "test-plan",
			Height: 10,
			Info:   "test-info",
		},
	}
	MsgSoftwareUpgradeTxBytes []byte

	MsgCancelUpgrade = &upgrade.MsgCancelUpgrade{
		Authority: constants.Bob_Num0.Owner,
	}
	MsgCancelUpgradeTxBytes []byte

	// Invalid MsgSubmitProposals
	MsgSubmitProposalWithEmptyInner, _ = gov.NewMsgSubmitProposal(
		[]sdk.Msg{}, nil, testProposer, testMetadata, testTitle, testSummary)
	MsgSubmitProposalWithEmptyInnerTxBytes []byte

	MsgSubmitProposalWithUnsupportedInner, _ = gov.NewMsgSubmitProposal(
		[]sdk.Msg{GovBetaMsgSubmitProposal}, nil, testProposer, testMetadata, testTitle, testSummary)
	MsgSubmitProposalWithUnsupportedInnerTxBytes []byte

	MsgSubmitProposalWithAppInjectedInner, _ = gov.NewMsgSubmitProposal(
		[]sdk.Msg{&prices.MsgUpdateMarketPrices{}}, nil, testProposer, testMetadata, testTitle, testSummary)
	MsgSubmitProposalWithAppInjectedInnerTxBytes []byte

	MsgSubmitProposalWithDoubleNestedInner, _ = gov.NewMsgSubmitProposal(
		[]sdk.Msg{MsgSubmitProposalWithUpgradeAndCancel}, nil, testProposer, testMetadata, testTitle, testSummary)
	MsgSubmitProposalWithDoubleNestedInnerTxBytes []byte

	// Valid MsgSubmitProposals
	MsgSubmitProposalWithUpgrade, _ = gov.NewMsgSubmitProposal(
		[]sdk.Msg{MsgSoftwareUpgrade}, nil, testProposer, testMetadata, testTitle, testSummary)
	MsgSubmitProposalWithUpgradeTxBytes []byte

	MsgSubmitProposalWithUpgradeAndCancel, _ = gov.NewMsgSubmitProposal(
		[]sdk.Msg{
			MsgSoftwareUpgrade,
			MsgCancelUpgrade,
		}, nil, testProposer, testMetadata, testTitle, testSummary)
	MsgSubmitProposalWithUpgradeAndCancelTxBytes []byte
)
View Source
var (
	GovBetaMsgSubmitProposal, _ = govbeta.NewMsgSubmitProposal(
		govbetaContent,
		sdk.NewCoins(sdk.NewInt64Coin(sdk.DefaultBondDenom, 1000)),
		constants.BobAccAddress,
	)
	GovBetaMsgSubmitProposalTxBytes []byte
)

Functions

func CopyMap

func CopyMap(m map[string]sdk.Msg) map[string]sdk.Msg

CopyMap returns a copy of the given map.

func GetMsgNameWithModuleVersion

func GetMsgNameWithModuleVersion(typeUrl string) string

GetMsgNameWithModuleVersion returns the name of the msg type along with module and version, given its type url.

func IsValidMsgFormat

func IsValidMsgFormat(tokens []string) bool

IsValidMsgFormat returns true if the given tokens are of the form: "<module>.<version>.Msg<MsgName>"

Types

type SampleMsg

type SampleMsg struct {
	Name string
	Msg  sdk.Msg
}

SampleMsg is a struct containing a sample msg and its name.

func GetNonNilSampleMsgs

func GetNonNilSampleMsgs(typeUrlToSampleMsgMap map[string]sdk.Msg) []SampleMsg

GetSampleMsgs returns a list of sample msgs for each non-nil map value in the input.

type TestBlockWithMsgs

type TestBlockWithMsgs struct {
	Block uint32
	Msgs  []TestSdkMsg
}

type TestSdkMsg

type TestSdkMsg struct {
	Msg              sdk.Msg
	ExpectedIsOk     bool
	ExpectedRespCode uint32
}

Jump to

Keyboard shortcuts

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