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)
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)
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.