gov

package
v0.0.0-...-5f0a9d2 Latest Latest
Warning

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

Go to latest
Published: Sep 26, 2022 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ProposalTypeSoftwareUpgrade       = "SoftwareUpgrade"
	ProposalTypeCancelSoftwareUpgrade = "CancelSoftwareUpgrade"
	ProposalTypeParameterChange       = "ParameterChange"
	ProposalTypeCommunityPoolSpend    = "CommunityPoolSpend"
	ProposalTypeText                  = "Text"
	ProposalTypeClientUpdate          = "ClientUpdate"
)

Variables

This section is empty.

Functions

func CovertContent

func CovertContent(content GovContent) interface{}

Types

type ContentCancelSoftwareUpgradeProposal

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

type ContentClientUpdateProposal

type ContentClientUpdateProposal struct {
	Title       string `json:"title" bson:"title"`
	Description string `json:"description" bson:"description"`
	ClientId    string `json:"client_id" bson:"client_id"`
	Header      string `json:"header" bson:"header"`
}

type ContentCommunityPoolSpendProposal

type ContentCommunityPoolSpendProposal struct {
	Title       string        `json:"title" bson:"title"`
	Description string        `json:"description" bson:"description"`
	Recipient   string        `json:"recipient" bson:"recipient"`
	Amount      []models.Coin `json:"amount" bson:"amount"`
}

type ContentParameterChangeProposal

type ContentParameterChangeProposal struct {
	Title       string        `json:"title" bson:"title"`
	Description string        `json:"description" bson:"description"`
	Changes     []ParamChange `json:"changes" bson:"changes"`
}

type ContentSoftwareUpgradeProposal

type ContentSoftwareUpgradeProposal struct {
	Title       string `json:"title" bson:"title"`
	Description string `json:"description" bson:"description"`
	Plan        Plan   `json:"plan" bson:"plan"`
}

type ContentTextProposal

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

type DocTxMsgDeposit

type DocTxMsgDeposit struct {
	ProposalID int64         `bson:"proposal_id"` // ID of the proposal
	Depositor  string        `bson:"depositor"`   // Address of the depositor
	Amount     []models.Coin `bson:"amount"`      // Coins to add to the proposal's deposit
}

MsgDeposit

func (*DocTxMsgDeposit) BuildMsg

func (doctx *DocTxMsgDeposit) BuildMsg(txMsg interface{})

func (*DocTxMsgDeposit) GetType

func (doctx *DocTxMsgDeposit) GetType() string

func (*DocTxMsgDeposit) HandleTxMsg

func (m *DocTxMsgDeposit) HandleTxMsg(v SdkMsg) MsgDocInfo

type DocTxMsgSubmitProposal

type DocTxMsgSubmitProposal struct {
	Proposer       string        `bson:"proposer"`        //  Address of the proposer
	InitialDeposit []models.Coin `bson:"initial_deposit"` //  Initial deposit paid by sender. Must be strictly positive.
	Content        interface{}   `bson:"content"`
}

func (*DocTxMsgSubmitProposal) BuildMsg

func (doctx *DocTxMsgSubmitProposal) BuildMsg(txMsg interface{})

func (*DocTxMsgSubmitProposal) GetType

func (doctx *DocTxMsgSubmitProposal) GetType() string

func (*DocTxMsgSubmitProposal) HandleTxMsg

func (m *DocTxMsgSubmitProposal) HandleTxMsg(v SdkMsg) MsgDocInfo

type DocTxMsgVote

type DocTxMsgVote struct {
	ProposalID int64  `bson:"proposal_id"` // ID of the proposal
	Voter      string `bson:"voter"`       //  address of the voter
	Option     int32  `bson:"option"`      //  option from OptionSet chosen by the voter
}

MsgVote

func (*DocTxMsgVote) BuildMsg

func (doctx *DocTxMsgVote) BuildMsg(txMsg interface{})

func (*DocTxMsgVote) GetType

func (doctx *DocTxMsgVote) GetType() string

func (*DocTxMsgVote) HandleTxMsg

func (m *DocTxMsgVote) HandleTxMsg(v SdkMsg) MsgDocInfo

type DocTxMsgVoteWeighted

type DocTxMsgVoteWeighted struct {
	ProposalID int64                `bson:"proposal_id"` // ID of the proposal
	Voter      string               `bson:"voter"`       //  address of the voter
	Options    []WeightedVoteOption `bson:"options"`     //  option from OptionSet chosen by the voter
}

MsgVote

func (*DocTxMsgVoteWeighted) BuildMsg

func (m *DocTxMsgVoteWeighted) BuildMsg(txMsg interface{})

func (*DocTxMsgVoteWeighted) GetType

func (m *DocTxMsgVoteWeighted) GetType() string

func (*DocTxMsgVoteWeighted) HandleTxMsg

func (m *DocTxMsgVoteWeighted) HandleTxMsg(v SdkMsg) MsgDocInfo

type GovClient

type GovClient struct {
}

func NewClient

func NewClient() GovClient

func (GovClient) HandleTxMsg

func (gov GovClient) HandleTxMsg(v types.Msg) (MsgDocInfo, bool)

type ParamChange

type ParamChange struct {
	Subspace string `json:"subspace" bson:"subspace"`
	Key      string `json:"key" bson:"key"`
	Value    string `json:"value" bson:"value"`
}

type Plan

type Plan struct {
	Name                string    `json:"name" bson:"name"`
	Time                time.Time `json:"time" bson:"time"`
	Height              int64     `json:"height" bson:"height"`
	Info                string    `json:"info" bson:"info"`
	UpgradedClientState string    `json:"upgraded_client_state" bson:"upgraded_client_state"`
}

type WeightedVoteOption

type WeightedVoteOption struct {
	Option int32  `bson:"option"`
	Weight string `bson:"weight"`
}

Jump to

Keyboard shortcuts

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