v3

package
v0.50.3 Latest Latest
Warning

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

Go to latest
Published: Jan 15, 2024 License: Apache-2.0 Imports: 14 Imported by: 22

Documentation

Index

Constants

View Source
const (
	// ModuleName is the name of the module
	ModuleName = "gov"
)

Variables

This section is empty.

Functions

func ConvertToLegacyDeposit

func ConvertToLegacyDeposit(deposit *v1.Deposit) v1beta1.Deposit

func ConvertToLegacyProposal

func ConvertToLegacyProposal(proposal v1.Proposal) (v1beta1.Proposal, error)

ConvertToLegacyProposal takes a new proposal and attempts to convert it to the legacy proposal format. This conversion is best effort. New proposal types that don't have a legacy message will return a "nil" content. Returns error when the amount of messages in `proposal` is different than one.

func ConvertToLegacyTallyResult

func ConvertToLegacyTallyResult(tally *v1.TallyResult) (v1beta1.TallyResult, error)

func ConvertToLegacyVote

func ConvertToLegacyVote(vote v1.Vote) (v1beta1.Vote, error)

func ConvertToLegacyVoteOptions

func ConvertToLegacyVoteOptions(voteOptions []*v1.WeightedVoteOption) ([]v1beta1.WeightedVoteOption, error)

func MigrateJSON

func MigrateJSON(oldState *v1beta1.GenesisState) (*v1.GenesisState, error)

MigrateJSON accepts exported v2 (v0.43) x/gov genesis state and migrates it to v3 (V0.46) x/gov genesis state. The migration includes:

- Updating everything to v1. - Migrating proposals to be Msg-based.

func MigrateStore

func MigrateStore(ctx sdk.Context, storeService corestoretypes.KVStoreService, cdc codec.BinaryCodec) error

MigrateStore performs in-place store migrations from v2 (v0.43) to v3 (v0.46). The migration includes:

- Migrate proposals to be Msg-based.

Types

This section is empty.

Jump to

Keyboard shortcuts

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