gov

package
v0.0.0-...-1ac23cf Latest Latest
Warning

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

Go to latest
Published: Jun 2, 2021 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewDepositFromRaw

func NewDepositFromRaw(deposit *govtypes.Deposit) common.Deposit

func NewDepositsFromRaw

func NewDepositsFromRaw(items govtypes.Deposits) common.Deposits

Types

type Content

type Content struct {
	Title       string `json:"title"`
	Description string `json:"description"`
	Route       string `json:"route"`
	Type        string `json:"type"`
}

type Proposal

type Proposal struct {
	Id              uint64       `json:"id"`
	Status          string       `json:"status"`
	Content         Content      `json:"content"`
	TallyResult     TallyResult  `json:"tally_result"`
	TotalDeposit    common.Coins `json:"total_deposit"`
	SubmitTime      time.Time    `json:"submit_time"`
	DepositEndTime  time.Time    `json:"deposit_end_time"`
	VotingStartTime time.Time    `json:"voting_start_time"`
	VotingEndTime   time.Time    `json:"voting_end_time"`
}

func NewProposalFromRaw

func NewProposalFromRaw(item *govtypes.Proposal) Proposal

type Proposals

type Proposals []Proposal

func NewProposalsFromRaw

func NewProposalsFromRaw(items govtypes.Proposals) Proposals

type TallyResult

type TallyResult struct {
	Yes        int64 `json:"yes"`
	Abstain    int64 `json:"abstain"`
	No         int64 `json:"no"`
	NoWithVeto int64 `json:"no_with_veto"`
}

type Vote

type Vote struct {
	ProposalId uint64 `json:"proposal_id"`
	Voter      string `json:"voter"`
	Option     string `json:"option"`
}

func NewVoteFromRaw

func NewVoteFromRaw(vote *govtypes.Vote) Vote

type Votes

type Votes []Vote

func NewVotesFromRaw

func NewVotesFromRaw(items govtypes.Votes) Votes

Jump to

Keyboard shortcuts

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