types

package
v0.0.0-...-52431d2 Latest Latest
Warning

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

Go to latest
Published: Apr 7, 2021 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Deposit

type Deposit struct {
	ProposalID uint64
	Depositor  string
	Amount     sdk.Coins
	Height     int64
}

Deposit represent a message that a user do deposit action Assume the entry with latest height get final total deposit

func NewDeposit

func NewDeposit(
	proposalID uint64,
	depositor string,
	amount sdk.Coins,
	height int64,
) Deposit

NewDeposit return a new Deposit instance

type Proposal

type Proposal struct {
	Title           string
	Description     string
	ProposalRoute   string
	ProposalType    string
	ProposalID      uint64
	Status          gov.ProposalStatus
	SubmitTime      time.Time
	DepositEndTime  time.Time
	VotingStartTime time.Time
	VotingEndTime   time.Time
	Proposer        string
}

Proposal represent storing a gov.proposal For final tolly result, it stored in tally result as they share same proposal ID and VotingEndTime

func NewProposal

func NewProposal(
	title string,
	description string,
	proposalRoute string,
	proposalType string,
	proposalID uint64,
	status gov.ProposalStatus,
	submitTime time.Time,
	depositEndTime time.Time,
	votingStartTime time.Time,
	votingEndTime time.Time,
	proposer string,

) Proposal

NewProposal return a new Proposal instance

type TallyResult

type TallyResult struct {
	ProposalID uint64
	Yes        int64
	Abstain    int64
	No         int64
	NoWithVeto int64
	Height     int64
}

MsgVote

func NewTallyResult

func NewTallyResult(
	proposalID uint64,
	yes int64,
	abstain int64,
	no int64,
	noWithVeto int64,
	height int64,
) TallyResult

NewTallyResult return a new TallyResult instance

type Vote

type Vote struct {
	ProposalID uint64
	Voter      string
	Option     gov.VoteOption
	Height     int64
}

Vote describe a msgVote

func NewVote

func NewVote(
	proposalID uint64,
	voter string,
	option gov.VoteOption,
	height int64,
) Vote

NewVote return a new Vote instance

Jump to

Keyboard shortcuts

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