v036

package
v0.45.1-reapsdkv2 Latest Latest
Warning

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

Go to latest
Published: May 5, 2022 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Overview

Package v036 is used for legacy migration scripts. Actual migration scripts for v036 have been removed, but the v039->v042 migration script still references types from this file, so we're keeping it for now. DONTCOVER

Index

Constants

View Source
const (
	ModuleName = "gov"
	RouterKey  = ModuleName

	ProposalTypeText string = "Text"

	MaxDescriptionLength int = 5000
	MaxTitleLength       int = 140
)

Variables

This section is empty.

Functions

func ErrInvalidProposalContent

func ErrInvalidProposalContent(msg string) error

func RegisterLegacyAminoCodec

func RegisterLegacyAminoCodec(cdc *codec.LegacyAmino)

func ValidateAbstract

func ValidateAbstract(c Content) error

Types

type Content

type Content interface {
	GetTitle() string
	GetDescription() string
	ProposalRoute() string
	ProposalType() string
	ValidateBasic() error
	String() string
}

func NewTextProposal

func NewTextProposal(title, description string) Content

type GenesisState

type GenesisState struct {
	StartingProposalID uint64                `json:"starting_proposal_id"`
	Deposits           v034gov.Deposits      `json:"deposits"`
	Votes              v034gov.Votes         `json:"votes"`
	Proposals          []Proposal            `json:"proposals"`
	DepositParams      v034gov.DepositParams `json:"deposit_params"`
	VotingParams       v034gov.VotingParams  `json:"voting_params"`
	TallyParams        v034gov.TallyParams   `json:"tally_params"`
}

func NewGenesisState

func NewGenesisState(
	startingProposalID uint64, deposits v034gov.Deposits, votes v034gov.Votes, proposals []Proposal,
	depositParams v034gov.DepositParams, votingParams v034gov.VotingParams, tallyParams v034gov.TallyParams,
) GenesisState

type Proposal

type Proposal struct {
	Content `json:"content"`

	ProposalID       uint64                 `json:"id"`
	Status           v034gov.ProposalStatus `json:"proposal_status"`
	FinalTallyResult v034gov.TallyResult    `json:"final_tally_result"`

	SubmitTime     time.Time `json:"submit_time"`
	DepositEndTime time.Time `json:"deposit_end_time"`
	TotalDeposit   sdk.Coins `json:"total_deposit"`

	VotingStartTime time.Time `json:"voting_start_time"`
	VotingEndTime   time.Time `json:"voting_end_time"`
}

type ProposalQueue

type ProposalQueue []uint64

type Proposals

type Proposals []Proposal

type TextProposal

type TextProposal struct {
	Title       string `json:"title"`
	Description string `json:"description"`
}

func (TextProposal) GetDescription

func (tp TextProposal) GetDescription() string

func (TextProposal) GetTitle

func (tp TextProposal) GetTitle() string

func (TextProposal) ProposalRoute

func (tp TextProposal) ProposalRoute() string

func (TextProposal) ProposalType

func (tp TextProposal) ProposalType() string

func (TextProposal) String

func (tp TextProposal) String() string

func (TextProposal) ValidateBasic

func (tp TextProposal) ValidateBasic() error

Jump to

Keyboard shortcuts

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