Documentation ¶
Index ¶
- Constants
- func ConvertToLegacyDeposit(deposit *v1.Deposit) v1beta1.Deposit
- func ConvertToLegacyProposal(proposal v1.Proposal) (v1beta1.Proposal, error)
- func ConvertToLegacyTallyResult(tally *v1.TallyResult) (v1beta1.TallyResult, error)
- func ConvertToLegacyVote(vote v1.Vote) (v1beta1.Vote, error)
- func ConvertToLegacyVoteOptions(voteOptions []*v1.WeightedVoteOption) ([]v1beta1.WeightedVoteOption, error)
- func MigrateJSON(oldState *v1beta1.GenesisState) (*v1.GenesisState, error)
- func MigrateStore(ctx sdk.Context, storeKey storetypes.StoreKey, cdc codec.BinaryCodec) error
Constants ¶
View Source
const (
// ModuleName is the name of the module
ModuleName = "gov"
)
Variables ¶
This section is empty.
Functions ¶
func ConvertToLegacyProposal ¶
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 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, storeKey storetypes.StoreKey, 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.
Click to show internal directories.
Click to hide internal directories.