v1

package
v0.0.0-...-a6871c7 Latest Latest
Warning

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

Go to latest
Published: Apr 26, 2024 License: Apache-2.0 Imports: 42 Imported by: 3

Documentation

Overview

Package v1 is a reverse proxy.

It translates gRPC into RESTful JSON APIs.

Index

Constants

View Source
const (
	DefaultPeriod                         time.Duration = time.Hour * 24 * 2 // 2 days
	DefaultExpeditedPeriod                time.Duration = time.Hour * 24 * 1 // 1 day
	DefaultMinExpeditedDepositTokensRatio               = 5
)

Default period for deposits & voting

View Source
const (
	// DefaultStartingProposalID is 1
	DefaultStartingProposalID uint64 = 1

	StatusNil           = ProposalStatus_PROPOSAL_STATUS_UNSPECIFIED
	StatusDepositPeriod = ProposalStatus_PROPOSAL_STATUS_DEPOSIT_PERIOD
	StatusVotingPeriod  = ProposalStatus_PROPOSAL_STATUS_VOTING_PERIOD
	StatusPassed        = ProposalStatus_PROPOSAL_STATUS_PASSED
	StatusRejected      = ProposalStatus_PROPOSAL_STATUS_REJECTED
	StatusFailed        = ProposalStatus_PROPOSAL_STATUS_FAILED
)

Variables

View Source
var (
	ErrInvalidLengthGenesis        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowGenesis          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupGenesis = fmt.Errorf("proto: unexpected end of group")
)
View Source
var (
	ErrInvalidLengthGov        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowGov          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupGov = fmt.Errorf("proto: unexpected end of group")
)
View Source
var (
	DefaultMinDepositTokens             = sdkmath.NewInt(10000000)
	DefaultMinExpeditedDepositTokens    = DefaultMinDepositTokens.Mul(sdkmath.NewInt(DefaultMinExpeditedDepositTokensRatio))
	DefaultQuorum                       = sdkmath.LegacyNewDecWithPrec(334, 3)
	DefaultYesQuorum                    = sdkmath.LegacyNewDecWithPrec(0, 1)
	DefaultExpeditedQuorum              = sdkmath.LegacyNewDecWithPrec(500, 3)
	DefaultThreshold                    = sdkmath.LegacyNewDecWithPrec(5, 1)
	DefaultExpeditedThreshold           = sdkmath.LegacyNewDecWithPrec(667, 3)
	DefaultVetoThreshold                = sdkmath.LegacyNewDecWithPrec(334, 3)
	DefaultMinInitialDepositRatio       = sdkmath.LegacyZeroDec()
	DefaultProposalCancelRatio          = sdkmath.LegacyMustNewDecFromStr("0.5")
	DefaultProposalCancelDestAddress    = ""
	DefaultProposalCancelMaxPeriod      = sdkmath.LegacyMustNewDecFromStr("0.5")
	DefaultBurnProposalPrevote          = false // set to false to replicate behavior of when this change was made (0.47)
	DefaultBurnVoteQuorum               = false // set to false to  replicate behavior of when this change was made (0.47)
	DefaultBurnVoteVeto                 = true  // set to true to replicate behavior of when this change was made (0.47)
	DefaultMinDepositRatio              = sdkmath.LegacyMustNewDecFromStr("0.01")
	DefaultOptimisticRejectedThreshold  = sdkmath.LegacyMustNewDecFromStr("0.1")
	DefaultOptimisticAuthorizedAddreses = []string(nil)
)

Default governance params

View Source
var (
	ErrInvalidLengthQuery        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowQuery          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupQuery = fmt.Errorf("proto: unexpected end of group")
)
View Source
var (
	ErrInvalidLengthTx        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowTx          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupTx = fmt.Errorf("proto: unexpected end of group")
)
View Source
var ProposalStatus_name = map[int32]string{
	0: "PROPOSAL_STATUS_UNSPECIFIED",
	1: "PROPOSAL_STATUS_DEPOSIT_PERIOD",
	2: "PROPOSAL_STATUS_VOTING_PERIOD",
	3: "PROPOSAL_STATUS_PASSED",
	4: "PROPOSAL_STATUS_REJECTED",
	5: "PROPOSAL_STATUS_FAILED",
}
View Source
var ProposalStatus_value = map[string]int32{
	"PROPOSAL_STATUS_UNSPECIFIED":    0,
	"PROPOSAL_STATUS_DEPOSIT_PERIOD": 1,
	"PROPOSAL_STATUS_VOTING_PERIOD":  2,
	"PROPOSAL_STATUS_PASSED":         3,
	"PROPOSAL_STATUS_REJECTED":       4,
	"PROPOSAL_STATUS_FAILED":         5,
}
View Source
var ProposalType_name = map[int32]string{
	0: "PROPOSAL_TYPE_UNSPECIFIED",
	1: "PROPOSAL_TYPE_STANDARD",
	2: "PROPOSAL_TYPE_MULTIPLE_CHOICE",
	3: "PROPOSAL_TYPE_OPTIMISTIC",
	4: "PROPOSAL_TYPE_EXPEDITED",
}
View Source
var ProposalType_value = map[string]int32{
	"PROPOSAL_TYPE_UNSPECIFIED":     0,
	"PROPOSAL_TYPE_STANDARD":        1,
	"PROPOSAL_TYPE_MULTIPLE_CHOICE": 2,
	"PROPOSAL_TYPE_OPTIMISTIC":      3,
	"PROPOSAL_TYPE_EXPEDITED":       4,
}
View Source
var VoteOption_name = map[int32]string{
	0: "VOTE_OPTION_UNSPECIFIED",
	1: "VOTE_OPTION_YES",

	2: "VOTE_OPTION_ABSTAIN",

	3: "VOTE_OPTION_NO",

	4: "VOTE_OPTION_NO_WITH_VETO",

	5: "VOTE_OPTION_SPAM",
}
View Source
var VoteOption_value = map[string]int32{
	"VOTE_OPTION_UNSPECIFIED":  0,
	"VOTE_OPTION_YES":          1,
	"VOTE_OPTION_ONE":          1,
	"VOTE_OPTION_ABSTAIN":      2,
	"VOTE_OPTION_TWO":          2,
	"VOTE_OPTION_NO":           3,
	"VOTE_OPTION_THREE":        3,
	"VOTE_OPTION_NO_WITH_VETO": 4,
	"VOTE_OPTION_FOUR":         4,
	"VOTE_OPTION_SPAM":         5,
}

Functions

func LegacyContentFromMessage

func LegacyContentFromMessage(msg *MsgExecLegacyContent) (v1beta1.Content, error)

LegacyContentFromMessage extracts the legacy Content interface from a MsgExecLegacyContent.

func RegisterInterfaces

func RegisterInterfaces(registrar registry.InterfaceRegistrar)

RegisterInterfaces registers the interfaces types with the Interface Registry.

func RegisterLegacyAminoCodec

func RegisterLegacyAminoCodec(cdc *codec.LegacyAmino)

RegisterLegacyAminoCodec registers all the necessary types and interfaces for the governance module.

func RegisterMsgServer

func RegisterMsgServer(s grpc1.Server, srv MsgServer)

func RegisterQueryHandler

func RegisterQueryHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error

RegisterQueryHandler registers the http handlers for service Query to "mux". The handlers forward requests to the grpc endpoint over "conn".

func RegisterQueryHandlerClient

func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, client QueryClient) error

RegisterQueryHandlerClient registers the http handlers for service Query to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "QueryClient". Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "QueryClient" doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in "QueryClient" to call the correct interceptors.

func RegisterQueryHandlerFromEndpoint

func RegisterQueryHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error)

RegisterQueryHandlerFromEndpoint is same as RegisterQueryHandler but automatically dials to "endpoint" and closes the connection when "ctx" gets done.

func RegisterQueryHandlerServer

func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, server QueryServer) error

RegisterQueryHandlerServer registers the http handlers for service Query to "mux". UnaryRPC :call QueryServer directly. StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterQueryHandlerFromEndpoint instead.

func RegisterQueryServer

func RegisterQueryServer(s grpc1.Server, srv QueryServer)

func ValidProposalStatus

func ValidProposalStatus(status ProposalStatus) bool

ValidProposalStatus returns true if the proposal status is valid and false otherwise.

func ValidVoteOption

func ValidVoteOption(option VoteOption) bool

ValidVoteOption returns true if the vote option is valid and false otherwise.

func ValidWeightedVoteOption

func ValidWeightedVoteOption(option WeightedVoteOption) bool

ValidWeightedVoteOption returns true if the sub vote is valid and false otherwise.

func ValidateGenesis

func ValidateGenesis(ac address.Codec, data *GenesisState) error

ValidateGenesis checks if gov genesis state is valid ranges It checks if params are in valid ranges It also makes sure that the provided proposal IDs are unique and that there are no duplicate deposit or vote records and no vote or deposits for non-existent proposals

Types

type Deposit

type Deposit struct {
	// proposal_id defines the unique id of the proposal.
	ProposalId uint64 `protobuf:"varint,1,opt,name=proposal_id,json=proposalId,proto3" json:"proposal_id,omitempty"`
	// depositor defines the deposit addresses from the proposals.
	Depositor string `protobuf:"bytes,2,opt,name=depositor,proto3" json:"depositor,omitempty"`
	// amount to be deposited by depositor.
	Amount []types.Coin `protobuf:"bytes,3,rep,name=amount,proto3" json:"amount"`
}

Deposit defines an amount deposited by an account address to an active proposal.

func NewDeposit

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

NewDeposit creates a new Deposit instance

func (*Deposit) Descriptor

func (*Deposit) Descriptor() ([]byte, []int)

func (*Deposit) GetAmount

func (m *Deposit) GetAmount() []types.Coin

func (*Deposit) GetDepositor

func (m *Deposit) GetDepositor() string

func (*Deposit) GetProposalId

func (m *Deposit) GetProposalId() uint64

func (*Deposit) Marshal

func (m *Deposit) Marshal() (dAtA []byte, err error)

func (*Deposit) MarshalTo

func (m *Deposit) MarshalTo(dAtA []byte) (int, error)

func (*Deposit) MarshalToSizedBuffer

func (m *Deposit) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*Deposit) ProtoMessage

func (*Deposit) ProtoMessage()

func (*Deposit) Reset

func (m *Deposit) Reset()

func (*Deposit) Size

func (m *Deposit) Size() (n int)

func (*Deposit) String

func (m *Deposit) String() string

func (*Deposit) Unmarshal

func (m *Deposit) Unmarshal(dAtA []byte) error

func (*Deposit) XXX_DiscardUnknown

func (m *Deposit) XXX_DiscardUnknown()

func (*Deposit) XXX_Marshal

func (m *Deposit) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Deposit) XXX_Merge

func (m *Deposit) XXX_Merge(src proto.Message)

func (*Deposit) XXX_Size

func (m *Deposit) XXX_Size() int

func (*Deposit) XXX_Unmarshal

func (m *Deposit) XXX_Unmarshal(b []byte) error

type DepositParams deprecated

type DepositParams struct {
	// Minimum deposit for a proposal to enter voting period.
	MinDeposit []types.Coin `protobuf:"bytes,1,rep,name=min_deposit,json=minDeposit,proto3" json:"min_deposit,omitempty"`
	// Maximum period for Atom holders to deposit on a proposal. Initial value: 2
	// months.
	MaxDepositPeriod *time.Duration `protobuf:"bytes,2,opt,name=max_deposit_period,json=maxDepositPeriod,proto3,stdduration" json:"max_deposit_period,omitempty"`
}

DepositParams defines the params for deposits on governance proposals.

Deprecated: Do not use.

func (*DepositParams) Descriptor

func (*DepositParams) Descriptor() ([]byte, []int)

func (*DepositParams) GetMaxDepositPeriod

func (m *DepositParams) GetMaxDepositPeriod() *time.Duration

func (*DepositParams) GetMinDeposit

func (m *DepositParams) GetMinDeposit() []types.Coin

func (*DepositParams) Marshal

func (m *DepositParams) Marshal() (dAtA []byte, err error)

func (*DepositParams) MarshalTo

func (m *DepositParams) MarshalTo(dAtA []byte) (int, error)

func (*DepositParams) MarshalToSizedBuffer

func (m *DepositParams) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*DepositParams) ProtoMessage

func (*DepositParams) ProtoMessage()

func (*DepositParams) Reset

func (m *DepositParams) Reset()

func (*DepositParams) Size

func (m *DepositParams) Size() (n int)

func (*DepositParams) String

func (m *DepositParams) String() string

func (*DepositParams) Unmarshal

func (m *DepositParams) Unmarshal(dAtA []byte) error

func (*DepositParams) XXX_DiscardUnknown

func (m *DepositParams) XXX_DiscardUnknown()

func (*DepositParams) XXX_Marshal

func (m *DepositParams) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*DepositParams) XXX_Merge

func (m *DepositParams) XXX_Merge(src proto.Message)

func (*DepositParams) XXX_Size

func (m *DepositParams) XXX_Size() int

func (*DepositParams) XXX_Unmarshal

func (m *DepositParams) XXX_Unmarshal(b []byte) error

type Deposits

type Deposits []*Deposit

Deposits is a collection of Deposit objects

func (Deposits) Equal

func (d Deposits) Equal(other Deposits) bool

Equal returns true if two slices (order-dependant) of deposits are equal.

func (Deposits) String

func (d Deposits) String() string

String implements stringer interface

type GenesisState

type GenesisState struct {
	// starting_proposal_id is the ID of the starting proposal.
	StartingProposalId uint64 `protobuf:"varint,1,opt,name=starting_proposal_id,json=startingProposalId,proto3" json:"starting_proposal_id,omitempty"`
	// deposits defines all the deposits present at genesis.
	Deposits []*Deposit `protobuf:"bytes,2,rep,name=deposits,proto3" json:"deposits,omitempty"`
	// votes defines all the votes present at genesis.
	Votes []*Vote `protobuf:"bytes,3,rep,name=votes,proto3" json:"votes,omitempty"`
	// proposals defines all the proposals present at genesis.
	Proposals []*Proposal `protobuf:"bytes,4,rep,name=proposals,proto3" json:"proposals,omitempty"`
	// Deprecated: Prefer to use `params` instead.
	// deposit_params defines all the parameters of related to deposit.
	DepositParams *DepositParams `protobuf:"bytes,5,opt,name=deposit_params,json=depositParams,proto3" json:"deposit_params,omitempty"` // Deprecated: Do not use.
	// Deprecated: Prefer to use `params` instead.
	// voting_params defines all the parameters of related to voting.
	VotingParams *VotingParams `protobuf:"bytes,6,opt,name=voting_params,json=votingParams,proto3" json:"voting_params,omitempty"` // Deprecated: Do not use.
	// Deprecated: Prefer to use `params` instead.
	// tally_params defines all the parameters of related to tally.
	TallyParams *TallyParams `protobuf:"bytes,7,opt,name=tally_params,json=tallyParams,proto3" json:"tally_params,omitempty"` // Deprecated: Do not use.
	// params defines all the parameters of x/gov module.
	Params *Params `protobuf:"bytes,8,opt,name=params,proto3" json:"params,omitempty"`
	// The constitution allows builders to lay a foundation and define purpose.
	// This is an immutable string set in genesis.
	// There are no amendments, to go outside of scope, just fork.
	// constitution is an immutable string in genesis for a chain builder to lay out their vision, ideas and ideals.
	Constitution string `protobuf:"bytes,9,opt,name=constitution,proto3" json:"constitution,omitempty"`
}

GenesisState defines the gov module's genesis state.

func DefaultGenesisState

func DefaultGenesisState() *GenesisState

DefaultGenesisState defines the default governance genesis state

func NewGenesisState

func NewGenesisState(startingProposalID uint64, params Params) *GenesisState

NewGenesisState creates a new genesis state for the governance module

func (*GenesisState) Descriptor

func (*GenesisState) Descriptor() ([]byte, []int)

func (GenesisState) Empty

func (data GenesisState) Empty() bool

Empty returns true if a GenesisState is empty

func (*GenesisState) GetConstitution

func (m *GenesisState) GetConstitution() string

func (*GenesisState) GetDepositParams deprecated

func (m *GenesisState) GetDepositParams() *DepositParams

Deprecated: Do not use.

func (*GenesisState) GetDeposits

func (m *GenesisState) GetDeposits() []*Deposit

func (*GenesisState) GetParams

func (m *GenesisState) GetParams() *Params

func (*GenesisState) GetProposals

func (m *GenesisState) GetProposals() []*Proposal

func (*GenesisState) GetStartingProposalId

func (m *GenesisState) GetStartingProposalId() uint64

func (*GenesisState) GetTallyParams deprecated

func (m *GenesisState) GetTallyParams() *TallyParams

Deprecated: Do not use.

func (*GenesisState) GetVotes

func (m *GenesisState) GetVotes() []*Vote

func (*GenesisState) GetVotingParams deprecated

func (m *GenesisState) GetVotingParams() *VotingParams

Deprecated: Do not use.

func (*GenesisState) Marshal

func (m *GenesisState) Marshal() (dAtA []byte, err error)

func (*GenesisState) MarshalTo

func (m *GenesisState) MarshalTo(dAtA []byte) (int, error)

func (*GenesisState) MarshalToSizedBuffer

func (m *GenesisState) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*GenesisState) ProtoMessage

func (*GenesisState) ProtoMessage()

func (*GenesisState) Reset

func (m *GenesisState) Reset()

func (*GenesisState) Size

func (m *GenesisState) Size() (n int)

func (*GenesisState) String

func (m *GenesisState) String() string

func (*GenesisState) Unmarshal

func (m *GenesisState) Unmarshal(dAtA []byte) error

func (GenesisState) UnpackInterfaces

func (data GenesisState) UnpackInterfaces(unpacker types.AnyUnpacker) error

UnpackInterfaces implements UnpackInterfacesMessage.UnpackInterfaces

func (*GenesisState) XXX_DiscardUnknown

func (m *GenesisState) XXX_DiscardUnknown()

func (*GenesisState) XXX_Marshal

func (m *GenesisState) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*GenesisState) XXX_Merge

func (m *GenesisState) XXX_Merge(src proto.Message)

func (*GenesisState) XXX_Size

func (m *GenesisState) XXX_Size() int

func (*GenesisState) XXX_Unmarshal

func (m *GenesisState) XXX_Unmarshal(b []byte) error

type MessageBasedParams

type MessageBasedParams struct {
	// Duration of the voting period.
	VotingPeriod *time.Duration `protobuf:"bytes,1,opt,name=voting_period,json=votingPeriod,proto3,stdduration" json:"voting_period,omitempty"`
	// Minimum percentage of total stake needed to vote for a result to be considered valid.
	Quorum string `protobuf:"bytes,2,opt,name=quorum,proto3" json:"quorum,omitempty"`
	// yes_quorum defines the minimum percentage of Yes votes in quorum for proposal to pass.
	// If zero then the yes_quorum is disabled.
	YesQuorum string `protobuf:"bytes,20,opt,name=yes_quorum,json=yesQuorum,proto3" json:"yes_quorum,omitempty"`
	// Minimum proportion of Yes votes for proposal to pass.
	Threshold string `protobuf:"bytes,3,opt,name=threshold,proto3" json:"threshold,omitempty"`
	// Minimum value of Veto votes to Total votes ratio for proposal to be vetoed.
	VetoThreshold string `protobuf:"bytes,4,opt,name=veto_threshold,json=vetoThreshold,proto3" json:"veto_threshold,omitempty"`
}

MessageBasedParams defines the parameters of specific messages in a proposal. It is used to define the parameters of a proposal that is based on a specific message. Once a message has message based params, it only supports a standard proposal type.

func (*MessageBasedParams) Descriptor

func (*MessageBasedParams) Descriptor() ([]byte, []int)

func (*MessageBasedParams) GetQuorum

func (m *MessageBasedParams) GetQuorum() string

func (*MessageBasedParams) GetThreshold

func (m *MessageBasedParams) GetThreshold() string

func (*MessageBasedParams) GetVetoThreshold

func (m *MessageBasedParams) GetVetoThreshold() string

func (*MessageBasedParams) GetVotingPeriod

func (m *MessageBasedParams) GetVotingPeriod() *time.Duration

func (*MessageBasedParams) GetYesQuorum

func (m *MessageBasedParams) GetYesQuorum() string

func (*MessageBasedParams) Marshal

func (m *MessageBasedParams) Marshal() (dAtA []byte, err error)

func (*MessageBasedParams) MarshalTo

func (m *MessageBasedParams) MarshalTo(dAtA []byte) (int, error)

func (*MessageBasedParams) MarshalToSizedBuffer

func (m *MessageBasedParams) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*MessageBasedParams) ProtoMessage

func (*MessageBasedParams) ProtoMessage()

func (*MessageBasedParams) Reset

func (m *MessageBasedParams) Reset()

func (*MessageBasedParams) Size

func (m *MessageBasedParams) Size() (n int)

func (*MessageBasedParams) String

func (m *MessageBasedParams) String() string

func (*MessageBasedParams) Unmarshal

func (m *MessageBasedParams) Unmarshal(dAtA []byte) error

func (MessageBasedParams) ValidateBasic

func (p MessageBasedParams) ValidateBasic() error

ValidateBasic performs basic validation on governance parameters.

func (*MessageBasedParams) XXX_DiscardUnknown

func (m *MessageBasedParams) XXX_DiscardUnknown()

func (*MessageBasedParams) XXX_Marshal

func (m *MessageBasedParams) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*MessageBasedParams) XXX_Merge

func (m *MessageBasedParams) XXX_Merge(src proto.Message)

func (*MessageBasedParams) XXX_Size

func (m *MessageBasedParams) XXX_Size() int

func (*MessageBasedParams) XXX_Unmarshal

func (m *MessageBasedParams) XXX_Unmarshal(b []byte) error

type MsgCancelProposal

type MsgCancelProposal struct {
	// proposal_id defines the unique id of the proposal.
	ProposalId uint64 `protobuf:"varint,1,opt,name=proposal_id,json=proposalId,proto3" json:"proposal_id"`
	// proposer is the account address of the proposer.
	Proposer string `protobuf:"bytes,2,opt,name=proposer,proto3" json:"proposer,omitempty"`
}

MsgCancelProposal is the Msg/CancelProposal request type.

func NewMsgCancelProposal

func NewMsgCancelProposal(proposalID uint64, proposer string) *MsgCancelProposal

NewMsgCancelProposal creates a new MsgCancelProposal instance.

func (*MsgCancelProposal) Descriptor

func (*MsgCancelProposal) Descriptor() ([]byte, []int)

func (*MsgCancelProposal) GetProposalId

func (m *MsgCancelProposal) GetProposalId() uint64

func (*MsgCancelProposal) GetProposer

func (m *MsgCancelProposal) GetProposer() string

func (*MsgCancelProposal) Marshal

func (m *MsgCancelProposal) Marshal() (dAtA []byte, err error)

func (*MsgCancelProposal) MarshalTo

func (m *MsgCancelProposal) MarshalTo(dAtA []byte) (int, error)

func (*MsgCancelProposal) MarshalToSizedBuffer

func (m *MsgCancelProposal) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*MsgCancelProposal) ProtoMessage

func (*MsgCancelProposal) ProtoMessage()

func (*MsgCancelProposal) Reset

func (m *MsgCancelProposal) Reset()

func (*MsgCancelProposal) Size

func (m *MsgCancelProposal) Size() (n int)

func (*MsgCancelProposal) String

func (m *MsgCancelProposal) String() string

func (*MsgCancelProposal) Unmarshal

func (m *MsgCancelProposal) Unmarshal(dAtA []byte) error

func (*MsgCancelProposal) XXX_DiscardUnknown

func (m *MsgCancelProposal) XXX_DiscardUnknown()

func (*MsgCancelProposal) XXX_Marshal

func (m *MsgCancelProposal) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*MsgCancelProposal) XXX_Merge

func (m *MsgCancelProposal) XXX_Merge(src proto.Message)

func (*MsgCancelProposal) XXX_Size

func (m *MsgCancelProposal) XXX_Size() int

func (*MsgCancelProposal) XXX_Unmarshal

func (m *MsgCancelProposal) XXX_Unmarshal(b []byte) error

type MsgCancelProposalResponse

type MsgCancelProposalResponse struct {
	// proposal_id defines the unique id of the proposal.
	ProposalId uint64 `protobuf:"varint,1,opt,name=proposal_id,json=proposalId,proto3" json:"proposal_id"`
	// canceled_time is the time when proposal is canceled.
	CanceledTime time.Time `protobuf:"bytes,2,opt,name=canceled_time,json=canceledTime,proto3,stdtime" json:"canceled_time"`
	// canceled_height defines the block height at which the proposal is canceled.
	CanceledHeight uint64 `protobuf:"varint,3,opt,name=canceled_height,json=canceledHeight,proto3" json:"canceled_height,omitempty"`
}

MsgCancelProposalResponse defines the response structure for executing a MsgCancelProposal message.

func (*MsgCancelProposalResponse) Descriptor

func (*MsgCancelProposalResponse) Descriptor() ([]byte, []int)

func (*MsgCancelProposalResponse) GetCanceledHeight

func (m *MsgCancelProposalResponse) GetCanceledHeight() uint64

func (*MsgCancelProposalResponse) GetCanceledTime

func (m *MsgCancelProposalResponse) GetCanceledTime() time.Time

func (*MsgCancelProposalResponse) GetProposalId

func (m *MsgCancelProposalResponse) GetProposalId() uint64

func (*MsgCancelProposalResponse) Marshal

func (m *MsgCancelProposalResponse) Marshal() (dAtA []byte, err error)

func (*MsgCancelProposalResponse) MarshalTo

func (m *MsgCancelProposalResponse) MarshalTo(dAtA []byte) (int, error)

func (*MsgCancelProposalResponse) MarshalToSizedBuffer

func (m *MsgCancelProposalResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*MsgCancelProposalResponse) ProtoMessage

func (*MsgCancelProposalResponse) ProtoMessage()

func (*MsgCancelProposalResponse) Reset

func (m *MsgCancelProposalResponse) Reset()

func (*MsgCancelProposalResponse) Size

func (m *MsgCancelProposalResponse) Size() (n int)

func (*MsgCancelProposalResponse) String

func (m *MsgCancelProposalResponse) String() string

func (*MsgCancelProposalResponse) Unmarshal

func (m *MsgCancelProposalResponse) Unmarshal(dAtA []byte) error

func (*MsgCancelProposalResponse) XXX_DiscardUnknown

func (m *MsgCancelProposalResponse) XXX_DiscardUnknown()

func (*MsgCancelProposalResponse) XXX_Marshal

func (m *MsgCancelProposalResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*MsgCancelProposalResponse) XXX_Merge

func (m *MsgCancelProposalResponse) XXX_Merge(src proto.Message)

func (*MsgCancelProposalResponse) XXX_Size

func (m *MsgCancelProposalResponse) XXX_Size() int

func (*MsgCancelProposalResponse) XXX_Unmarshal

func (m *MsgCancelProposalResponse) XXX_Unmarshal(b []byte) error

type MsgClient

type MsgClient interface {
	// SubmitProposal defines a method to create new proposal given the messages.
	SubmitProposal(ctx context.Context, in *MsgSubmitProposal, opts ...grpc.CallOption) (*MsgSubmitProposalResponse, error)
	// ExecLegacyContent defines a Msg to be in included in a MsgSubmitProposal
	// to execute a legacy content-based proposal.
	ExecLegacyContent(ctx context.Context, in *MsgExecLegacyContent, opts ...grpc.CallOption) (*MsgExecLegacyContentResponse, error)
	// Vote defines a method to add a vote on a specific proposal.
	Vote(ctx context.Context, in *MsgVote, opts ...grpc.CallOption) (*MsgVoteResponse, error)
	// VoteWeighted defines a method to add a weighted vote on a specific proposal.
	VoteWeighted(ctx context.Context, in *MsgVoteWeighted, opts ...grpc.CallOption) (*MsgVoteWeightedResponse, error)
	// Deposit defines a method to add deposit on a specific proposal.
	Deposit(ctx context.Context, in *MsgDeposit, opts ...grpc.CallOption) (*MsgDepositResponse, error)
	// UpdateParams defines a governance operation for updating the x/gov module
	// parameters. The authority is defined in the keeper.
	UpdateParams(ctx context.Context, in *MsgUpdateParams, opts ...grpc.CallOption) (*MsgUpdateParamsResponse, error)
	// CancelProposal defines a method to cancel governance proposal
	CancelProposal(ctx context.Context, in *MsgCancelProposal, opts ...grpc.CallOption) (*MsgCancelProposalResponse, error)
	// SubmitMultipleChoiceProposal defines a method to create new multiple choice proposal.
	SubmitMultipleChoiceProposal(ctx context.Context, in *MsgSubmitMultipleChoiceProposal, opts ...grpc.CallOption) (*MsgSubmitMultipleChoiceProposalResponse, error)
	// UpdateMessageParams defines a method to create or update message params when used in a governance proposal.
	UpdateMessageParams(ctx context.Context, in *MsgUpdateMessageParams, opts ...grpc.CallOption) (*MsgUpdateMessageParamsResponse, error)
	// SudoExec defines a method to execute an inner message as the governance module.
	// It permits to execute any message from a proposal, even if they weren't meant to be governance proposals.
	SudoExec(ctx context.Context, in *MsgSudoExec, opts ...grpc.CallOption) (*MsgSudoExecResponse, error)
}

MsgClient is the client API for Msg service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.

func NewMsgClient

func NewMsgClient(cc grpc1.ClientConn) MsgClient

type MsgDeposit

type MsgDeposit struct {
	// proposal_id defines the unique id of the proposal.
	ProposalId uint64 `protobuf:"varint,1,opt,name=proposal_id,json=proposalId,proto3" json:"proposal_id"`
	// depositor defines the deposit addresses from the proposals.
	Depositor string `protobuf:"bytes,2,opt,name=depositor,proto3" json:"depositor,omitempty"`
	// amount to be deposited by depositor.
	Amount []types.Coin `protobuf:"bytes,3,rep,name=amount,proto3" json:"amount"`
}

MsgDeposit defines a message to submit a deposit to an existing proposal.

func NewMsgDeposit

func NewMsgDeposit(depositor string, proposalID uint64, amount sdk.Coins) *MsgDeposit

NewMsgDeposit creates a new MsgDeposit instance

func (*MsgDeposit) Descriptor

func (*MsgDeposit) Descriptor() ([]byte, []int)

func (*MsgDeposit) GetAmount

func (m *MsgDeposit) GetAmount() []types.Coin

func (*MsgDeposit) GetDepositor

func (m *MsgDeposit) GetDepositor() string

func (*MsgDeposit) GetProposalId

func (m *MsgDeposit) GetProposalId() uint64

func (*MsgDeposit) Marshal

func (m *MsgDeposit) Marshal() (dAtA []byte, err error)

func (*MsgDeposit) MarshalTo

func (m *MsgDeposit) MarshalTo(dAtA []byte) (int, error)

func (*MsgDeposit) MarshalToSizedBuffer

func (m *MsgDeposit) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*MsgDeposit) ProtoMessage

func (*MsgDeposit) ProtoMessage()

func (*MsgDeposit) Reset

func (m *MsgDeposit) Reset()

func (*MsgDeposit) Size

func (m *MsgDeposit) Size() (n int)

func (*MsgDeposit) String

func (m *MsgDeposit) String() string

func (*MsgDeposit) Unmarshal

func (m *MsgDeposit) Unmarshal(dAtA []byte) error

func (*MsgDeposit) XXX_DiscardUnknown

func (m *MsgDeposit) XXX_DiscardUnknown()

func (*MsgDeposit) XXX_Marshal

func (m *MsgDeposit) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*MsgDeposit) XXX_Merge

func (m *MsgDeposit) XXX_Merge(src proto.Message)

func (*MsgDeposit) XXX_Size

func (m *MsgDeposit) XXX_Size() int

func (*MsgDeposit) XXX_Unmarshal

func (m *MsgDeposit) XXX_Unmarshal(b []byte) error

type MsgDepositResponse

type MsgDepositResponse struct {
}

MsgDepositResponse defines the Msg/Deposit response type.

func (*MsgDepositResponse) Descriptor

func (*MsgDepositResponse) Descriptor() ([]byte, []int)

func (*MsgDepositResponse) Marshal

func (m *MsgDepositResponse) Marshal() (dAtA []byte, err error)

func (*MsgDepositResponse) MarshalTo

func (m *MsgDepositResponse) MarshalTo(dAtA []byte) (int, error)

func (*MsgDepositResponse) MarshalToSizedBuffer

func (m *MsgDepositResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*MsgDepositResponse) ProtoMessage

func (*MsgDepositResponse) ProtoMessage()

func (*MsgDepositResponse) Reset

func (m *MsgDepositResponse) Reset()

func (*MsgDepositResponse) Size

func (m *MsgDepositResponse) Size() (n int)

func (*MsgDepositResponse) String

func (m *MsgDepositResponse) String() string

func (*MsgDepositResponse) Unmarshal

func (m *MsgDepositResponse) Unmarshal(dAtA []byte) error

func (*MsgDepositResponse) XXX_DiscardUnknown

func (m *MsgDepositResponse) XXX_DiscardUnknown()

func (*MsgDepositResponse) XXX_Marshal

func (m *MsgDepositResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*MsgDepositResponse) XXX_Merge

func (m *MsgDepositResponse) XXX_Merge(src proto.Message)

func (*MsgDepositResponse) XXX_Size

func (m *MsgDepositResponse) XXX_Size() int

func (*MsgDepositResponse) XXX_Unmarshal

func (m *MsgDepositResponse) XXX_Unmarshal(b []byte) error

type MsgExecLegacyContent

type MsgExecLegacyContent struct {
	// content is the proposal's content.
	Content *any.Any `protobuf:"bytes,1,opt,name=content,proto3" json:"content,omitempty"`
	// authority must be the gov module address.
	Authority string `protobuf:"bytes,2,opt,name=authority,proto3" json:"authority,omitempty"`
}

MsgExecLegacyContent is used to wrap the legacy content field into a message. This ensures backwards compatibility with v1beta1.MsgSubmitProposal.

func NewLegacyContent

func NewLegacyContent(content v1beta1.Content, authority string) (*MsgExecLegacyContent, error)

NewLegacyContent creates a new MsgExecLegacyContent from a legacy Content interface.

func NewMsgExecLegacyContent

func NewMsgExecLegacyContent(content *codectypes.Any, authority string) *MsgExecLegacyContent

NewMsgExecLegacyContent creates a new MsgExecLegacyContent instance.

func (*MsgExecLegacyContent) Descriptor

func (*MsgExecLegacyContent) Descriptor() ([]byte, []int)

func (*MsgExecLegacyContent) GetAuthority

func (m *MsgExecLegacyContent) GetAuthority() string

func (*MsgExecLegacyContent) GetContent

func (m *MsgExecLegacyContent) GetContent() *any.Any

func (*MsgExecLegacyContent) Marshal

func (m *MsgExecLegacyContent) Marshal() (dAtA []byte, err error)

func (*MsgExecLegacyContent) MarshalTo

func (m *MsgExecLegacyContent) MarshalTo(dAtA []byte) (int, error)

func (*MsgExecLegacyContent) MarshalToSizedBuffer

func (m *MsgExecLegacyContent) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*MsgExecLegacyContent) ProtoMessage

func (*MsgExecLegacyContent) ProtoMessage()

func (*MsgExecLegacyContent) Reset

func (m *MsgExecLegacyContent) Reset()

func (*MsgExecLegacyContent) Size

func (m *MsgExecLegacyContent) Size() (n int)

func (*MsgExecLegacyContent) String

func (m *MsgExecLegacyContent) String() string

func (*MsgExecLegacyContent) Unmarshal

func (m *MsgExecLegacyContent) Unmarshal(dAtA []byte) error

func (MsgExecLegacyContent) UnpackInterfaces

func (c MsgExecLegacyContent) UnpackInterfaces(unpacker codectypes.AnyUnpacker) error

UnpackInterfaces implements UnpackInterfacesMessage.UnpackInterfaces

func (MsgExecLegacyContent) ValidateBasic

func (c MsgExecLegacyContent) ValidateBasic() error

ValidateBasic implements the sdk.Msg interface.

func (*MsgExecLegacyContent) XXX_DiscardUnknown

func (m *MsgExecLegacyContent) XXX_DiscardUnknown()

func (*MsgExecLegacyContent) XXX_Marshal

func (m *MsgExecLegacyContent) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*MsgExecLegacyContent) XXX_Merge

func (m *MsgExecLegacyContent) XXX_Merge(src proto.Message)

func (*MsgExecLegacyContent) XXX_Size

func (m *MsgExecLegacyContent) XXX_Size() int

func (*MsgExecLegacyContent) XXX_Unmarshal

func (m *MsgExecLegacyContent) XXX_Unmarshal(b []byte) error

type MsgExecLegacyContentResponse

type MsgExecLegacyContentResponse struct {
}

MsgExecLegacyContentResponse defines the Msg/ExecLegacyContent response type.

func (*MsgExecLegacyContentResponse) Descriptor

func (*MsgExecLegacyContentResponse) Descriptor() ([]byte, []int)

func (*MsgExecLegacyContentResponse) Marshal

func (m *MsgExecLegacyContentResponse) Marshal() (dAtA []byte, err error)

func (*MsgExecLegacyContentResponse) MarshalTo

func (m *MsgExecLegacyContentResponse) MarshalTo(dAtA []byte) (int, error)

func (*MsgExecLegacyContentResponse) MarshalToSizedBuffer

func (m *MsgExecLegacyContentResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*MsgExecLegacyContentResponse) ProtoMessage

func (*MsgExecLegacyContentResponse) ProtoMessage()

func (*MsgExecLegacyContentResponse) Reset

func (m *MsgExecLegacyContentResponse) Reset()

func (*MsgExecLegacyContentResponse) Size

func (m *MsgExecLegacyContentResponse) Size() (n int)

func (*MsgExecLegacyContentResponse) String

func (*MsgExecLegacyContentResponse) Unmarshal

func (m *MsgExecLegacyContentResponse) Unmarshal(dAtA []byte) error

func (*MsgExecLegacyContentResponse) XXX_DiscardUnknown

func (m *MsgExecLegacyContentResponse) XXX_DiscardUnknown()

func (*MsgExecLegacyContentResponse) XXX_Marshal

func (m *MsgExecLegacyContentResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*MsgExecLegacyContentResponse) XXX_Merge

func (m *MsgExecLegacyContentResponse) XXX_Merge(src proto.Message)

func (*MsgExecLegacyContentResponse) XXX_Size

func (m *MsgExecLegacyContentResponse) XXX_Size() int

func (*MsgExecLegacyContentResponse) XXX_Unmarshal

func (m *MsgExecLegacyContentResponse) XXX_Unmarshal(b []byte) error

type MsgServer

type MsgServer interface {
	// SubmitProposal defines a method to create new proposal given the messages.
	SubmitProposal(context.Context, *MsgSubmitProposal) (*MsgSubmitProposalResponse, error)
	// ExecLegacyContent defines a Msg to be in included in a MsgSubmitProposal
	// to execute a legacy content-based proposal.
	ExecLegacyContent(context.Context, *MsgExecLegacyContent) (*MsgExecLegacyContentResponse, error)
	// Vote defines a method to add a vote on a specific proposal.
	Vote(context.Context, *MsgVote) (*MsgVoteResponse, error)
	// VoteWeighted defines a method to add a weighted vote on a specific proposal.
	VoteWeighted(context.Context, *MsgVoteWeighted) (*MsgVoteWeightedResponse, error)
	// Deposit defines a method to add deposit on a specific proposal.
	Deposit(context.Context, *MsgDeposit) (*MsgDepositResponse, error)
	// UpdateParams defines a governance operation for updating the x/gov module
	// parameters. The authority is defined in the keeper.
	UpdateParams(context.Context, *MsgUpdateParams) (*MsgUpdateParamsResponse, error)
	// CancelProposal defines a method to cancel governance proposal
	CancelProposal(context.Context, *MsgCancelProposal) (*MsgCancelProposalResponse, error)
	// SubmitMultipleChoiceProposal defines a method to create new multiple choice proposal.
	SubmitMultipleChoiceProposal(context.Context, *MsgSubmitMultipleChoiceProposal) (*MsgSubmitMultipleChoiceProposalResponse, error)
	// UpdateMessageParams defines a method to create or update message params when used in a governance proposal.
	UpdateMessageParams(context.Context, *MsgUpdateMessageParams) (*MsgUpdateMessageParamsResponse, error)
	// SudoExec defines a method to execute an inner message as the governance module.
	// It permits to execute any message from a proposal, even if they weren't meant to be governance proposals.
	SudoExec(context.Context, *MsgSudoExec) (*MsgSudoExecResponse, error)
}

MsgServer is the server API for Msg service.

type MsgSubmitMultipleChoiceProposal

type MsgSubmitMultipleChoiceProposal struct {
	// initial_deposit is the deposit value that must be paid at proposal submission.
	InitialDeposit github_com_cosmos_cosmos_sdk_types.Coins `` /* 147-byte string literal not displayed */
	// proposer is the account address of the proposer.
	Proposer string `protobuf:"bytes,2,opt,name=proposer,proto3" json:"proposer,omitempty"`
	// metadata is any arbitrary metadata attached to the proposal.
	Metadata string `protobuf:"bytes,3,opt,name=metadata,proto3" json:"metadata,omitempty"`
	// title is the title of the proposal.
	Title string `protobuf:"bytes,4,opt,name=title,proto3" json:"title,omitempty"`
	// summary is the summary of the proposal
	Summary string `protobuf:"bytes,5,opt,name=summary,proto3" json:"summary,omitempty"`
	// vote_options defines the vote options for the proposal.
	VoteOptions *ProposalVoteOptions `protobuf:"bytes,6,opt,name=vote_options,json=voteOptions,proto3" json:"vote_options,omitempty"`
}

MsgSubmitMultipleChoiceProposal defines a message to submit a multiple choice proposal.

func NewMultipleChoiceMsgSubmitProposal

func NewMultipleChoiceMsgSubmitProposal(
	initialDeposit sdk.Coins,
	proposer, metadata, title, summary string,
	votingOptions *ProposalVoteOptions,
) (*MsgSubmitMultipleChoiceProposal, error)

NewMsgSubmitMultipleChoiceProposal creates a new MsgSubmitMultipleChoiceProposal.

func (*MsgSubmitMultipleChoiceProposal) Descriptor

func (*MsgSubmitMultipleChoiceProposal) Descriptor() ([]byte, []int)

func (*MsgSubmitMultipleChoiceProposal) GetInitialDeposit

func (*MsgSubmitMultipleChoiceProposal) GetMetadata

func (m *MsgSubmitMultipleChoiceProposal) GetMetadata() string

func (*MsgSubmitMultipleChoiceProposal) GetProposer

func (m *MsgSubmitMultipleChoiceProposal) GetProposer() string

func (*MsgSubmitMultipleChoiceProposal) GetSummary

func (m *MsgSubmitMultipleChoiceProposal) GetSummary() string

func (*MsgSubmitMultipleChoiceProposal) GetTitle

func (*MsgSubmitMultipleChoiceProposal) GetVoteOptions

func (*MsgSubmitMultipleChoiceProposal) Marshal

func (m *MsgSubmitMultipleChoiceProposal) Marshal() (dAtA []byte, err error)

func (*MsgSubmitMultipleChoiceProposal) MarshalTo

func (m *MsgSubmitMultipleChoiceProposal) MarshalTo(dAtA []byte) (int, error)

func (*MsgSubmitMultipleChoiceProposal) MarshalToSizedBuffer

func (m *MsgSubmitMultipleChoiceProposal) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*MsgSubmitMultipleChoiceProposal) ProtoMessage

func (*MsgSubmitMultipleChoiceProposal) ProtoMessage()

func (*MsgSubmitMultipleChoiceProposal) Reset

func (*MsgSubmitMultipleChoiceProposal) Size

func (m *MsgSubmitMultipleChoiceProposal) Size() (n int)

func (*MsgSubmitMultipleChoiceProposal) String

func (*MsgSubmitMultipleChoiceProposal) Unmarshal

func (m *MsgSubmitMultipleChoiceProposal) Unmarshal(dAtA []byte) error

func (*MsgSubmitMultipleChoiceProposal) XXX_DiscardUnknown

func (m *MsgSubmitMultipleChoiceProposal) XXX_DiscardUnknown()

func (*MsgSubmitMultipleChoiceProposal) XXX_Marshal

func (m *MsgSubmitMultipleChoiceProposal) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*MsgSubmitMultipleChoiceProposal) XXX_Merge

func (m *MsgSubmitMultipleChoiceProposal) XXX_Merge(src proto.Message)

func (*MsgSubmitMultipleChoiceProposal) XXX_Size

func (m *MsgSubmitMultipleChoiceProposal) XXX_Size() int

func (*MsgSubmitMultipleChoiceProposal) XXX_Unmarshal

func (m *MsgSubmitMultipleChoiceProposal) XXX_Unmarshal(b []byte) error

type MsgSubmitMultipleChoiceProposalResponse

type MsgSubmitMultipleChoiceProposalResponse struct {
	// proposal_id defines the unique id of the proposal.
	ProposalId uint64 `protobuf:"varint,1,opt,name=proposal_id,json=proposalId,proto3" json:"proposal_id,omitempty"`
}

MsgSubmitMultipleChoiceProposalResponse defines the Msg/SubmitMultipleChoiceProposal response type.

func (*MsgSubmitMultipleChoiceProposalResponse) Descriptor

func (*MsgSubmitMultipleChoiceProposalResponse) Descriptor() ([]byte, []int)

func (*MsgSubmitMultipleChoiceProposalResponse) GetProposalId

func (*MsgSubmitMultipleChoiceProposalResponse) Marshal

func (m *MsgSubmitMultipleChoiceProposalResponse) Marshal() (dAtA []byte, err error)

func (*MsgSubmitMultipleChoiceProposalResponse) MarshalTo

func (m *MsgSubmitMultipleChoiceProposalResponse) MarshalTo(dAtA []byte) (int, error)

func (*MsgSubmitMultipleChoiceProposalResponse) MarshalToSizedBuffer

func (m *MsgSubmitMultipleChoiceProposalResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*MsgSubmitMultipleChoiceProposalResponse) ProtoMessage

func (*MsgSubmitMultipleChoiceProposalResponse) Reset

func (*MsgSubmitMultipleChoiceProposalResponse) Size

func (*MsgSubmitMultipleChoiceProposalResponse) String

func (*MsgSubmitMultipleChoiceProposalResponse) Unmarshal

func (m *MsgSubmitMultipleChoiceProposalResponse) Unmarshal(dAtA []byte) error

func (*MsgSubmitMultipleChoiceProposalResponse) XXX_DiscardUnknown

func (m *MsgSubmitMultipleChoiceProposalResponse) XXX_DiscardUnknown()

func (*MsgSubmitMultipleChoiceProposalResponse) XXX_Marshal

func (m *MsgSubmitMultipleChoiceProposalResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*MsgSubmitMultipleChoiceProposalResponse) XXX_Merge

func (*MsgSubmitMultipleChoiceProposalResponse) XXX_Size

func (*MsgSubmitMultipleChoiceProposalResponse) XXX_Unmarshal

func (m *MsgSubmitMultipleChoiceProposalResponse) XXX_Unmarshal(b []byte) error

type MsgSubmitProposal

type MsgSubmitProposal struct {
	// messages are the arbitrary messages to be executed if proposal passes.
	Messages []*any.Any `protobuf:"bytes,1,rep,name=messages,proto3" json:"messages,omitempty"`
	// initial_deposit is the deposit value that must be paid at proposal submission.
	InitialDeposit github_com_cosmos_cosmos_sdk_types.Coins `` /* 147-byte string literal not displayed */
	// proposer is the account address of the proposer.
	Proposer string `protobuf:"bytes,3,opt,name=proposer,proto3" json:"proposer,omitempty"`
	// metadata is any arbitrary metadata attached to the proposal.
	Metadata string `protobuf:"bytes,4,opt,name=metadata,proto3" json:"metadata,omitempty"`
	// title is the title of the proposal.
	Title string `protobuf:"bytes,5,opt,name=title,proto3" json:"title,omitempty"`
	// summary is the summary of the proposal
	Summary string `protobuf:"bytes,6,opt,name=summary,proto3" json:"summary,omitempty"`
	// expedited defines if the proposal is expedited or not
	// Deprecated: Use the PROPOSAL_TYPE_EXPEDITED proposal type instead.
	// When this field is set and no proposal_type is set, the proposal_type
	// will be set to PROPOSAL_TYPE_EXPEDITED for backwards compatibility.
	Expedited bool `protobuf:"varint,7,opt,name=expedited,proto3" json:"expedited,omitempty"` // Deprecated: Do not use.
	// proposal_type defines the type of proposal
	// When not set defaults to PROPOSAL_TYPE_STANDARD
	ProposalType ProposalType `` /* 130-byte string literal not displayed */
}

MsgSubmitProposal defines an sdk.Msg type that supports submitting arbitrary proposal Content.

func NewMsgSubmitProposal

func NewMsgSubmitProposal(
	messages []sdk.Msg,
	initialDeposit sdk.Coins,
	proposer, metadata, title, summary string,
	proposalType ProposalType,
) (*MsgSubmitProposal, error)

NewMsgSubmitProposal creates a new MsgSubmitProposal.

func (*MsgSubmitProposal) Descriptor

func (*MsgSubmitProposal) Descriptor() ([]byte, []int)

func (*MsgSubmitProposal) GetExpedited deprecated

func (m *MsgSubmitProposal) GetExpedited() bool

Deprecated: Do not use.

func (*MsgSubmitProposal) GetInitialDeposit

func (*MsgSubmitProposal) GetMessages

func (m *MsgSubmitProposal) GetMessages() []*any.Any

func (*MsgSubmitProposal) GetMetadata

func (m *MsgSubmitProposal) GetMetadata() string

func (*MsgSubmitProposal) GetMsgs

func (m *MsgSubmitProposal) GetMsgs() ([]sdk.Msg, error)

GetMsgs unpacks m.Messages Any's into sdk.Msg's

func (*MsgSubmitProposal) GetProposalType

func (m *MsgSubmitProposal) GetProposalType() ProposalType

func (*MsgSubmitProposal) GetProposer

func (m *MsgSubmitProposal) GetProposer() string

func (*MsgSubmitProposal) GetSummary

func (m *MsgSubmitProposal) GetSummary() string

func (*MsgSubmitProposal) GetTitle

func (m *MsgSubmitProposal) GetTitle() string

func (*MsgSubmitProposal) Marshal

func (m *MsgSubmitProposal) Marshal() (dAtA []byte, err error)

func (*MsgSubmitProposal) MarshalTo

func (m *MsgSubmitProposal) MarshalTo(dAtA []byte) (int, error)

func (*MsgSubmitProposal) MarshalToSizedBuffer

func (m *MsgSubmitProposal) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*MsgSubmitProposal) ProtoMessage

func (*MsgSubmitProposal) ProtoMessage()

func (*MsgSubmitProposal) Reset

func (m *MsgSubmitProposal) Reset()

func (*MsgSubmitProposal) SetMsgs

func (m *MsgSubmitProposal) SetMsgs(msgs []sdk.Msg) error

SetMsgs packs sdk.Msg's into m.Messages Any's NOTE: this will overwrite any existing messages

func (*MsgSubmitProposal) Size

func (m *MsgSubmitProposal) Size() (n int)

func (*MsgSubmitProposal) String

func (m *MsgSubmitProposal) String() string

func (*MsgSubmitProposal) Unmarshal

func (m *MsgSubmitProposal) Unmarshal(dAtA []byte) error

func (MsgSubmitProposal) UnpackInterfaces

func (m MsgSubmitProposal) UnpackInterfaces(unpacker codectypes.AnyUnpacker) error

UnpackInterfaces implements UnpackInterfacesMessage.UnpackInterfaces

func (*MsgSubmitProposal) XXX_DiscardUnknown

func (m *MsgSubmitProposal) XXX_DiscardUnknown()

func (*MsgSubmitProposal) XXX_Marshal

func (m *MsgSubmitProposal) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*MsgSubmitProposal) XXX_Merge

func (m *MsgSubmitProposal) XXX_Merge(src proto.Message)

func (*MsgSubmitProposal) XXX_Size

func (m *MsgSubmitProposal) XXX_Size() int

func (*MsgSubmitProposal) XXX_Unmarshal

func (m *MsgSubmitProposal) XXX_Unmarshal(b []byte) error

type MsgSubmitProposalResponse

type MsgSubmitProposalResponse struct {
	// proposal_id defines the unique id of the proposal.
	ProposalId uint64 `protobuf:"varint,1,opt,name=proposal_id,json=proposalId,proto3" json:"proposal_id,omitempty"`
}

MsgSubmitProposalResponse defines the Msg/SubmitProposal response type.

func (*MsgSubmitProposalResponse) Descriptor

func (*MsgSubmitProposalResponse) Descriptor() ([]byte, []int)

func (*MsgSubmitProposalResponse) GetProposalId

func (m *MsgSubmitProposalResponse) GetProposalId() uint64

func (*MsgSubmitProposalResponse) Marshal

func (m *MsgSubmitProposalResponse) Marshal() (dAtA []byte, err error)

func (*MsgSubmitProposalResponse) MarshalTo

func (m *MsgSubmitProposalResponse) MarshalTo(dAtA []byte) (int, error)

func (*MsgSubmitProposalResponse) MarshalToSizedBuffer

func (m *MsgSubmitProposalResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*MsgSubmitProposalResponse) ProtoMessage

func (*MsgSubmitProposalResponse) ProtoMessage()

func (*MsgSubmitProposalResponse) Reset

func (m *MsgSubmitProposalResponse) Reset()

func (*MsgSubmitProposalResponse) Size

func (m *MsgSubmitProposalResponse) Size() (n int)

func (*MsgSubmitProposalResponse) String

func (m *MsgSubmitProposalResponse) String() string

func (*MsgSubmitProposalResponse) Unmarshal

func (m *MsgSubmitProposalResponse) Unmarshal(dAtA []byte) error

func (*MsgSubmitProposalResponse) XXX_DiscardUnknown

func (m *MsgSubmitProposalResponse) XXX_DiscardUnknown()

func (*MsgSubmitProposalResponse) XXX_Marshal

func (m *MsgSubmitProposalResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*MsgSubmitProposalResponse) XXX_Merge

func (m *MsgSubmitProposalResponse) XXX_Merge(src proto.Message)

func (*MsgSubmitProposalResponse) XXX_Size

func (m *MsgSubmitProposalResponse) XXX_Size() int

func (*MsgSubmitProposalResponse) XXX_Unmarshal

func (m *MsgSubmitProposalResponse) XXX_Unmarshal(b []byte) error

type MsgSudoExec

type MsgSudoExec struct {
	// authority is the address that controls the module (defaults to x/gov unless overwritten).
	Authority string `protobuf:"bytes,1,opt,name=authority,proto3" json:"authority,omitempty"`
	// msg is the arbitrary message to be executed.
	Msg *any.Any `protobuf:"bytes,2,opt,name=msg,proto3" json:"msg,omitempty"`
}

MsgSudoExec defines a message to execute an inner message as the governance module.

func (*MsgSudoExec) Descriptor

func (*MsgSudoExec) Descriptor() ([]byte, []int)

func (*MsgSudoExec) GetAuthority

func (m *MsgSudoExec) GetAuthority() string

func (*MsgSudoExec) GetMsg

func (m *MsgSudoExec) GetMsg() *any.Any

func (*MsgSudoExec) GetSudoedMsg

func (msg *MsgSudoExec) GetSudoedMsg() (sdk.Msg, error)

GetSudoedMsg returns the cache values from the MsgSudoExec.Msg if present.

func (*MsgSudoExec) Marshal

func (m *MsgSudoExec) Marshal() (dAtA []byte, err error)

func (*MsgSudoExec) MarshalTo

func (m *MsgSudoExec) MarshalTo(dAtA []byte) (int, error)

func (*MsgSudoExec) MarshalToSizedBuffer

func (m *MsgSudoExec) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*MsgSudoExec) ProtoMessage

func (*MsgSudoExec) ProtoMessage()

func (*MsgSudoExec) Reset

func (m *MsgSudoExec) Reset()

func (*MsgSudoExec) SetSudoedMsg

func (msg *MsgSudoExec) SetSudoedMsg(input sdk.Msg) (*MsgSudoExec, error)

SetSudoedMsg sets a sdk.Msg into the MsgSudoExec.Msg.

func (*MsgSudoExec) Size

func (m *MsgSudoExec) Size() (n int)

func (*MsgSudoExec) String

func (m *MsgSudoExec) String() string

func (*MsgSudoExec) Unmarshal

func (m *MsgSudoExec) Unmarshal(dAtA []byte) error

func (*MsgSudoExec) XXX_DiscardUnknown

func (m *MsgSudoExec) XXX_DiscardUnknown()

func (*MsgSudoExec) XXX_Marshal

func (m *MsgSudoExec) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*MsgSudoExec) XXX_Merge

func (m *MsgSudoExec) XXX_Merge(src proto.Message)

func (*MsgSudoExec) XXX_Size

func (m *MsgSudoExec) XXX_Size() int

func (*MsgSudoExec) XXX_Unmarshal

func (m *MsgSudoExec) XXX_Unmarshal(b []byte) error

type MsgSudoExecResponse

type MsgSudoExecResponse struct {
	// result is the response data from the executed message.
	Result []byte `protobuf:"bytes,1,opt,name=result,proto3" json:"result,omitempty"`
}

MsgSudoExecResponse defines the Msg/SudoExec response type.

func (*MsgSudoExecResponse) Descriptor

func (*MsgSudoExecResponse) Descriptor() ([]byte, []int)

func (*MsgSudoExecResponse) GetResult

func (m *MsgSudoExecResponse) GetResult() []byte

func (*MsgSudoExecResponse) Marshal

func (m *MsgSudoExecResponse) Marshal() (dAtA []byte, err error)

func (*MsgSudoExecResponse) MarshalTo

func (m *MsgSudoExecResponse) MarshalTo(dAtA []byte) (int, error)

func (*MsgSudoExecResponse) MarshalToSizedBuffer

func (m *MsgSudoExecResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*MsgSudoExecResponse) ProtoMessage

func (*MsgSudoExecResponse) ProtoMessage()

func (*MsgSudoExecResponse) Reset

func (m *MsgSudoExecResponse) Reset()

func (*MsgSudoExecResponse) Size

func (m *MsgSudoExecResponse) Size() (n int)

func (*MsgSudoExecResponse) String

func (m *MsgSudoExecResponse) String() string

func (*MsgSudoExecResponse) Unmarshal

func (m *MsgSudoExecResponse) Unmarshal(dAtA []byte) error

func (*MsgSudoExecResponse) XXX_DiscardUnknown

func (m *MsgSudoExecResponse) XXX_DiscardUnknown()

func (*MsgSudoExecResponse) XXX_Marshal

func (m *MsgSudoExecResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*MsgSudoExecResponse) XXX_Merge

func (m *MsgSudoExecResponse) XXX_Merge(src proto.Message)

func (*MsgSudoExecResponse) XXX_Size

func (m *MsgSudoExecResponse) XXX_Size() int

func (*MsgSudoExecResponse) XXX_Unmarshal

func (m *MsgSudoExecResponse) XXX_Unmarshal(b []byte) error

type MsgUpdateMessageParams

type MsgUpdateMessageParams struct {
	// authority is the address that controls the module (defaults to x/gov unless overwritten).
	Authority string `protobuf:"bytes,1,opt,name=authority,proto3" json:"authority,omitempty"`
	// msg_url is the url of the message to be updated.
	MsgUrl string `protobuf:"bytes,2,opt,name=msg_url,json=msgUrl,proto3" json:"msg_url,omitempty"`
	// params are the new params to be set for the message.
	Params *MessageBasedParams `protobuf:"bytes,3,opt,name=params,proto3" json:"params,omitempty"`
}

MsgUpdateMessageParams defines the Msg/UpdateMessageParams response type.

func (*MsgUpdateMessageParams) Descriptor

func (*MsgUpdateMessageParams) Descriptor() ([]byte, []int)

func (*MsgUpdateMessageParams) GetAuthority

func (m *MsgUpdateMessageParams) GetAuthority() string

func (*MsgUpdateMessageParams) GetMsgUrl

func (m *MsgUpdateMessageParams) GetMsgUrl() string

func (*MsgUpdateMessageParams) GetParams

func (*MsgUpdateMessageParams) Marshal

func (m *MsgUpdateMessageParams) Marshal() (dAtA []byte, err error)

func (*MsgUpdateMessageParams) MarshalTo

func (m *MsgUpdateMessageParams) MarshalTo(dAtA []byte) (int, error)

func (*MsgUpdateMessageParams) MarshalToSizedBuffer

func (m *MsgUpdateMessageParams) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*MsgUpdateMessageParams) ProtoMessage

func (*MsgUpdateMessageParams) ProtoMessage()

func (*MsgUpdateMessageParams) Reset

func (m *MsgUpdateMessageParams) Reset()

func (*MsgUpdateMessageParams) Size

func (m *MsgUpdateMessageParams) Size() (n int)

func (*MsgUpdateMessageParams) String

func (m *MsgUpdateMessageParams) String() string

func (*MsgUpdateMessageParams) Unmarshal

func (m *MsgUpdateMessageParams) Unmarshal(dAtA []byte) error

func (*MsgUpdateMessageParams) XXX_DiscardUnknown

func (m *MsgUpdateMessageParams) XXX_DiscardUnknown()

func (*MsgUpdateMessageParams) XXX_Marshal

func (m *MsgUpdateMessageParams) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*MsgUpdateMessageParams) XXX_Merge

func (m *MsgUpdateMessageParams) XXX_Merge(src proto.Message)

func (*MsgUpdateMessageParams) XXX_Size

func (m *MsgUpdateMessageParams) XXX_Size() int

func (*MsgUpdateMessageParams) XXX_Unmarshal

func (m *MsgUpdateMessageParams) XXX_Unmarshal(b []byte) error

type MsgUpdateMessageParamsResponse

type MsgUpdateMessageParamsResponse struct {
}

MsgUpdateMessageParamsResponse defines the Msg/UpdateMessageParams response type.

func (*MsgUpdateMessageParamsResponse) Descriptor

func (*MsgUpdateMessageParamsResponse) Descriptor() ([]byte, []int)

func (*MsgUpdateMessageParamsResponse) Marshal

func (m *MsgUpdateMessageParamsResponse) Marshal() (dAtA []byte, err error)

func (*MsgUpdateMessageParamsResponse) MarshalTo

func (m *MsgUpdateMessageParamsResponse) MarshalTo(dAtA []byte) (int, error)

func (*MsgUpdateMessageParamsResponse) MarshalToSizedBuffer

func (m *MsgUpdateMessageParamsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*MsgUpdateMessageParamsResponse) ProtoMessage

func (*MsgUpdateMessageParamsResponse) ProtoMessage()

func (*MsgUpdateMessageParamsResponse) Reset

func (m *MsgUpdateMessageParamsResponse) Reset()

func (*MsgUpdateMessageParamsResponse) Size

func (m *MsgUpdateMessageParamsResponse) Size() (n int)

func (*MsgUpdateMessageParamsResponse) String

func (*MsgUpdateMessageParamsResponse) Unmarshal

func (m *MsgUpdateMessageParamsResponse) Unmarshal(dAtA []byte) error

func (*MsgUpdateMessageParamsResponse) XXX_DiscardUnknown

func (m *MsgUpdateMessageParamsResponse) XXX_DiscardUnknown()

func (*MsgUpdateMessageParamsResponse) XXX_Marshal

func (m *MsgUpdateMessageParamsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*MsgUpdateMessageParamsResponse) XXX_Merge

func (m *MsgUpdateMessageParamsResponse) XXX_Merge(src proto.Message)

func (*MsgUpdateMessageParamsResponse) XXX_Size

func (m *MsgUpdateMessageParamsResponse) XXX_Size() int

func (*MsgUpdateMessageParamsResponse) XXX_Unmarshal

func (m *MsgUpdateMessageParamsResponse) XXX_Unmarshal(b []byte) error

type MsgUpdateParams

type MsgUpdateParams struct {
	// authority is the address that controls the module (defaults to x/gov unless overwritten).
	Authority string `protobuf:"bytes,1,opt,name=authority,proto3" json:"authority,omitempty"`
	// params defines the x/gov parameters to update.
	//
	// NOTE: All parameters must be supplied.
	Params Params `protobuf:"bytes,2,opt,name=params,proto3" json:"params"`
}

MsgUpdateParams is the Msg/UpdateParams request type.

func (*MsgUpdateParams) Descriptor

func (*MsgUpdateParams) Descriptor() ([]byte, []int)

func (*MsgUpdateParams) GetAuthority

func (m *MsgUpdateParams) GetAuthority() string

func (*MsgUpdateParams) GetParams

func (m *MsgUpdateParams) GetParams() Params

func (*MsgUpdateParams) Marshal

func (m *MsgUpdateParams) Marshal() (dAtA []byte, err error)

func (*MsgUpdateParams) MarshalTo

func (m *MsgUpdateParams) MarshalTo(dAtA []byte) (int, error)

func (*MsgUpdateParams) MarshalToSizedBuffer

func (m *MsgUpdateParams) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*MsgUpdateParams) ProtoMessage

func (*MsgUpdateParams) ProtoMessage()

func (*MsgUpdateParams) Reset

func (m *MsgUpdateParams) Reset()

func (*MsgUpdateParams) Size

func (m *MsgUpdateParams) Size() (n int)

func (*MsgUpdateParams) String

func (m *MsgUpdateParams) String() string

func (*MsgUpdateParams) Unmarshal

func (m *MsgUpdateParams) Unmarshal(dAtA []byte) error

func (*MsgUpdateParams) XXX_DiscardUnknown

func (m *MsgUpdateParams) XXX_DiscardUnknown()

func (*MsgUpdateParams) XXX_Marshal

func (m *MsgUpdateParams) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*MsgUpdateParams) XXX_Merge

func (m *MsgUpdateParams) XXX_Merge(src proto.Message)

func (*MsgUpdateParams) XXX_Size

func (m *MsgUpdateParams) XXX_Size() int

func (*MsgUpdateParams) XXX_Unmarshal

func (m *MsgUpdateParams) XXX_Unmarshal(b []byte) error

type MsgUpdateParamsResponse

type MsgUpdateParamsResponse struct {
}

MsgUpdateParamsResponse defines the response structure for executing a MsgUpdateParams message.

func (*MsgUpdateParamsResponse) Descriptor

func (*MsgUpdateParamsResponse) Descriptor() ([]byte, []int)

func (*MsgUpdateParamsResponse) Marshal

func (m *MsgUpdateParamsResponse) Marshal() (dAtA []byte, err error)

func (*MsgUpdateParamsResponse) MarshalTo

func (m *MsgUpdateParamsResponse) MarshalTo(dAtA []byte) (int, error)

func (*MsgUpdateParamsResponse) MarshalToSizedBuffer

func (m *MsgUpdateParamsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*MsgUpdateParamsResponse) ProtoMessage

func (*MsgUpdateParamsResponse) ProtoMessage()

func (*MsgUpdateParamsResponse) Reset

func (m *MsgUpdateParamsResponse) Reset()

func (*MsgUpdateParamsResponse) Size

func (m *MsgUpdateParamsResponse) Size() (n int)

func (*MsgUpdateParamsResponse) String

func (m *MsgUpdateParamsResponse) String() string

func (*MsgUpdateParamsResponse) Unmarshal

func (m *MsgUpdateParamsResponse) Unmarshal(dAtA []byte) error

func (*MsgUpdateParamsResponse) XXX_DiscardUnknown

func (m *MsgUpdateParamsResponse) XXX_DiscardUnknown()

func (*MsgUpdateParamsResponse) XXX_Marshal

func (m *MsgUpdateParamsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*MsgUpdateParamsResponse) XXX_Merge

func (m *MsgUpdateParamsResponse) XXX_Merge(src proto.Message)

func (*MsgUpdateParamsResponse) XXX_Size

func (m *MsgUpdateParamsResponse) XXX_Size() int

func (*MsgUpdateParamsResponse) XXX_Unmarshal

func (m *MsgUpdateParamsResponse) XXX_Unmarshal(b []byte) error

type MsgVote

type MsgVote struct {
	// proposal_id defines the unique id of the proposal.
	ProposalId uint64 `protobuf:"varint,1,opt,name=proposal_id,json=proposalId,proto3" json:"proposal_id"`
	// voter is the voter address for the proposal.
	Voter string `protobuf:"bytes,2,opt,name=voter,proto3" json:"voter,omitempty"`
	// option defines the vote option.
	Option VoteOption `protobuf:"varint,3,opt,name=option,proto3,enum=cosmos.gov.v1.VoteOption" json:"option,omitempty"`
	// metadata is any arbitrary metadata attached to the Vote.
	Metadata string `protobuf:"bytes,4,opt,name=metadata,proto3" json:"metadata,omitempty"`
}

MsgVote defines a message to cast a vote.

func NewMsgVote

func NewMsgVote(voter string, proposalID uint64, option VoteOption, metadata string) *MsgVote

NewMsgVote creates a message to cast a vote on an active proposal

func (*MsgVote) Descriptor

func (*MsgVote) Descriptor() ([]byte, []int)

func (*MsgVote) GetMetadata

func (m *MsgVote) GetMetadata() string

func (*MsgVote) GetOption

func (m *MsgVote) GetOption() VoteOption

func (*MsgVote) GetProposalId

func (m *MsgVote) GetProposalId() uint64

func (*MsgVote) GetVoter

func (m *MsgVote) GetVoter() string

func (*MsgVote) Marshal

func (m *MsgVote) Marshal() (dAtA []byte, err error)

func (*MsgVote) MarshalTo

func (m *MsgVote) MarshalTo(dAtA []byte) (int, error)

func (*MsgVote) MarshalToSizedBuffer

func (m *MsgVote) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*MsgVote) ProtoMessage

func (*MsgVote) ProtoMessage()

func (*MsgVote) Reset

func (m *MsgVote) Reset()

func (*MsgVote) Size

func (m *MsgVote) Size() (n int)

func (*MsgVote) String

func (m *MsgVote) String() string

func (*MsgVote) Unmarshal

func (m *MsgVote) Unmarshal(dAtA []byte) error

func (*MsgVote) XXX_DiscardUnknown

func (m *MsgVote) XXX_DiscardUnknown()

func (*MsgVote) XXX_Marshal

func (m *MsgVote) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*MsgVote) XXX_Merge

func (m *MsgVote) XXX_Merge(src proto.Message)

func (*MsgVote) XXX_Size

func (m *MsgVote) XXX_Size() int

func (*MsgVote) XXX_Unmarshal

func (m *MsgVote) XXX_Unmarshal(b []byte) error

type MsgVoteResponse

type MsgVoteResponse struct {
}

MsgVoteResponse defines the Msg/Vote response type.

func (*MsgVoteResponse) Descriptor

func (*MsgVoteResponse) Descriptor() ([]byte, []int)

func (*MsgVoteResponse) Marshal

func (m *MsgVoteResponse) Marshal() (dAtA []byte, err error)

func (*MsgVoteResponse) MarshalTo

func (m *MsgVoteResponse) MarshalTo(dAtA []byte) (int, error)

func (*MsgVoteResponse) MarshalToSizedBuffer

func (m *MsgVoteResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*MsgVoteResponse) ProtoMessage

func (*MsgVoteResponse) ProtoMessage()

func (*MsgVoteResponse) Reset

func (m *MsgVoteResponse) Reset()

func (*MsgVoteResponse) Size

func (m *MsgVoteResponse) Size() (n int)

func (*MsgVoteResponse) String

func (m *MsgVoteResponse) String() string

func (*MsgVoteResponse) Unmarshal

func (m *MsgVoteResponse) Unmarshal(dAtA []byte) error

func (*MsgVoteResponse) XXX_DiscardUnknown

func (m *MsgVoteResponse) XXX_DiscardUnknown()

func (*MsgVoteResponse) XXX_Marshal

func (m *MsgVoteResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*MsgVoteResponse) XXX_Merge

func (m *MsgVoteResponse) XXX_Merge(src proto.Message)

func (*MsgVoteResponse) XXX_Size

func (m *MsgVoteResponse) XXX_Size() int

func (*MsgVoteResponse) XXX_Unmarshal

func (m *MsgVoteResponse) XXX_Unmarshal(b []byte) error

type MsgVoteWeighted

type MsgVoteWeighted struct {
	// proposal_id defines the unique id of the proposal.
	ProposalId uint64 `protobuf:"varint,1,opt,name=proposal_id,json=proposalId,proto3" json:"proposal_id"`
	// voter is the voter address for the proposal.
	Voter string `protobuf:"bytes,2,opt,name=voter,proto3" json:"voter,omitempty"`
	// options defines the weighted vote options.
	Options []*WeightedVoteOption `protobuf:"bytes,3,rep,name=options,proto3" json:"options,omitempty"`
	// metadata is any arbitrary metadata attached to the VoteWeighted.
	Metadata string `protobuf:"bytes,4,opt,name=metadata,proto3" json:"metadata,omitempty"`
}

MsgVoteWeighted defines a message to cast a vote.

func NewMsgVoteWeighted

func NewMsgVoteWeighted(voter string, proposalID uint64, options WeightedVoteOptions, metadata string) *MsgVoteWeighted

NewMsgVoteWeighted creates a message to cast a vote on an active proposal

func (*MsgVoteWeighted) Descriptor

func (*MsgVoteWeighted) Descriptor() ([]byte, []int)

func (*MsgVoteWeighted) GetMetadata

func (m *MsgVoteWeighted) GetMetadata() string

func (*MsgVoteWeighted) GetOptions

func (m *MsgVoteWeighted) GetOptions() []*WeightedVoteOption

func (*MsgVoteWeighted) GetProposalId

func (m *MsgVoteWeighted) GetProposalId() uint64

func (*MsgVoteWeighted) GetVoter

func (m *MsgVoteWeighted) GetVoter() string

func (*MsgVoteWeighted) Marshal

func (m *MsgVoteWeighted) Marshal() (dAtA []byte, err error)

func (*MsgVoteWeighted) MarshalTo

func (m *MsgVoteWeighted) MarshalTo(dAtA []byte) (int, error)

func (*MsgVoteWeighted) MarshalToSizedBuffer

func (m *MsgVoteWeighted) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*MsgVoteWeighted) ProtoMessage

func (*MsgVoteWeighted) ProtoMessage()

func (*MsgVoteWeighted) Reset

func (m *MsgVoteWeighted) Reset()

func (*MsgVoteWeighted) Size

func (m *MsgVoteWeighted) Size() (n int)

func (*MsgVoteWeighted) String

func (m *MsgVoteWeighted) String() string

func (*MsgVoteWeighted) Unmarshal

func (m *MsgVoteWeighted) Unmarshal(dAtA []byte) error

func (*MsgVoteWeighted) XXX_DiscardUnknown

func (m *MsgVoteWeighted) XXX_DiscardUnknown()

func (*MsgVoteWeighted) XXX_Marshal

func (m *MsgVoteWeighted) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*MsgVoteWeighted) XXX_Merge

func (m *MsgVoteWeighted) XXX_Merge(src proto.Message)

func (*MsgVoteWeighted) XXX_Size

func (m *MsgVoteWeighted) XXX_Size() int

func (*MsgVoteWeighted) XXX_Unmarshal

func (m *MsgVoteWeighted) XXX_Unmarshal(b []byte) error

type MsgVoteWeightedResponse

type MsgVoteWeightedResponse struct {
}

MsgVoteWeightedResponse defines the Msg/VoteWeighted response type.

func (*MsgVoteWeightedResponse) Descriptor

func (*MsgVoteWeightedResponse) Descriptor() ([]byte, []int)

func (*MsgVoteWeightedResponse) Marshal

func (m *MsgVoteWeightedResponse) Marshal() (dAtA []byte, err error)

func (*MsgVoteWeightedResponse) MarshalTo

func (m *MsgVoteWeightedResponse) MarshalTo(dAtA []byte) (int, error)

func (*MsgVoteWeightedResponse) MarshalToSizedBuffer

func (m *MsgVoteWeightedResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*MsgVoteWeightedResponse) ProtoMessage

func (*MsgVoteWeightedResponse) ProtoMessage()

func (*MsgVoteWeightedResponse) Reset

func (m *MsgVoteWeightedResponse) Reset()

func (*MsgVoteWeightedResponse) Size

func (m *MsgVoteWeightedResponse) Size() (n int)

func (*MsgVoteWeightedResponse) String

func (m *MsgVoteWeightedResponse) String() string

func (*MsgVoteWeightedResponse) Unmarshal

func (m *MsgVoteWeightedResponse) Unmarshal(dAtA []byte) error

func (*MsgVoteWeightedResponse) XXX_DiscardUnknown

func (m *MsgVoteWeightedResponse) XXX_DiscardUnknown()

func (*MsgVoteWeightedResponse) XXX_Marshal

func (m *MsgVoteWeightedResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*MsgVoteWeightedResponse) XXX_Merge

func (m *MsgVoteWeightedResponse) XXX_Merge(src proto.Message)

func (*MsgVoteWeightedResponse) XXX_Size

func (m *MsgVoteWeightedResponse) XXX_Size() int

func (*MsgVoteWeightedResponse) XXX_Unmarshal

func (m *MsgVoteWeightedResponse) XXX_Unmarshal(b []byte) error

type Params

type Params struct {
	// Minimum deposit for a proposal to enter voting period.
	MinDeposit []types.Coin `protobuf:"bytes,1,rep,name=min_deposit,json=minDeposit,proto3" json:"min_deposit"`
	// Maximum period for stake holders to deposit on a proposal. Initial value: 2
	// months.
	MaxDepositPeriod *time.Duration `protobuf:"bytes,2,opt,name=max_deposit_period,json=maxDepositPeriod,proto3,stdduration" json:"max_deposit_period,omitempty"`
	// Duration of the voting period.
	VotingPeriod *time.Duration `protobuf:"bytes,3,opt,name=voting_period,json=votingPeriod,proto3,stdduration" json:"voting_period,omitempty"`
	// Minimum percentage of total stake needed to vote for a result to be
	// considered valid.
	Quorum string `protobuf:"bytes,4,opt,name=quorum,proto3" json:"quorum,omitempty"`
	// Minimum proportion of Yes votes for proposal to pass. Default value: 0.5.
	Threshold string `protobuf:"bytes,5,opt,name=threshold,proto3" json:"threshold,omitempty"`
	// Minimum value of Veto votes to Total votes ratio for proposal to be
	// vetoed. Default value: 1/3.
	VetoThreshold string `protobuf:"bytes,6,opt,name=veto_threshold,json=vetoThreshold,proto3" json:"veto_threshold,omitempty"`
	// The ratio representing the proportion of the deposit value that must be paid at proposal submission.
	MinInitialDepositRatio string `` /* 131-byte string literal not displayed */
	// The cancel ratio which will not be returned back to the depositors when a proposal is cancelled.
	ProposalCancelRatio string `protobuf:"bytes,8,opt,name=proposal_cancel_ratio,json=proposalCancelRatio,proto3" json:"proposal_cancel_ratio,omitempty"`
	// The address which will receive (proposal_cancel_ratio * deposit) proposal deposits.
	// If empty, the (proposal_cancel_ratio * deposit) proposal deposits will be burned.
	ProposalCancelDest string `protobuf:"bytes,9,opt,name=proposal_cancel_dest,json=proposalCancelDest,proto3" json:"proposal_cancel_dest,omitempty"`
	// Duration of the voting period of an expedited proposal.
	ExpeditedVotingPeriod *time.Duration `` /* 139-byte string literal not displayed */
	// Minimum proportion of Yes votes for proposal to pass. Default value: 0.67.
	ExpeditedThreshold string `protobuf:"bytes,11,opt,name=expedited_threshold,json=expeditedThreshold,proto3" json:"expedited_threshold,omitempty"`
	// Minimum expedited deposit for a proposal to enter voting period.
	ExpeditedMinDeposit []types.Coin `protobuf:"bytes,12,rep,name=expedited_min_deposit,json=expeditedMinDeposit,proto3" json:"expedited_min_deposit"`
	// burn deposits if a proposal does not meet quorum
	BurnVoteQuorum bool `protobuf:"varint,13,opt,name=burn_vote_quorum,json=burnVoteQuorum,proto3" json:"burn_vote_quorum,omitempty"`
	// burn deposits if the proposal does not enter voting period
	BurnProposalDepositPrevote bool `` /* 145-byte string literal not displayed */
	// burn deposits if quorum with vote type no_veto is met
	BurnVoteVeto bool `protobuf:"varint,15,opt,name=burn_vote_veto,json=burnVoteVeto,proto3" json:"burn_vote_veto,omitempty"`
	// The ratio representing the proportion of the deposit value minimum that must be met when making a deposit.
	// Default value: 0.01. Meaning that for a chain with a min_deposit of 100stake, a deposit of 1stake would be
	// required.
	MinDepositRatio string `protobuf:"bytes,16,opt,name=min_deposit_ratio,json=minDepositRatio,proto3" json:"min_deposit_ratio,omitempty"`
	// proposal_cancel_max_period defines how far in the voting period a proposer can cancel a proposal.
	// If the proposal is cancelled before the max cancel period, the deposit will be returned/burn to the
	// depositors, according to the proposal_cancel_ratio and proposal_cancel_dest parameters.
	// After the max cancel period, the proposal cannot be cancelled anymore.
	ProposalCancelMaxPeriod string `` /* 135-byte string literal not displayed */
	// optimistic_authorized_addresses is an optional governance parameter that limits the authorized accounts than can
	// submit optimistic proposals
	OptimisticAuthorizedAddresses []string `` /* 151-byte string literal not displayed */
	// optimistic rejected threshold defines at which percentage of NO votes, the optimistic proposal should fail and be
	// converted to a standard proposal. The threshold is expressed as a percentage of the total bonded tokens.
	OptimisticRejectedThreshold string `` /* 145-byte string literal not displayed */
	// yes_quorum defines the minimum percentage of Yes votes in quorum for proposal to pass.
	// Default value: 0 (disabled).
	YesQuorum string `protobuf:"bytes,20,opt,name=yes_quorum,json=yesQuorum,proto3" json:"yes_quorum,omitempty"`
	// Minimum percentage of total stake needed to vote for a result to be
	// considered valid for an expedited proposal.
	ExpeditedQuorum string `protobuf:"bytes,21,opt,name=expedited_quorum,json=expeditedQuorum,proto3" json:"expedited_quorum,omitempty"`
}

Params defines the parameters for the x/gov module.

func DefaultParams

func DefaultParams() Params

DefaultParams returns the default governance params

func NewParams

func NewParams(
	minDeposit, expeditedminDeposit sdk.Coins,
	maxDepositPeriod, votingPeriod, expeditedVotingPeriod time.Duration,
	quorum, yesQuorum, expeditedQuorum, threshold, expeditedThreshold, vetoThreshold, minInitialDepositRatio, proposalCancelRatio, proposalCancelDest, proposalMaxCancelVotingPeriod string,
	burnProposalDeposit, burnVoteQuorum, burnVoteVeto bool,
	minDepositRatio, optimisticRejectedThreshold string,
	optimisticAuthorizedAddresses []string,
) Params

NewParams creates a new Params instance with given values.

func (*Params) Descriptor

func (*Params) Descriptor() ([]byte, []int)

func (*Params) GetBurnProposalDepositPrevote

func (m *Params) GetBurnProposalDepositPrevote() bool

func (*Params) GetBurnVoteQuorum

func (m *Params) GetBurnVoteQuorum() bool

func (*Params) GetBurnVoteVeto

func (m *Params) GetBurnVoteVeto() bool

func (*Params) GetExpeditedMinDeposit

func (m *Params) GetExpeditedMinDeposit() []types.Coin

func (*Params) GetExpeditedQuorum

func (m *Params) GetExpeditedQuorum() string

func (*Params) GetExpeditedThreshold

func (m *Params) GetExpeditedThreshold() string

func (*Params) GetExpeditedVotingPeriod

func (m *Params) GetExpeditedVotingPeriod() *time.Duration

func (*Params) GetMaxDepositPeriod

func (m *Params) GetMaxDepositPeriod() *time.Duration

func (*Params) GetMinDeposit

func (m *Params) GetMinDeposit() []types.Coin

func (*Params) GetMinDepositRatio

func (m *Params) GetMinDepositRatio() string

func (*Params) GetMinInitialDepositRatio

func (m *Params) GetMinInitialDepositRatio() string

func (*Params) GetOptimisticAuthorizedAddresses

func (m *Params) GetOptimisticAuthorizedAddresses() []string

func (*Params) GetOptimisticRejectedThreshold

func (m *Params) GetOptimisticRejectedThreshold() string

func (*Params) GetProposalCancelDest

func (m *Params) GetProposalCancelDest() string

func (*Params) GetProposalCancelMaxPeriod

func (m *Params) GetProposalCancelMaxPeriod() string

func (*Params) GetProposalCancelRatio

func (m *Params) GetProposalCancelRatio() string

func (*Params) GetQuorum

func (m *Params) GetQuorum() string

func (*Params) GetThreshold

func (m *Params) GetThreshold() string

func (*Params) GetVetoThreshold

func (m *Params) GetVetoThreshold() string

func (*Params) GetVotingPeriod

func (m *Params) GetVotingPeriod() *time.Duration

func (*Params) GetYesQuorum

func (m *Params) GetYesQuorum() string

func (*Params) Marshal

func (m *Params) Marshal() (dAtA []byte, err error)

func (*Params) MarshalTo

func (m *Params) MarshalTo(dAtA []byte) (int, error)

func (*Params) MarshalToSizedBuffer

func (m *Params) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*Params) ProtoMessage

func (*Params) ProtoMessage()

func (*Params) Reset

func (m *Params) Reset()

func (*Params) Size

func (m *Params) Size() (n int)

func (*Params) String

func (m *Params) String() string

func (*Params) Unmarshal

func (m *Params) Unmarshal(dAtA []byte) error

func (Params) ValidateBasic

func (p Params) ValidateBasic(addressCodec address.Codec) error

ValidateBasic performs basic validation on governance parameters.

func (*Params) XXX_DiscardUnknown

func (m *Params) XXX_DiscardUnknown()

func (*Params) XXX_Marshal

func (m *Params) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Params) XXX_Merge

func (m *Params) XXX_Merge(src proto.Message)

func (*Params) XXX_Size

func (m *Params) XXX_Size() int

func (*Params) XXX_Unmarshal

func (m *Params) XXX_Unmarshal(b []byte) error

type Proposal

type Proposal struct {
	// id defines the unique id of the proposal.
	Id uint64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
	// messages are the arbitrary messages to be executed if the proposal passes.
	Messages []*any.Any `protobuf:"bytes,2,rep,name=messages,proto3" json:"messages,omitempty"`
	// status defines the proposal status.
	Status ProposalStatus `protobuf:"varint,3,opt,name=status,proto3,enum=cosmos.gov.v1.ProposalStatus" json:"status,omitempty"`
	// final_tally_result is the final tally result of the proposal. When
	// querying a proposal via gRPC, this field is not populated until the
	// proposal's voting period has ended.
	FinalTallyResult *TallyResult `protobuf:"bytes,4,opt,name=final_tally_result,json=finalTallyResult,proto3" json:"final_tally_result,omitempty"`
	// submit_time is the time of proposal submission.
	SubmitTime *time.Time `protobuf:"bytes,5,opt,name=submit_time,json=submitTime,proto3,stdtime" json:"submit_time,omitempty"`
	// deposit_end_time is the end time for deposition.
	DepositEndTime *time.Time `protobuf:"bytes,6,opt,name=deposit_end_time,json=depositEndTime,proto3,stdtime" json:"deposit_end_time,omitempty"`
	// total_deposit is the total deposit on the proposal.
	TotalDeposit []types.Coin `protobuf:"bytes,7,rep,name=total_deposit,json=totalDeposit,proto3" json:"total_deposit"`
	// voting_start_time is the starting time to vote on a proposal.
	VotingStartTime *time.Time `protobuf:"bytes,8,opt,name=voting_start_time,json=votingStartTime,proto3,stdtime" json:"voting_start_time,omitempty"`
	// voting_end_time is the end time of voting on a proposal.
	VotingEndTime *time.Time `protobuf:"bytes,9,opt,name=voting_end_time,json=votingEndTime,proto3,stdtime" json:"voting_end_time,omitempty"`
	// metadata is any arbitrary metadata attached to the proposal.
	// the recommended format of the metadata is to be found here:
	// https://docs.cosmos.network/v0.47/modules/gov#proposal-3
	Metadata string `protobuf:"bytes,10,opt,name=metadata,proto3" json:"metadata,omitempty"`
	// title is the title of the proposal
	Title string `protobuf:"bytes,11,opt,name=title,proto3" json:"title,omitempty"`
	// summary is a short summary of the proposal
	Summary string `protobuf:"bytes,12,opt,name=summary,proto3" json:"summary,omitempty"`
	// proposer is the address of the proposal sumbitter
	Proposer string `protobuf:"bytes,13,opt,name=proposer,proto3" json:"proposer,omitempty"`
	// expedited defines if the proposal is expedited
	//
	// Deprecated: Use ProposalType instead.
	Expedited bool `protobuf:"varint,14,opt,name=expedited,proto3" json:"expedited,omitempty"` // Deprecated: Do not use.
	// failed_reason defines the reason why the proposal failed
	FailedReason string `protobuf:"bytes,15,opt,name=failed_reason,json=failedReason,proto3" json:"failed_reason,omitempty"`
	// proposal_type defines the type of the proposal
	ProposalType ProposalType `` /* 131-byte string literal not displayed */
}

Proposal defines the core field members of a governance proposal.

func NewProposal

func NewProposal(messages []sdk.Msg, id uint64, submitTime, depositEndTime time.Time, metadata, title, summary, proposer string, proposalType ProposalType) (Proposal, error)

NewProposal creates a new Proposal instance

func (*Proposal) Descriptor

func (*Proposal) Descriptor() ([]byte, []int)

func (*Proposal) GetDepositEndTime

func (m *Proposal) GetDepositEndTime() *time.Time

func (*Proposal) GetExpedited deprecated

func (m *Proposal) GetExpedited() bool

Deprecated: Do not use.

func (*Proposal) GetFailedReason

func (m *Proposal) GetFailedReason() string

func (*Proposal) GetFinalTallyResult

func (m *Proposal) GetFinalTallyResult() *TallyResult

func (*Proposal) GetId

func (m *Proposal) GetId() uint64

func (*Proposal) GetMessages

func (m *Proposal) GetMessages() []*any.Any

func (*Proposal) GetMetadata

func (m *Proposal) GetMetadata() string

func (Proposal) GetMinDepositFromParams

func (p Proposal) GetMinDepositFromParams(params Params) sdk.Coins

GetMinDepositFromParams returns min expedited deposit from the gov params if the proposal is expedited. Otherwise, returns the regular min deposit from gov params.

func (Proposal) GetMsgs

func (p Proposal) GetMsgs() ([]sdk.Msg, error)

GetMessages returns the proposal messages

func (*Proposal) GetProposalType

func (m *Proposal) GetProposalType() ProposalType

func (*Proposal) GetProposer

func (m *Proposal) GetProposer() string

func (*Proposal) GetStatus

func (m *Proposal) GetStatus() ProposalStatus

func (*Proposal) GetSubmitTime

func (m *Proposal) GetSubmitTime() *time.Time

func (*Proposal) GetSummary

func (m *Proposal) GetSummary() string

func (*Proposal) GetTitle

func (m *Proposal) GetTitle() string

func (*Proposal) GetTotalDeposit

func (m *Proposal) GetTotalDeposit() []types.Coin

func (*Proposal) GetVotingEndTime

func (m *Proposal) GetVotingEndTime() *time.Time

func (*Proposal) GetVotingStartTime

func (m *Proposal) GetVotingStartTime() *time.Time

func (*Proposal) Marshal

func (m *Proposal) Marshal() (dAtA []byte, err error)

func (*Proposal) MarshalTo

func (m *Proposal) MarshalTo(dAtA []byte) (int, error)

func (*Proposal) MarshalToSizedBuffer

func (m *Proposal) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*Proposal) ProtoMessage

func (*Proposal) ProtoMessage()

func (*Proposal) Reset

func (m *Proposal) Reset()

func (*Proposal) Size

func (m *Proposal) Size() (n int)

func (*Proposal) String

func (m *Proposal) String() string

func (*Proposal) Unmarshal

func (m *Proposal) Unmarshal(dAtA []byte) error

func (Proposal) UnpackInterfaces

func (p Proposal) UnpackInterfaces(unpacker codectypes.AnyUnpacker) error

UnpackInterfaces implements UnpackInterfacesMessage.UnpackInterfaces

func (*Proposal) XXX_DiscardUnknown

func (m *Proposal) XXX_DiscardUnknown()

func (*Proposal) XXX_Marshal

func (m *Proposal) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Proposal) XXX_Merge

func (m *Proposal) XXX_Merge(src proto.Message)

func (*Proposal) XXX_Size

func (m *Proposal) XXX_Size() int

func (*Proposal) XXX_Unmarshal

func (m *Proposal) XXX_Unmarshal(b []byte) error

type ProposalQueue

type ProposalQueue []uint64

ProposalQueue defines a queue for proposal ids

type ProposalStatus

type ProposalStatus int32

ProposalStatus enumerates the valid statuses of a proposal.

const (
	// PROPOSAL_STATUS_UNSPECIFIED defines the default proposal status.
	ProposalStatus_PROPOSAL_STATUS_UNSPECIFIED ProposalStatus = 0
	// PROPOSAL_STATUS_DEPOSIT_PERIOD defines a proposal status during the deposit
	// period.
	ProposalStatus_PROPOSAL_STATUS_DEPOSIT_PERIOD ProposalStatus = 1
	// PROPOSAL_STATUS_VOTING_PERIOD defines a proposal status during the voting
	// period.
	ProposalStatus_PROPOSAL_STATUS_VOTING_PERIOD ProposalStatus = 2
	// PROPOSAL_STATUS_PASSED defines a proposal status of a proposal that has
	// passed.
	ProposalStatus_PROPOSAL_STATUS_PASSED ProposalStatus = 3
	// PROPOSAL_STATUS_REJECTED defines a proposal status of a proposal that has
	// been rejected.
	ProposalStatus_PROPOSAL_STATUS_REJECTED ProposalStatus = 4
	// PROPOSAL_STATUS_FAILED defines a proposal status of a proposal that has
	// failed.
	ProposalStatus_PROPOSAL_STATUS_FAILED ProposalStatus = 5
)

func ProposalStatusFromString

func ProposalStatusFromString(str string) (ProposalStatus, error)

ProposalStatusFromString turns a string into a ProposalStatus

func (ProposalStatus) EnumDescriptor

func (ProposalStatus) EnumDescriptor() ([]byte, []int)

func (ProposalStatus) Format

func (status ProposalStatus) Format(s fmt.State, verb rune)

Format implements the fmt.Formatter interface.

func (ProposalStatus) String

func (x ProposalStatus) String() string

type ProposalType

type ProposalType int32

ProposalType enumerates the valid proposal types. All proposal types are v1.Proposal which have different voting periods or tallying logic.

const (
	// PROPOSAL_TYPE_UNSPECIFIED defines no proposal type, which fallback to PROPOSAL_TYPE_STANDARD.
	ProposalType_PROPOSAL_TYPE_UNSPECIFIED ProposalType = 0
	// PROPOSAL_TYPE_STANDARD defines the type for a standard proposal.
	ProposalType_PROPOSAL_TYPE_STANDARD ProposalType = 1
	// PROPOSAL_TYPE_MULTIPLE_CHOICE defines the type for a multiple choice proposal.
	ProposalType_PROPOSAL_TYPE_MULTIPLE_CHOICE ProposalType = 2
	// PROPOSAL_TYPE_OPTIMISTIC defines the type for an optimistic proposal.
	ProposalType_PROPOSAL_TYPE_OPTIMISTIC ProposalType = 3
	// PROPOSAL_TYPE_EXPEDITED defines the type for an expedited proposal.
	ProposalType_PROPOSAL_TYPE_EXPEDITED ProposalType = 4
)

func (ProposalType) EnumDescriptor

func (ProposalType) EnumDescriptor() ([]byte, []int)

func (ProposalType) String

func (x ProposalType) String() string

type ProposalVoteOptions

type ProposalVoteOptions struct {
	// option_one is the first option of the proposal
	OptionOne string `protobuf:"bytes,1,opt,name=option_one,json=optionOne,proto3" json:"option_one,omitempty"`
	// option_two is the second option of the proposal
	OptionTwo string `protobuf:"bytes,2,opt,name=option_two,json=optionTwo,proto3" json:"option_two,omitempty"`
	// option_three is the third option of the proposal
	OptionThree string `protobuf:"bytes,3,opt,name=option_three,json=optionThree,proto3" json:"option_three,omitempty"`
	// option_four is the fourth option of the proposal
	OptionFour string `protobuf:"bytes,4,opt,name=option_four,json=optionFour,proto3" json:"option_four,omitempty"`
	// option_spam is always present for all proposals.
	OptionSpam string `protobuf:"bytes,5,opt,name=option_spam,json=optionSpam,proto3" json:"option_spam,omitempty"`
}

ProposalVoteOptions defines the stringified vote options for proposals. This allows to support multiple choice options for a given proposal.

func (*ProposalVoteOptions) Descriptor

func (*ProposalVoteOptions) Descriptor() ([]byte, []int)

func (*ProposalVoteOptions) GetOptionFour

func (m *ProposalVoteOptions) GetOptionFour() string

func (*ProposalVoteOptions) GetOptionOne

func (m *ProposalVoteOptions) GetOptionOne() string

func (*ProposalVoteOptions) GetOptionSpam

func (m *ProposalVoteOptions) GetOptionSpam() string

func (*ProposalVoteOptions) GetOptionThree

func (m *ProposalVoteOptions) GetOptionThree() string

func (*ProposalVoteOptions) GetOptionTwo

func (m *ProposalVoteOptions) GetOptionTwo() string

func (*ProposalVoteOptions) Marshal

func (m *ProposalVoteOptions) Marshal() (dAtA []byte, err error)

func (*ProposalVoteOptions) MarshalTo

func (m *ProposalVoteOptions) MarshalTo(dAtA []byte) (int, error)

func (*ProposalVoteOptions) MarshalToSizedBuffer

func (m *ProposalVoteOptions) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*ProposalVoteOptions) ProtoMessage

func (*ProposalVoteOptions) ProtoMessage()

func (*ProposalVoteOptions) Reset

func (m *ProposalVoteOptions) Reset()

func (*ProposalVoteOptions) Size

func (m *ProposalVoteOptions) Size() (n int)

func (*ProposalVoteOptions) String

func (m *ProposalVoteOptions) String() string

func (*ProposalVoteOptions) Unmarshal

func (m *ProposalVoteOptions) Unmarshal(dAtA []byte) error

func (*ProposalVoteOptions) XXX_DiscardUnknown

func (m *ProposalVoteOptions) XXX_DiscardUnknown()

func (*ProposalVoteOptions) XXX_Marshal

func (m *ProposalVoteOptions) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*ProposalVoteOptions) XXX_Merge

func (m *ProposalVoteOptions) XXX_Merge(src proto.Message)

func (*ProposalVoteOptions) XXX_Size

func (m *ProposalVoteOptions) XXX_Size() int

func (*ProposalVoteOptions) XXX_Unmarshal

func (m *ProposalVoteOptions) XXX_Unmarshal(b []byte) error

type Proposals

type Proposals []*Proposal

Proposals is an array of proposal

func (Proposals) String

func (p Proposals) String() string

String implements stringer interface

func (Proposals) UnpackInterfaces

func (p Proposals) UnpackInterfaces(unpacker codectypes.AnyUnpacker) error

UnpackInterfaces implements UnpackInterfacesMessage.UnpackInterfaces

type QueryClient

type QueryClient interface {
	// Constitution queries the chain's constitution.
	Constitution(ctx context.Context, in *QueryConstitutionRequest, opts ...grpc.CallOption) (*QueryConstitutionResponse, error)
	// Proposal queries proposal details based on ProposalID.
	Proposal(ctx context.Context, in *QueryProposalRequest, opts ...grpc.CallOption) (*QueryProposalResponse, error)
	// Proposals queries all proposals based on given status.
	Proposals(ctx context.Context, in *QueryProposalsRequest, opts ...grpc.CallOption) (*QueryProposalsResponse, error)
	// Vote queries voted information based on proposalID, voterAddr.
	Vote(ctx context.Context, in *QueryVoteRequest, opts ...grpc.CallOption) (*QueryVoteResponse, error)
	// Votes queries votes of a given proposal.
	Votes(ctx context.Context, in *QueryVotesRequest, opts ...grpc.CallOption) (*QueryVotesResponse, error)
	// Params queries all parameters of the gov module.
	Params(ctx context.Context, in *QueryParamsRequest, opts ...grpc.CallOption) (*QueryParamsResponse, error)
	// Deposit queries single deposit information based on proposalID, depositAddr.
	Deposit(ctx context.Context, in *QueryDepositRequest, opts ...grpc.CallOption) (*QueryDepositResponse, error)
	// Deposits queries all deposits of a single proposal.
	Deposits(ctx context.Context, in *QueryDepositsRequest, opts ...grpc.CallOption) (*QueryDepositsResponse, error)
	// TallyResult queries the tally of a proposal vote.
	TallyResult(ctx context.Context, in *QueryTallyResultRequest, opts ...grpc.CallOption) (*QueryTallyResultResponse, error)
	// ProposalVoteOptions queries the valid voting options for a proposal.
	ProposalVoteOptions(ctx context.Context, in *QueryProposalVoteOptionsRequest, opts ...grpc.CallOption) (*QueryProposalVoteOptionsResponse, error)
	// MessageBasedParams queries the message specific governance params based on a msg url.
	MessageBasedParams(ctx context.Context, in *QueryMessageBasedParamsRequest, opts ...grpc.CallOption) (*QueryMessageBasedParamsResponse, error)
}

QueryClient is the client API for Query service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.

func NewQueryClient

func NewQueryClient(cc grpc1.ClientConn) QueryClient

type QueryConstitutionRequest

type QueryConstitutionRequest struct {
}

QueryConstitutionRequest is the request type for the Query/Constitution RPC method

func (*QueryConstitutionRequest) Descriptor

func (*QueryConstitutionRequest) Descriptor() ([]byte, []int)

func (*QueryConstitutionRequest) Marshal

func (m *QueryConstitutionRequest) Marshal() (dAtA []byte, err error)

func (*QueryConstitutionRequest) MarshalTo

func (m *QueryConstitutionRequest) MarshalTo(dAtA []byte) (int, error)

func (*QueryConstitutionRequest) MarshalToSizedBuffer

func (m *QueryConstitutionRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*QueryConstitutionRequest) ProtoMessage

func (*QueryConstitutionRequest) ProtoMessage()

func (*QueryConstitutionRequest) Reset

func (m *QueryConstitutionRequest) Reset()

func (*QueryConstitutionRequest) Size

func (m *QueryConstitutionRequest) Size() (n int)

func (*QueryConstitutionRequest) String

func (m *QueryConstitutionRequest) String() string

func (*QueryConstitutionRequest) Unmarshal

func (m *QueryConstitutionRequest) Unmarshal(dAtA []byte) error

func (*QueryConstitutionRequest) XXX_DiscardUnknown

func (m *QueryConstitutionRequest) XXX_DiscardUnknown()

func (*QueryConstitutionRequest) XXX_Marshal

func (m *QueryConstitutionRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*QueryConstitutionRequest) XXX_Merge

func (m *QueryConstitutionRequest) XXX_Merge(src proto.Message)

func (*QueryConstitutionRequest) XXX_Size

func (m *QueryConstitutionRequest) XXX_Size() int

func (*QueryConstitutionRequest) XXX_Unmarshal

func (m *QueryConstitutionRequest) XXX_Unmarshal(b []byte) error

type QueryConstitutionResponse

type QueryConstitutionResponse struct {
	Constitution string `protobuf:"bytes,1,opt,name=constitution,proto3" json:"constitution,omitempty"`
}

QueryConstitutionResponse is the response type for the Query/Constitution RPC method

func (*QueryConstitutionResponse) Descriptor

func (*QueryConstitutionResponse) Descriptor() ([]byte, []int)

func (*QueryConstitutionResponse) GetConstitution

func (m *QueryConstitutionResponse) GetConstitution() string

func (*QueryConstitutionResponse) Marshal

func (m *QueryConstitutionResponse) Marshal() (dAtA []byte, err error)

func (*QueryConstitutionResponse) MarshalTo

func (m *QueryConstitutionResponse) MarshalTo(dAtA []byte) (int, error)

func (*QueryConstitutionResponse) MarshalToSizedBuffer

func (m *QueryConstitutionResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*QueryConstitutionResponse) ProtoMessage

func (*QueryConstitutionResponse) ProtoMessage()

func (*QueryConstitutionResponse) Reset

func (m *QueryConstitutionResponse) Reset()

func (*QueryConstitutionResponse) Size

func (m *QueryConstitutionResponse) Size() (n int)

func (*QueryConstitutionResponse) String

func (m *QueryConstitutionResponse) String() string

func (*QueryConstitutionResponse) Unmarshal

func (m *QueryConstitutionResponse) Unmarshal(dAtA []byte) error

func (*QueryConstitutionResponse) XXX_DiscardUnknown

func (m *QueryConstitutionResponse) XXX_DiscardUnknown()

func (*QueryConstitutionResponse) XXX_Marshal

func (m *QueryConstitutionResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*QueryConstitutionResponse) XXX_Merge

func (m *QueryConstitutionResponse) XXX_Merge(src proto.Message)

func (*QueryConstitutionResponse) XXX_Size

func (m *QueryConstitutionResponse) XXX_Size() int

func (*QueryConstitutionResponse) XXX_Unmarshal

func (m *QueryConstitutionResponse) XXX_Unmarshal(b []byte) error

type QueryDepositRequest

type QueryDepositRequest struct {
	// proposal_id defines the unique id of the proposal.
	ProposalId uint64 `protobuf:"varint,1,opt,name=proposal_id,json=proposalId,proto3" json:"proposal_id,omitempty"`
	// depositor defines the deposit addresses from the proposals.
	Depositor string `protobuf:"bytes,2,opt,name=depositor,proto3" json:"depositor,omitempty"`
}

QueryDepositRequest is the request type for the Query/Deposit RPC method.

func (*QueryDepositRequest) Descriptor

func (*QueryDepositRequest) Descriptor() ([]byte, []int)

func (*QueryDepositRequest) GetDepositor

func (m *QueryDepositRequest) GetDepositor() string

func (*QueryDepositRequest) GetProposalId

func (m *QueryDepositRequest) GetProposalId() uint64

func (*QueryDepositRequest) Marshal

func (m *QueryDepositRequest) Marshal() (dAtA []byte, err error)

func (*QueryDepositRequest) MarshalTo

func (m *QueryDepositRequest) MarshalTo(dAtA []byte) (int, error)

func (*QueryDepositRequest) MarshalToSizedBuffer

func (m *QueryDepositRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*QueryDepositRequest) ProtoMessage

func (*QueryDepositRequest) ProtoMessage()

func (*QueryDepositRequest) Reset

func (m *QueryDepositRequest) Reset()

func (*QueryDepositRequest) Size

func (m *QueryDepositRequest) Size() (n int)

func (*QueryDepositRequest) String

func (m *QueryDepositRequest) String() string

func (*QueryDepositRequest) Unmarshal

func (m *QueryDepositRequest) Unmarshal(dAtA []byte) error

func (*QueryDepositRequest) XXX_DiscardUnknown

func (m *QueryDepositRequest) XXX_DiscardUnknown()

func (*QueryDepositRequest) XXX_Marshal

func (m *QueryDepositRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*QueryDepositRequest) XXX_Merge

func (m *QueryDepositRequest) XXX_Merge(src proto.Message)

func (*QueryDepositRequest) XXX_Size

func (m *QueryDepositRequest) XXX_Size() int

func (*QueryDepositRequest) XXX_Unmarshal

func (m *QueryDepositRequest) XXX_Unmarshal(b []byte) error

type QueryDepositResponse

type QueryDepositResponse struct {
	// deposit defines the requested deposit.
	Deposit *Deposit `protobuf:"bytes,1,opt,name=deposit,proto3" json:"deposit,omitempty"`
}

QueryDepositResponse is the response type for the Query/Deposit RPC method.

func (*QueryDepositResponse) Descriptor

func (*QueryDepositResponse) Descriptor() ([]byte, []int)

func (*QueryDepositResponse) GetDeposit

func (m *QueryDepositResponse) GetDeposit() *Deposit

func (*QueryDepositResponse) Marshal

func (m *QueryDepositResponse) Marshal() (dAtA []byte, err error)

func (*QueryDepositResponse) MarshalTo

func (m *QueryDepositResponse) MarshalTo(dAtA []byte) (int, error)

func (*QueryDepositResponse) MarshalToSizedBuffer

func (m *QueryDepositResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*QueryDepositResponse) ProtoMessage

func (*QueryDepositResponse) ProtoMessage()

func (*QueryDepositResponse) Reset

func (m *QueryDepositResponse) Reset()

func (*QueryDepositResponse) Size

func (m *QueryDepositResponse) Size() (n int)

func (*QueryDepositResponse) String

func (m *QueryDepositResponse) String() string

func (*QueryDepositResponse) Unmarshal

func (m *QueryDepositResponse) Unmarshal(dAtA []byte) error

func (*QueryDepositResponse) XXX_DiscardUnknown

func (m *QueryDepositResponse) XXX_DiscardUnknown()

func (*QueryDepositResponse) XXX_Marshal

func (m *QueryDepositResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*QueryDepositResponse) XXX_Merge

func (m *QueryDepositResponse) XXX_Merge(src proto.Message)

func (*QueryDepositResponse) XXX_Size

func (m *QueryDepositResponse) XXX_Size() int

func (*QueryDepositResponse) XXX_Unmarshal

func (m *QueryDepositResponse) XXX_Unmarshal(b []byte) error

type QueryDepositsRequest

type QueryDepositsRequest struct {
	// proposal_id defines the unique id of the proposal.
	ProposalId uint64 `protobuf:"varint,1,opt,name=proposal_id,json=proposalId,proto3" json:"proposal_id,omitempty"`
	// pagination defines an optional pagination for the request.
	Pagination *query.PageRequest `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"`
}

QueryDepositsRequest is the request type for the Query/Deposits RPC method.

func (*QueryDepositsRequest) Descriptor

func (*QueryDepositsRequest) Descriptor() ([]byte, []int)

func (*QueryDepositsRequest) GetPagination

func (m *QueryDepositsRequest) GetPagination() *query.PageRequest

func (*QueryDepositsRequest) GetProposalId

func (m *QueryDepositsRequest) GetProposalId() uint64

func (*QueryDepositsRequest) Marshal

func (m *QueryDepositsRequest) Marshal() (dAtA []byte, err error)

func (*QueryDepositsRequest) MarshalTo

func (m *QueryDepositsRequest) MarshalTo(dAtA []byte) (int, error)

func (*QueryDepositsRequest) MarshalToSizedBuffer

func (m *QueryDepositsRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*QueryDepositsRequest) ProtoMessage

func (*QueryDepositsRequest) ProtoMessage()

func (*QueryDepositsRequest) Reset

func (m *QueryDepositsRequest) Reset()

func (*QueryDepositsRequest) Size

func (m *QueryDepositsRequest) Size() (n int)

func (*QueryDepositsRequest) String

func (m *QueryDepositsRequest) String() string

func (*QueryDepositsRequest) Unmarshal

func (m *QueryDepositsRequest) Unmarshal(dAtA []byte) error

func (*QueryDepositsRequest) XXX_DiscardUnknown

func (m *QueryDepositsRequest) XXX_DiscardUnknown()

func (*QueryDepositsRequest) XXX_Marshal

func (m *QueryDepositsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*QueryDepositsRequest) XXX_Merge

func (m *QueryDepositsRequest) XXX_Merge(src proto.Message)

func (*QueryDepositsRequest) XXX_Size

func (m *QueryDepositsRequest) XXX_Size() int

func (*QueryDepositsRequest) XXX_Unmarshal

func (m *QueryDepositsRequest) XXX_Unmarshal(b []byte) error

type QueryDepositsResponse

type QueryDepositsResponse struct {
	// deposits defines the requested deposits.
	Deposits []*Deposit `protobuf:"bytes,1,rep,name=deposits,proto3" json:"deposits,omitempty"`
	// pagination defines the pagination in the response.
	Pagination *query.PageResponse `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"`
}

QueryDepositsResponse is the response type for the Query/Deposits RPC method.

func (*QueryDepositsResponse) Descriptor

func (*QueryDepositsResponse) Descriptor() ([]byte, []int)

func (*QueryDepositsResponse) GetDeposits

func (m *QueryDepositsResponse) GetDeposits() []*Deposit

func (*QueryDepositsResponse) GetPagination

func (m *QueryDepositsResponse) GetPagination() *query.PageResponse

func (*QueryDepositsResponse) Marshal

func (m *QueryDepositsResponse) Marshal() (dAtA []byte, err error)

func (*QueryDepositsResponse) MarshalTo

func (m *QueryDepositsResponse) MarshalTo(dAtA []byte) (int, error)

func (*QueryDepositsResponse) MarshalToSizedBuffer

func (m *QueryDepositsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*QueryDepositsResponse) ProtoMessage

func (*QueryDepositsResponse) ProtoMessage()

func (*QueryDepositsResponse) Reset

func (m *QueryDepositsResponse) Reset()

func (*QueryDepositsResponse) Size

func (m *QueryDepositsResponse) Size() (n int)

func (*QueryDepositsResponse) String

func (m *QueryDepositsResponse) String() string

func (*QueryDepositsResponse) Unmarshal

func (m *QueryDepositsResponse) Unmarshal(dAtA []byte) error

func (*QueryDepositsResponse) XXX_DiscardUnknown

func (m *QueryDepositsResponse) XXX_DiscardUnknown()

func (*QueryDepositsResponse) XXX_Marshal

func (m *QueryDepositsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*QueryDepositsResponse) XXX_Merge

func (m *QueryDepositsResponse) XXX_Merge(src proto.Message)

func (*QueryDepositsResponse) XXX_Size

func (m *QueryDepositsResponse) XXX_Size() int

func (*QueryDepositsResponse) XXX_Unmarshal

func (m *QueryDepositsResponse) XXX_Unmarshal(b []byte) error

type QueryMessageBasedParamsRequest

type QueryMessageBasedParamsRequest struct {
	MsgUrl string `protobuf:"bytes,1,opt,name=msg_url,json=msgUrl,proto3" json:"msg_url,omitempty"`
}

QueryMessageBasedParamsRequest is the request type for the Query/MessageBasedParams RPC method.

func (*QueryMessageBasedParamsRequest) Descriptor

func (*QueryMessageBasedParamsRequest) Descriptor() ([]byte, []int)

func (*QueryMessageBasedParamsRequest) GetMsgUrl

func (m *QueryMessageBasedParamsRequest) GetMsgUrl() string

func (*QueryMessageBasedParamsRequest) Marshal

func (m *QueryMessageBasedParamsRequest) Marshal() (dAtA []byte, err error)

func (*QueryMessageBasedParamsRequest) MarshalTo

func (m *QueryMessageBasedParamsRequest) MarshalTo(dAtA []byte) (int, error)

func (*QueryMessageBasedParamsRequest) MarshalToSizedBuffer

func (m *QueryMessageBasedParamsRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*QueryMessageBasedParamsRequest) ProtoMessage

func (*QueryMessageBasedParamsRequest) ProtoMessage()

func (*QueryMessageBasedParamsRequest) Reset

func (m *QueryMessageBasedParamsRequest) Reset()

func (*QueryMessageBasedParamsRequest) Size

func (m *QueryMessageBasedParamsRequest) Size() (n int)

func (*QueryMessageBasedParamsRequest) String

func (*QueryMessageBasedParamsRequest) Unmarshal

func (m *QueryMessageBasedParamsRequest) Unmarshal(dAtA []byte) error

func (*QueryMessageBasedParamsRequest) XXX_DiscardUnknown

func (m *QueryMessageBasedParamsRequest) XXX_DiscardUnknown()

func (*QueryMessageBasedParamsRequest) XXX_Marshal

func (m *QueryMessageBasedParamsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*QueryMessageBasedParamsRequest) XXX_Merge

func (m *QueryMessageBasedParamsRequest) XXX_Merge(src proto.Message)

func (*QueryMessageBasedParamsRequest) XXX_Size

func (m *QueryMessageBasedParamsRequest) XXX_Size() int

func (*QueryMessageBasedParamsRequest) XXX_Unmarshal

func (m *QueryMessageBasedParamsRequest) XXX_Unmarshal(b []byte) error

type QueryMessageBasedParamsResponse

type QueryMessageBasedParamsResponse struct {
	Params *MessageBasedParams `protobuf:"bytes,1,opt,name=params,proto3" json:"params,omitempty"`
}

QueryMessageBasedParamsResponse is the response for the Query/MessageBasedParams RPC method.

func (*QueryMessageBasedParamsResponse) Descriptor

func (*QueryMessageBasedParamsResponse) Descriptor() ([]byte, []int)

func (*QueryMessageBasedParamsResponse) GetParams

func (*QueryMessageBasedParamsResponse) Marshal

func (m *QueryMessageBasedParamsResponse) Marshal() (dAtA []byte, err error)

func (*QueryMessageBasedParamsResponse) MarshalTo

func (m *QueryMessageBasedParamsResponse) MarshalTo(dAtA []byte) (int, error)

func (*QueryMessageBasedParamsResponse) MarshalToSizedBuffer

func (m *QueryMessageBasedParamsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*QueryMessageBasedParamsResponse) ProtoMessage

func (*QueryMessageBasedParamsResponse) ProtoMessage()

func (*QueryMessageBasedParamsResponse) Reset

func (*QueryMessageBasedParamsResponse) Size

func (m *QueryMessageBasedParamsResponse) Size() (n int)

func (*QueryMessageBasedParamsResponse) String

func (*QueryMessageBasedParamsResponse) Unmarshal

func (m *QueryMessageBasedParamsResponse) Unmarshal(dAtA []byte) error

func (*QueryMessageBasedParamsResponse) XXX_DiscardUnknown

func (m *QueryMessageBasedParamsResponse) XXX_DiscardUnknown()

func (*QueryMessageBasedParamsResponse) XXX_Marshal

func (m *QueryMessageBasedParamsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*QueryMessageBasedParamsResponse) XXX_Merge

func (m *QueryMessageBasedParamsResponse) XXX_Merge(src proto.Message)

func (*QueryMessageBasedParamsResponse) XXX_Size

func (m *QueryMessageBasedParamsResponse) XXX_Size() int

func (*QueryMessageBasedParamsResponse) XXX_Unmarshal

func (m *QueryMessageBasedParamsResponse) XXX_Unmarshal(b []byte) error

type QueryParamsRequest

type QueryParamsRequest struct {
	// params_type defines which parameters to query for, can be one of "voting",
	// "tallying" or "deposit".
	// Deprecated: all params are stored in Params.
	ParamsType string `protobuf:"bytes,1,opt,name=params_type,json=paramsType,proto3" json:"params_type,omitempty"` // Deprecated: Do not use.
}

QueryParamsRequest is the request type for the Query/Params RPC method.

func (*QueryParamsRequest) Descriptor

func (*QueryParamsRequest) Descriptor() ([]byte, []int)

func (*QueryParamsRequest) GetParamsType deprecated

func (m *QueryParamsRequest) GetParamsType() string

Deprecated: Do not use.

func (*QueryParamsRequest) Marshal

func (m *QueryParamsRequest) Marshal() (dAtA []byte, err error)

func (*QueryParamsRequest) MarshalTo

func (m *QueryParamsRequest) MarshalTo(dAtA []byte) (int, error)

func (*QueryParamsRequest) MarshalToSizedBuffer

func (m *QueryParamsRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*QueryParamsRequest) ProtoMessage

func (*QueryParamsRequest) ProtoMessage()

func (*QueryParamsRequest) Reset

func (m *QueryParamsRequest) Reset()

func (*QueryParamsRequest) Size

func (m *QueryParamsRequest) Size() (n int)

func (*QueryParamsRequest) String

func (m *QueryParamsRequest) String() string

func (*QueryParamsRequest) Unmarshal

func (m *QueryParamsRequest) Unmarshal(dAtA []byte) error

func (*QueryParamsRequest) XXX_DiscardUnknown

func (m *QueryParamsRequest) XXX_DiscardUnknown()

func (*QueryParamsRequest) XXX_Marshal

func (m *QueryParamsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*QueryParamsRequest) XXX_Merge

func (m *QueryParamsRequest) XXX_Merge(src proto.Message)

func (*QueryParamsRequest) XXX_Size

func (m *QueryParamsRequest) XXX_Size() int

func (*QueryParamsRequest) XXX_Unmarshal

func (m *QueryParamsRequest) XXX_Unmarshal(b []byte) error

type QueryParamsResponse

type QueryParamsResponse struct {
	// Deprecated: Prefer to use `params` instead.
	// voting_params defines the parameters related to voting.
	VotingParams *VotingParams `protobuf:"bytes,1,opt,name=voting_params,json=votingParams,proto3" json:"voting_params,omitempty"` // Deprecated: Do not use.
	// Deprecated: Prefer to use `params` instead.
	// deposit_params defines the parameters related to deposit.
	DepositParams *DepositParams `protobuf:"bytes,2,opt,name=deposit_params,json=depositParams,proto3" json:"deposit_params,omitempty"` // Deprecated: Do not use.
	// Deprecated: Prefer to use `params` instead.
	// tally_params defines the parameters related to tally.
	TallyParams *TallyParams `protobuf:"bytes,3,opt,name=tally_params,json=tallyParams,proto3" json:"tally_params,omitempty"` // Deprecated: Do not use.
	// params defines all the parameters of x/gov module.
	Params *Params `protobuf:"bytes,4,opt,name=params,proto3" json:"params,omitempty"`
}

QueryParamsResponse is the response type for the Query/Params RPC method.

func (*QueryParamsResponse) Descriptor

func (*QueryParamsResponse) Descriptor() ([]byte, []int)

func (*QueryParamsResponse) GetDepositParams deprecated

func (m *QueryParamsResponse) GetDepositParams() *DepositParams

Deprecated: Do not use.

func (*QueryParamsResponse) GetParams

func (m *QueryParamsResponse) GetParams() *Params

func (*QueryParamsResponse) GetTallyParams deprecated

func (m *QueryParamsResponse) GetTallyParams() *TallyParams

Deprecated: Do not use.

func (*QueryParamsResponse) GetVotingParams deprecated

func (m *QueryParamsResponse) GetVotingParams() *VotingParams

Deprecated: Do not use.

func (*QueryParamsResponse) Marshal

func (m *QueryParamsResponse) Marshal() (dAtA []byte, err error)

func (*QueryParamsResponse) MarshalTo

func (m *QueryParamsResponse) MarshalTo(dAtA []byte) (int, error)

func (*QueryParamsResponse) MarshalToSizedBuffer

func (m *QueryParamsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*QueryParamsResponse) ProtoMessage

func (*QueryParamsResponse) ProtoMessage()

func (*QueryParamsResponse) Reset

func (m *QueryParamsResponse) Reset()

func (*QueryParamsResponse) Size

func (m *QueryParamsResponse) Size() (n int)

func (*QueryParamsResponse) String

func (m *QueryParamsResponse) String() string

func (*QueryParamsResponse) Unmarshal

func (m *QueryParamsResponse) Unmarshal(dAtA []byte) error

func (*QueryParamsResponse) XXX_DiscardUnknown

func (m *QueryParamsResponse) XXX_DiscardUnknown()

func (*QueryParamsResponse) XXX_Marshal

func (m *QueryParamsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*QueryParamsResponse) XXX_Merge

func (m *QueryParamsResponse) XXX_Merge(src proto.Message)

func (*QueryParamsResponse) XXX_Size

func (m *QueryParamsResponse) XXX_Size() int

func (*QueryParamsResponse) XXX_Unmarshal

func (m *QueryParamsResponse) XXX_Unmarshal(b []byte) error

type QueryProposalRequest

type QueryProposalRequest struct {
	// proposal_id defines the unique id of the proposal.
	ProposalId uint64 `protobuf:"varint,1,opt,name=proposal_id,json=proposalId,proto3" json:"proposal_id,omitempty"`
}

QueryProposalRequest is the request type for the Query/Proposal RPC method.

func (*QueryProposalRequest) Descriptor

func (*QueryProposalRequest) Descriptor() ([]byte, []int)

func (*QueryProposalRequest) GetProposalId

func (m *QueryProposalRequest) GetProposalId() uint64

func (*QueryProposalRequest) Marshal

func (m *QueryProposalRequest) Marshal() (dAtA []byte, err error)

func (*QueryProposalRequest) MarshalTo

func (m *QueryProposalRequest) MarshalTo(dAtA []byte) (int, error)

func (*QueryProposalRequest) MarshalToSizedBuffer

func (m *QueryProposalRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*QueryProposalRequest) ProtoMessage

func (*QueryProposalRequest) ProtoMessage()

func (*QueryProposalRequest) Reset

func (m *QueryProposalRequest) Reset()

func (*QueryProposalRequest) Size

func (m *QueryProposalRequest) Size() (n int)

func (*QueryProposalRequest) String

func (m *QueryProposalRequest) String() string

func (*QueryProposalRequest) Unmarshal

func (m *QueryProposalRequest) Unmarshal(dAtA []byte) error

func (*QueryProposalRequest) XXX_DiscardUnknown

func (m *QueryProposalRequest) XXX_DiscardUnknown()

func (*QueryProposalRequest) XXX_Marshal

func (m *QueryProposalRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*QueryProposalRequest) XXX_Merge

func (m *QueryProposalRequest) XXX_Merge(src proto.Message)

func (*QueryProposalRequest) XXX_Size

func (m *QueryProposalRequest) XXX_Size() int

func (*QueryProposalRequest) XXX_Unmarshal

func (m *QueryProposalRequest) XXX_Unmarshal(b []byte) error

type QueryProposalResponse

type QueryProposalResponse struct {
	// proposal is the requested governance proposal.
	Proposal *Proposal `protobuf:"bytes,1,opt,name=proposal,proto3" json:"proposal,omitempty"`
}

QueryProposalResponse is the response type for the Query/Proposal RPC method.

func (*QueryProposalResponse) Descriptor

func (*QueryProposalResponse) Descriptor() ([]byte, []int)

func (*QueryProposalResponse) GetProposal

func (m *QueryProposalResponse) GetProposal() *Proposal

func (*QueryProposalResponse) Marshal

func (m *QueryProposalResponse) Marshal() (dAtA []byte, err error)

func (*QueryProposalResponse) MarshalTo

func (m *QueryProposalResponse) MarshalTo(dAtA []byte) (int, error)

func (*QueryProposalResponse) MarshalToSizedBuffer

func (m *QueryProposalResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*QueryProposalResponse) ProtoMessage

func (*QueryProposalResponse) ProtoMessage()

func (*QueryProposalResponse) Reset

func (m *QueryProposalResponse) Reset()

func (*QueryProposalResponse) Size

func (m *QueryProposalResponse) Size() (n int)

func (*QueryProposalResponse) String

func (m *QueryProposalResponse) String() string

func (*QueryProposalResponse) Unmarshal

func (m *QueryProposalResponse) Unmarshal(dAtA []byte) error

func (*QueryProposalResponse) XXX_DiscardUnknown

func (m *QueryProposalResponse) XXX_DiscardUnknown()

func (*QueryProposalResponse) XXX_Marshal

func (m *QueryProposalResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*QueryProposalResponse) XXX_Merge

func (m *QueryProposalResponse) XXX_Merge(src proto.Message)

func (*QueryProposalResponse) XXX_Size

func (m *QueryProposalResponse) XXX_Size() int

func (*QueryProposalResponse) XXX_Unmarshal

func (m *QueryProposalResponse) XXX_Unmarshal(b []byte) error

type QueryProposalVoteOptionsRequest

type QueryProposalVoteOptionsRequest struct {
	// proposal_id defines the unique id of the proposal.
	ProposalId uint64 `protobuf:"varint,1,opt,name=proposal_id,json=proposalId,proto3" json:"proposal_id,omitempty"`
}

QueryProposalVoteOptionsRequest is the request type for the Query/ProposalVoteOptions RPC method.

func (*QueryProposalVoteOptionsRequest) Descriptor

func (*QueryProposalVoteOptionsRequest) Descriptor() ([]byte, []int)

func (*QueryProposalVoteOptionsRequest) GetProposalId

func (m *QueryProposalVoteOptionsRequest) GetProposalId() uint64

func (*QueryProposalVoteOptionsRequest) Marshal

func (m *QueryProposalVoteOptionsRequest) Marshal() (dAtA []byte, err error)

func (*QueryProposalVoteOptionsRequest) MarshalTo

func (m *QueryProposalVoteOptionsRequest) MarshalTo(dAtA []byte) (int, error)

func (*QueryProposalVoteOptionsRequest) MarshalToSizedBuffer

func (m *QueryProposalVoteOptionsRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*QueryProposalVoteOptionsRequest) ProtoMessage

func (*QueryProposalVoteOptionsRequest) ProtoMessage()

func (*QueryProposalVoteOptionsRequest) Reset

func (*QueryProposalVoteOptionsRequest) Size

func (m *QueryProposalVoteOptionsRequest) Size() (n int)

func (*QueryProposalVoteOptionsRequest) String

func (*QueryProposalVoteOptionsRequest) Unmarshal

func (m *QueryProposalVoteOptionsRequest) Unmarshal(dAtA []byte) error

func (*QueryProposalVoteOptionsRequest) XXX_DiscardUnknown

func (m *QueryProposalVoteOptionsRequest) XXX_DiscardUnknown()

func (*QueryProposalVoteOptionsRequest) XXX_Marshal

func (m *QueryProposalVoteOptionsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*QueryProposalVoteOptionsRequest) XXX_Merge

func (m *QueryProposalVoteOptionsRequest) XXX_Merge(src proto.Message)

func (*QueryProposalVoteOptionsRequest) XXX_Size

func (m *QueryProposalVoteOptionsRequest) XXX_Size() int

func (*QueryProposalVoteOptionsRequest) XXX_Unmarshal

func (m *QueryProposalVoteOptionsRequest) XXX_Unmarshal(b []byte) error

type QueryProposalVoteOptionsResponse

type QueryProposalVoteOptionsResponse struct {
	// vote_options defines the valid voting options for a proposal.
	VoteOptions *ProposalVoteOptions `protobuf:"bytes,1,opt,name=vote_options,json=voteOptions,proto3" json:"vote_options,omitempty"`
}

QueryProposalVoteOptionsResponse is the response type for the Query/ProposalVoteOptions RPC method.

func (*QueryProposalVoteOptionsResponse) Descriptor

func (*QueryProposalVoteOptionsResponse) Descriptor() ([]byte, []int)

func (*QueryProposalVoteOptionsResponse) GetVoteOptions

func (*QueryProposalVoteOptionsResponse) Marshal

func (m *QueryProposalVoteOptionsResponse) Marshal() (dAtA []byte, err error)

func (*QueryProposalVoteOptionsResponse) MarshalTo

func (m *QueryProposalVoteOptionsResponse) MarshalTo(dAtA []byte) (int, error)

func (*QueryProposalVoteOptionsResponse) MarshalToSizedBuffer

func (m *QueryProposalVoteOptionsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*QueryProposalVoteOptionsResponse) ProtoMessage

func (*QueryProposalVoteOptionsResponse) ProtoMessage()

func (*QueryProposalVoteOptionsResponse) Reset

func (*QueryProposalVoteOptionsResponse) Size

func (m *QueryProposalVoteOptionsResponse) Size() (n int)

func (*QueryProposalVoteOptionsResponse) String

func (*QueryProposalVoteOptionsResponse) Unmarshal

func (m *QueryProposalVoteOptionsResponse) Unmarshal(dAtA []byte) error

func (*QueryProposalVoteOptionsResponse) XXX_DiscardUnknown

func (m *QueryProposalVoteOptionsResponse) XXX_DiscardUnknown()

func (*QueryProposalVoteOptionsResponse) XXX_Marshal

func (m *QueryProposalVoteOptionsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*QueryProposalVoteOptionsResponse) XXX_Merge

func (*QueryProposalVoteOptionsResponse) XXX_Size

func (m *QueryProposalVoteOptionsResponse) XXX_Size() int

func (*QueryProposalVoteOptionsResponse) XXX_Unmarshal

func (m *QueryProposalVoteOptionsResponse) XXX_Unmarshal(b []byte) error

type QueryProposalsRequest

type QueryProposalsRequest struct {
	// proposal_status defines the status of the proposals.
	ProposalStatus ProposalStatus `` /* 138-byte string literal not displayed */
	// voter defines the voter address for the proposals.
	Voter string `protobuf:"bytes,2,opt,name=voter,proto3" json:"voter,omitempty"`
	// depositor defines the deposit addresses from the proposals.
	Depositor string `protobuf:"bytes,3,opt,name=depositor,proto3" json:"depositor,omitempty"`
	// pagination defines an optional pagination for the request.
	Pagination *query.PageRequest `protobuf:"bytes,4,opt,name=pagination,proto3" json:"pagination,omitempty"`
}

QueryProposalsRequest is the request type for the Query/Proposals RPC method.

func (*QueryProposalsRequest) Descriptor

func (*QueryProposalsRequest) Descriptor() ([]byte, []int)

func (*QueryProposalsRequest) GetDepositor

func (m *QueryProposalsRequest) GetDepositor() string

func (*QueryProposalsRequest) GetPagination

func (m *QueryProposalsRequest) GetPagination() *query.PageRequest

func (*QueryProposalsRequest) GetProposalStatus

func (m *QueryProposalsRequest) GetProposalStatus() ProposalStatus

func (*QueryProposalsRequest) GetVoter

func (m *QueryProposalsRequest) GetVoter() string

func (*QueryProposalsRequest) Marshal

func (m *QueryProposalsRequest) Marshal() (dAtA []byte, err error)

func (*QueryProposalsRequest) MarshalTo

func (m *QueryProposalsRequest) MarshalTo(dAtA []byte) (int, error)

func (*QueryProposalsRequest) MarshalToSizedBuffer

func (m *QueryProposalsRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*QueryProposalsRequest) ProtoMessage

func (*QueryProposalsRequest) ProtoMessage()

func (*QueryProposalsRequest) Reset

func (m *QueryProposalsRequest) Reset()

func (*QueryProposalsRequest) Size

func (m *QueryProposalsRequest) Size() (n int)

func (*QueryProposalsRequest) String

func (m *QueryProposalsRequest) String() string

func (*QueryProposalsRequest) Unmarshal

func (m *QueryProposalsRequest) Unmarshal(dAtA []byte) error

func (*QueryProposalsRequest) XXX_DiscardUnknown

func (m *QueryProposalsRequest) XXX_DiscardUnknown()

func (*QueryProposalsRequest) XXX_Marshal

func (m *QueryProposalsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*QueryProposalsRequest) XXX_Merge

func (m *QueryProposalsRequest) XXX_Merge(src proto.Message)

func (*QueryProposalsRequest) XXX_Size

func (m *QueryProposalsRequest) XXX_Size() int

func (*QueryProposalsRequest) XXX_Unmarshal

func (m *QueryProposalsRequest) XXX_Unmarshal(b []byte) error

type QueryProposalsResponse

type QueryProposalsResponse struct {
	// proposals defines all the requested governance proposals.
	Proposals []*Proposal `protobuf:"bytes,1,rep,name=proposals,proto3" json:"proposals,omitempty"`
	// pagination defines the pagination in the response.
	Pagination *query.PageResponse `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"`
}

QueryProposalsResponse is the response type for the Query/Proposals RPC method.

func (*QueryProposalsResponse) Descriptor

func (*QueryProposalsResponse) Descriptor() ([]byte, []int)

func (*QueryProposalsResponse) GetPagination

func (m *QueryProposalsResponse) GetPagination() *query.PageResponse

func (*QueryProposalsResponse) GetProposals

func (m *QueryProposalsResponse) GetProposals() []*Proposal

func (*QueryProposalsResponse) Marshal

func (m *QueryProposalsResponse) Marshal() (dAtA []byte, err error)

func (*QueryProposalsResponse) MarshalTo

func (m *QueryProposalsResponse) MarshalTo(dAtA []byte) (int, error)

func (*QueryProposalsResponse) MarshalToSizedBuffer

func (m *QueryProposalsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*QueryProposalsResponse) ProtoMessage

func (*QueryProposalsResponse) ProtoMessage()

func (*QueryProposalsResponse) Reset

func (m *QueryProposalsResponse) Reset()

func (*QueryProposalsResponse) Size

func (m *QueryProposalsResponse) Size() (n int)

func (*QueryProposalsResponse) String

func (m *QueryProposalsResponse) String() string

func (*QueryProposalsResponse) Unmarshal

func (m *QueryProposalsResponse) Unmarshal(dAtA []byte) error

func (*QueryProposalsResponse) XXX_DiscardUnknown

func (m *QueryProposalsResponse) XXX_DiscardUnknown()

func (*QueryProposalsResponse) XXX_Marshal

func (m *QueryProposalsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*QueryProposalsResponse) XXX_Merge

func (m *QueryProposalsResponse) XXX_Merge(src proto.Message)

func (*QueryProposalsResponse) XXX_Size

func (m *QueryProposalsResponse) XXX_Size() int

func (*QueryProposalsResponse) XXX_Unmarshal

func (m *QueryProposalsResponse) XXX_Unmarshal(b []byte) error

type QueryServer

type QueryServer interface {
	// Constitution queries the chain's constitution.
	Constitution(context.Context, *QueryConstitutionRequest) (*QueryConstitutionResponse, error)
	// Proposal queries proposal details based on ProposalID.
	Proposal(context.Context, *QueryProposalRequest) (*QueryProposalResponse, error)
	// Proposals queries all proposals based on given status.
	Proposals(context.Context, *QueryProposalsRequest) (*QueryProposalsResponse, error)
	// Vote queries voted information based on proposalID, voterAddr.
	Vote(context.Context, *QueryVoteRequest) (*QueryVoteResponse, error)
	// Votes queries votes of a given proposal.
	Votes(context.Context, *QueryVotesRequest) (*QueryVotesResponse, error)
	// Params queries all parameters of the gov module.
	Params(context.Context, *QueryParamsRequest) (*QueryParamsResponse, error)
	// Deposit queries single deposit information based on proposalID, depositAddr.
	Deposit(context.Context, *QueryDepositRequest) (*QueryDepositResponse, error)
	// Deposits queries all deposits of a single proposal.
	Deposits(context.Context, *QueryDepositsRequest) (*QueryDepositsResponse, error)
	// TallyResult queries the tally of a proposal vote.
	TallyResult(context.Context, *QueryTallyResultRequest) (*QueryTallyResultResponse, error)
	// ProposalVoteOptions queries the valid voting options for a proposal.
	ProposalVoteOptions(context.Context, *QueryProposalVoteOptionsRequest) (*QueryProposalVoteOptionsResponse, error)
	// MessageBasedParams queries the message specific governance params based on a msg url.
	MessageBasedParams(context.Context, *QueryMessageBasedParamsRequest) (*QueryMessageBasedParamsResponse, error)
}

QueryServer is the server API for Query service.

type QueryTallyResultRequest

type QueryTallyResultRequest struct {
	// proposal_id defines the unique id of the proposal.
	ProposalId uint64 `protobuf:"varint,1,opt,name=proposal_id,json=proposalId,proto3" json:"proposal_id,omitempty"`
}

QueryTallyResultRequest is the request type for the Query/Tally RPC method.

func (*QueryTallyResultRequest) Descriptor

func (*QueryTallyResultRequest) Descriptor() ([]byte, []int)

func (*QueryTallyResultRequest) GetProposalId

func (m *QueryTallyResultRequest) GetProposalId() uint64

func (*QueryTallyResultRequest) Marshal

func (m *QueryTallyResultRequest) Marshal() (dAtA []byte, err error)

func (*QueryTallyResultRequest) MarshalTo

func (m *QueryTallyResultRequest) MarshalTo(dAtA []byte) (int, error)

func (*QueryTallyResultRequest) MarshalToSizedBuffer

func (m *QueryTallyResultRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*QueryTallyResultRequest) ProtoMessage

func (*QueryTallyResultRequest) ProtoMessage()

func (*QueryTallyResultRequest) Reset

func (m *QueryTallyResultRequest) Reset()

func (*QueryTallyResultRequest) Size

func (m *QueryTallyResultRequest) Size() (n int)

func (*QueryTallyResultRequest) String

func (m *QueryTallyResultRequest) String() string

func (*QueryTallyResultRequest) Unmarshal

func (m *QueryTallyResultRequest) Unmarshal(dAtA []byte) error

func (*QueryTallyResultRequest) XXX_DiscardUnknown

func (m *QueryTallyResultRequest) XXX_DiscardUnknown()

func (*QueryTallyResultRequest) XXX_Marshal

func (m *QueryTallyResultRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*QueryTallyResultRequest) XXX_Merge

func (m *QueryTallyResultRequest) XXX_Merge(src proto.Message)

func (*QueryTallyResultRequest) XXX_Size

func (m *QueryTallyResultRequest) XXX_Size() int

func (*QueryTallyResultRequest) XXX_Unmarshal

func (m *QueryTallyResultRequest) XXX_Unmarshal(b []byte) error

type QueryTallyResultResponse

type QueryTallyResultResponse struct {
	// tally defines the requested tally.
	Tally *TallyResult `protobuf:"bytes,1,opt,name=tally,proto3" json:"tally,omitempty"`
}

QueryTallyResultResponse is the response type for the Query/Tally RPC method.

func (*QueryTallyResultResponse) Descriptor

func (*QueryTallyResultResponse) Descriptor() ([]byte, []int)

func (*QueryTallyResultResponse) GetTally

func (m *QueryTallyResultResponse) GetTally() *TallyResult

func (*QueryTallyResultResponse) Marshal

func (m *QueryTallyResultResponse) Marshal() (dAtA []byte, err error)

func (*QueryTallyResultResponse) MarshalTo

func (m *QueryTallyResultResponse) MarshalTo(dAtA []byte) (int, error)

func (*QueryTallyResultResponse) MarshalToSizedBuffer

func (m *QueryTallyResultResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*QueryTallyResultResponse) ProtoMessage

func (*QueryTallyResultResponse) ProtoMessage()

func (*QueryTallyResultResponse) Reset

func (m *QueryTallyResultResponse) Reset()

func (*QueryTallyResultResponse) Size

func (m *QueryTallyResultResponse) Size() (n int)

func (*QueryTallyResultResponse) String

func (m *QueryTallyResultResponse) String() string

func (*QueryTallyResultResponse) Unmarshal

func (m *QueryTallyResultResponse) Unmarshal(dAtA []byte) error

func (*QueryTallyResultResponse) XXX_DiscardUnknown

func (m *QueryTallyResultResponse) XXX_DiscardUnknown()

func (*QueryTallyResultResponse) XXX_Marshal

func (m *QueryTallyResultResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*QueryTallyResultResponse) XXX_Merge

func (m *QueryTallyResultResponse) XXX_Merge(src proto.Message)

func (*QueryTallyResultResponse) XXX_Size

func (m *QueryTallyResultResponse) XXX_Size() int

func (*QueryTallyResultResponse) XXX_Unmarshal

func (m *QueryTallyResultResponse) XXX_Unmarshal(b []byte) error

type QueryVoteRequest

type QueryVoteRequest struct {
	// proposal_id defines the unique id of the proposal.
	ProposalId uint64 `protobuf:"varint,1,opt,name=proposal_id,json=proposalId,proto3" json:"proposal_id,omitempty"`
	// voter defines the voter address for the proposals.
	Voter string `protobuf:"bytes,2,opt,name=voter,proto3" json:"voter,omitempty"`
}

QueryVoteRequest is the request type for the Query/Vote RPC method.

func (*QueryVoteRequest) Descriptor

func (*QueryVoteRequest) Descriptor() ([]byte, []int)

func (*QueryVoteRequest) GetProposalId

func (m *QueryVoteRequest) GetProposalId() uint64

func (*QueryVoteRequest) GetVoter

func (m *QueryVoteRequest) GetVoter() string

func (*QueryVoteRequest) Marshal

func (m *QueryVoteRequest) Marshal() (dAtA []byte, err error)

func (*QueryVoteRequest) MarshalTo

func (m *QueryVoteRequest) MarshalTo(dAtA []byte) (int, error)

func (*QueryVoteRequest) MarshalToSizedBuffer

func (m *QueryVoteRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*QueryVoteRequest) ProtoMessage

func (*QueryVoteRequest) ProtoMessage()

func (*QueryVoteRequest) Reset

func (m *QueryVoteRequest) Reset()

func (*QueryVoteRequest) Size

func (m *QueryVoteRequest) Size() (n int)

func (*QueryVoteRequest) String

func (m *QueryVoteRequest) String() string

func (*QueryVoteRequest) Unmarshal

func (m *QueryVoteRequest) Unmarshal(dAtA []byte) error

func (*QueryVoteRequest) XXX_DiscardUnknown

func (m *QueryVoteRequest) XXX_DiscardUnknown()

func (*QueryVoteRequest) XXX_Marshal

func (m *QueryVoteRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*QueryVoteRequest) XXX_Merge

func (m *QueryVoteRequest) XXX_Merge(src proto.Message)

func (*QueryVoteRequest) XXX_Size

func (m *QueryVoteRequest) XXX_Size() int

func (*QueryVoteRequest) XXX_Unmarshal

func (m *QueryVoteRequest) XXX_Unmarshal(b []byte) error

type QueryVoteResponse

type QueryVoteResponse struct {
	// vote defines the queried vote.
	Vote *Vote `protobuf:"bytes,1,opt,name=vote,proto3" json:"vote,omitempty"`
}

QueryVoteResponse is the response type for the Query/Vote RPC method.

func (*QueryVoteResponse) Descriptor

func (*QueryVoteResponse) Descriptor() ([]byte, []int)

func (*QueryVoteResponse) GetVote

func (m *QueryVoteResponse) GetVote() *Vote

func (*QueryVoteResponse) Marshal

func (m *QueryVoteResponse) Marshal() (dAtA []byte, err error)

func (*QueryVoteResponse) MarshalTo

func (m *QueryVoteResponse) MarshalTo(dAtA []byte) (int, error)

func (*QueryVoteResponse) MarshalToSizedBuffer

func (m *QueryVoteResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*QueryVoteResponse) ProtoMessage

func (*QueryVoteResponse) ProtoMessage()

func (*QueryVoteResponse) Reset

func (m *QueryVoteResponse) Reset()

func (*QueryVoteResponse) Size

func (m *QueryVoteResponse) Size() (n int)

func (*QueryVoteResponse) String

func (m *QueryVoteResponse) String() string

func (*QueryVoteResponse) Unmarshal

func (m *QueryVoteResponse) Unmarshal(dAtA []byte) error

func (*QueryVoteResponse) XXX_DiscardUnknown

func (m *QueryVoteResponse) XXX_DiscardUnknown()

func (*QueryVoteResponse) XXX_Marshal

func (m *QueryVoteResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*QueryVoteResponse) XXX_Merge

func (m *QueryVoteResponse) XXX_Merge(src proto.Message)

func (*QueryVoteResponse) XXX_Size

func (m *QueryVoteResponse) XXX_Size() int

func (*QueryVoteResponse) XXX_Unmarshal

func (m *QueryVoteResponse) XXX_Unmarshal(b []byte) error

type QueryVotesRequest

type QueryVotesRequest struct {
	// proposal_id defines the unique id of the proposal.
	ProposalId uint64 `protobuf:"varint,1,opt,name=proposal_id,json=proposalId,proto3" json:"proposal_id,omitempty"`
	// pagination defines an optional pagination for the request.
	Pagination *query.PageRequest `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"`
}

QueryVotesRequest is the request type for the Query/Votes RPC method.

func (*QueryVotesRequest) Descriptor

func (*QueryVotesRequest) Descriptor() ([]byte, []int)

func (*QueryVotesRequest) GetPagination

func (m *QueryVotesRequest) GetPagination() *query.PageRequest

func (*QueryVotesRequest) GetProposalId

func (m *QueryVotesRequest) GetProposalId() uint64

func (*QueryVotesRequest) Marshal

func (m *QueryVotesRequest) Marshal() (dAtA []byte, err error)

func (*QueryVotesRequest) MarshalTo

func (m *QueryVotesRequest) MarshalTo(dAtA []byte) (int, error)

func (*QueryVotesRequest) MarshalToSizedBuffer

func (m *QueryVotesRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*QueryVotesRequest) ProtoMessage

func (*QueryVotesRequest) ProtoMessage()

func (*QueryVotesRequest) Reset

func (m *QueryVotesRequest) Reset()

func (*QueryVotesRequest) Size

func (m *QueryVotesRequest) Size() (n int)

func (*QueryVotesRequest) String

func (m *QueryVotesRequest) String() string

func (*QueryVotesRequest) Unmarshal

func (m *QueryVotesRequest) Unmarshal(dAtA []byte) error

func (*QueryVotesRequest) XXX_DiscardUnknown

func (m *QueryVotesRequest) XXX_DiscardUnknown()

func (*QueryVotesRequest) XXX_Marshal

func (m *QueryVotesRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*QueryVotesRequest) XXX_Merge

func (m *QueryVotesRequest) XXX_Merge(src proto.Message)

func (*QueryVotesRequest) XXX_Size

func (m *QueryVotesRequest) XXX_Size() int

func (*QueryVotesRequest) XXX_Unmarshal

func (m *QueryVotesRequest) XXX_Unmarshal(b []byte) error

type QueryVotesResponse

type QueryVotesResponse struct {
	// votes defines the queried votes.
	Votes []*Vote `protobuf:"bytes,1,rep,name=votes,proto3" json:"votes,omitempty"`
	// pagination defines the pagination in the response.
	Pagination *query.PageResponse `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"`
}

QueryVotesResponse is the response type for the Query/Votes RPC method.

func (*QueryVotesResponse) Descriptor

func (*QueryVotesResponse) Descriptor() ([]byte, []int)

func (*QueryVotesResponse) GetPagination

func (m *QueryVotesResponse) GetPagination() *query.PageResponse

func (*QueryVotesResponse) GetVotes

func (m *QueryVotesResponse) GetVotes() []*Vote

func (*QueryVotesResponse) Marshal

func (m *QueryVotesResponse) Marshal() (dAtA []byte, err error)

func (*QueryVotesResponse) MarshalTo

func (m *QueryVotesResponse) MarshalTo(dAtA []byte) (int, error)

func (*QueryVotesResponse) MarshalToSizedBuffer

func (m *QueryVotesResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*QueryVotesResponse) ProtoMessage

func (*QueryVotesResponse) ProtoMessage()

func (*QueryVotesResponse) Reset

func (m *QueryVotesResponse) Reset()

func (*QueryVotesResponse) Size

func (m *QueryVotesResponse) Size() (n int)

func (*QueryVotesResponse) String

func (m *QueryVotesResponse) String() string

func (*QueryVotesResponse) Unmarshal

func (m *QueryVotesResponse) Unmarshal(dAtA []byte) error

func (*QueryVotesResponse) XXX_DiscardUnknown

func (m *QueryVotesResponse) XXX_DiscardUnknown()

func (*QueryVotesResponse) XXX_Marshal

func (m *QueryVotesResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*QueryVotesResponse) XXX_Merge

func (m *QueryVotesResponse) XXX_Merge(src proto.Message)

func (*QueryVotesResponse) XXX_Size

func (m *QueryVotesResponse) XXX_Size() int

func (*QueryVotesResponse) XXX_Unmarshal

func (m *QueryVotesResponse) XXX_Unmarshal(b []byte) error

type TallyParams deprecated

type TallyParams struct {
	// Minimum percentage of total stake needed to vote for a result to be
	// considered valid.
	Quorum string `protobuf:"bytes,1,opt,name=quorum,proto3" json:"quorum,omitempty"`
	// Minimum proportion of Yes votes for proposal to pass. Default value: 0.5.
	Threshold string `protobuf:"bytes,2,opt,name=threshold,proto3" json:"threshold,omitempty"`
	// Minimum value of Veto votes to Total votes ratio for proposal to be
	// vetoed. Default value: 1/3.
	VetoThreshold string `protobuf:"bytes,3,opt,name=veto_threshold,json=vetoThreshold,proto3" json:"veto_threshold,omitempty"`
}

TallyParams defines the params for tallying votes on governance proposals.

Deprecated: Do not use.

func (*TallyParams) Descriptor

func (*TallyParams) Descriptor() ([]byte, []int)

func (*TallyParams) GetQuorum

func (m *TallyParams) GetQuorum() string

func (*TallyParams) GetThreshold

func (m *TallyParams) GetThreshold() string

func (*TallyParams) GetVetoThreshold

func (m *TallyParams) GetVetoThreshold() string

func (*TallyParams) Marshal

func (m *TallyParams) Marshal() (dAtA []byte, err error)

func (*TallyParams) MarshalTo

func (m *TallyParams) MarshalTo(dAtA []byte) (int, error)

func (*TallyParams) MarshalToSizedBuffer

func (m *TallyParams) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*TallyParams) ProtoMessage

func (*TallyParams) ProtoMessage()

func (*TallyParams) Reset

func (m *TallyParams) Reset()

func (*TallyParams) Size

func (m *TallyParams) Size() (n int)

func (*TallyParams) String

func (m *TallyParams) String() string

func (*TallyParams) Unmarshal

func (m *TallyParams) Unmarshal(dAtA []byte) error

func (*TallyParams) XXX_DiscardUnknown

func (m *TallyParams) XXX_DiscardUnknown()

func (*TallyParams) XXX_Marshal

func (m *TallyParams) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*TallyParams) XXX_Merge

func (m *TallyParams) XXX_Merge(src proto.Message)

func (*TallyParams) XXX_Size

func (m *TallyParams) XXX_Size() int

func (*TallyParams) XXX_Unmarshal

func (m *TallyParams) XXX_Unmarshal(b []byte) error

type TallyResult

type TallyResult struct {
	// yes_count is the number of yes votes on a proposal.
	YesCount string `protobuf:"bytes,1,opt,name=yes_count,json=yesCount,proto3" json:"yes_count,omitempty"` // Deprecated: Do not use.
	// abstain_count is the number of abstain votes on a proposal.
	AbstainCount string `protobuf:"bytes,2,opt,name=abstain_count,json=abstainCount,proto3" json:"abstain_count,omitempty"` // Deprecated: Do not use.
	// no_count is the number of no votes on a proposal.
	NoCount string `protobuf:"bytes,3,opt,name=no_count,json=noCount,proto3" json:"no_count,omitempty"` // Deprecated: Do not use.
	// no_with_veto_count is the number of no with veto votes on a proposal.
	NoWithVetoCount string `protobuf:"bytes,4,opt,name=no_with_veto_count,json=noWithVetoCount,proto3" json:"no_with_veto_count,omitempty"` // Deprecated: Do not use.
	// option_one_count corresponds to the number of votes for option one (= yes_count for non multiple choice proposals).
	OptionOneCount string `protobuf:"bytes,5,opt,name=option_one_count,json=optionOneCount,proto3" json:"option_one_count,omitempty"`
	// option_two_count corresponds to the number of votes for option two (= abstain_count for non multiple choice
	// proposals).
	OptionTwoCount string `protobuf:"bytes,6,opt,name=option_two_count,json=optionTwoCount,proto3" json:"option_two_count,omitempty"`
	// option_three_count corresponds to the number of votes for option three (= no_count for non multiple choice
	// proposals).
	OptionThreeCount string `protobuf:"bytes,7,opt,name=option_three_count,json=optionThreeCount,proto3" json:"option_three_count,omitempty"`
	// option_four_count corresponds to the number of votes for option four (= no_with_veto_count for non multiple choice
	// proposals).
	OptionFourCount string `protobuf:"bytes,8,opt,name=option_four_count,json=optionFourCount,proto3" json:"option_four_count,omitempty"`
	// spam_count is the number of spam votes on a proposal.
	SpamCount string `protobuf:"bytes,9,opt,name=spam_count,json=spamCount,proto3" json:"spam_count,omitempty"`
}

TallyResult defines a standard tally for a governance proposal.

func EmptyTallyResult

func EmptyTallyResult() TallyResult

EmptyTallyResult returns an empty TallyResult.

func NewTallyResult

func NewTallyResult(option1, option2, option3, option4, spam math.Int) TallyResult

NewTallyResult creates a new TallyResult instance

func NewTallyResultFromMap

func NewTallyResultFromMap(results map[VoteOption]math.LegacyDec) TallyResult

NewTallyResultFromMap creates a new TallyResult instance from a Option -> Dec map

func (*TallyResult) Descriptor

func (*TallyResult) Descriptor() ([]byte, []int)

func (TallyResult) Equals

func (tr TallyResult) Equals(comp TallyResult) bool

Equals returns if two tally results are equal.

func (*TallyResult) GetAbstainCount deprecated

func (m *TallyResult) GetAbstainCount() string

Deprecated: Do not use.

func (*TallyResult) GetNoCount deprecated

func (m *TallyResult) GetNoCount() string

Deprecated: Do not use.

func (*TallyResult) GetNoWithVetoCount deprecated

func (m *TallyResult) GetNoWithVetoCount() string

Deprecated: Do not use.

func (*TallyResult) GetOptionFourCount

func (m *TallyResult) GetOptionFourCount() string

func (*TallyResult) GetOptionOneCount

func (m *TallyResult) GetOptionOneCount() string

func (*TallyResult) GetOptionThreeCount

func (m *TallyResult) GetOptionThreeCount() string

func (*TallyResult) GetOptionTwoCount

func (m *TallyResult) GetOptionTwoCount() string

func (*TallyResult) GetSpamCount

func (m *TallyResult) GetSpamCount() string

func (*TallyResult) GetYesCount deprecated

func (m *TallyResult) GetYesCount() string

Deprecated: Do not use.

func (*TallyResult) Marshal

func (m *TallyResult) Marshal() (dAtA []byte, err error)

func (*TallyResult) MarshalTo

func (m *TallyResult) MarshalTo(dAtA []byte) (int, error)

func (*TallyResult) MarshalToSizedBuffer

func (m *TallyResult) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*TallyResult) ProtoMessage

func (*TallyResult) ProtoMessage()

func (*TallyResult) Reset

func (m *TallyResult) Reset()

func (*TallyResult) Size

func (m *TallyResult) Size() (n int)

func (*TallyResult) String

func (m *TallyResult) String() string

func (*TallyResult) Unmarshal

func (m *TallyResult) Unmarshal(dAtA []byte) error

func (*TallyResult) XXX_DiscardUnknown

func (m *TallyResult) XXX_DiscardUnknown()

func (*TallyResult) XXX_Marshal

func (m *TallyResult) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*TallyResult) XXX_Merge

func (m *TallyResult) XXX_Merge(src proto.Message)

func (*TallyResult) XXX_Size

func (m *TallyResult) XXX_Size() int

func (*TallyResult) XXX_Unmarshal

func (m *TallyResult) XXX_Unmarshal(b []byte) error

type UnimplementedMsgServer

type UnimplementedMsgServer struct {
}

UnimplementedMsgServer can be embedded to have forward compatible implementations.

func (*UnimplementedMsgServer) CancelProposal

func (*UnimplementedMsgServer) Deposit

func (*UnimplementedMsgServer) ExecLegacyContent

func (*UnimplementedMsgServer) SubmitMultipleChoiceProposal

func (*UnimplementedMsgServer) SubmitProposal

func (*UnimplementedMsgServer) SudoExec

func (*UnimplementedMsgServer) UpdateMessageParams

func (*UnimplementedMsgServer) UpdateParams

func (*UnimplementedMsgServer) Vote

func (*UnimplementedMsgServer) VoteWeighted

type UnimplementedQueryServer

type UnimplementedQueryServer struct {
}

UnimplementedQueryServer can be embedded to have forward compatible implementations.

func (*UnimplementedQueryServer) Constitution

func (*UnimplementedQueryServer) Deposit

func (*UnimplementedQueryServer) Deposits

func (*UnimplementedQueryServer) MessageBasedParams

func (*UnimplementedQueryServer) Params

func (*UnimplementedQueryServer) Proposal

func (*UnimplementedQueryServer) ProposalVoteOptions

func (*UnimplementedQueryServer) Proposals

func (*UnimplementedQueryServer) TallyResult

func (*UnimplementedQueryServer) Vote

func (*UnimplementedQueryServer) Votes

type ValidatorGovInfo

type ValidatorGovInfo struct {
	Address             sdk.ValAddress      // address of the validator operator
	BondedTokens        math.Int            // Power of a Validator
	DelegatorShares     math.LegacyDec      // Total outstanding delegator shares
	DelegatorDeductions math.LegacyDec      // Delegator deductions from validator's delegators voting independently
	Vote                WeightedVoteOptions // Vote of the validator
}

ValidatorGovInfo used for tallying

func NewValidatorGovInfo

func NewValidatorGovInfo(address sdk.ValAddress, bondedTokens math.Int, delegatorShares,
	delegatorDeductions math.LegacyDec, options WeightedVoteOptions,
) ValidatorGovInfo

NewValidatorGovInfo creates a ValidatorGovInfo instance

type Vote

type Vote struct {
	// proposal_id defines the unique id of the proposal.
	ProposalId uint64 `protobuf:"varint,1,opt,name=proposal_id,json=proposalId,proto3" json:"proposal_id,omitempty"`
	// voter is the voter address of the proposal.
	Voter string `protobuf:"bytes,2,opt,name=voter,proto3" json:"voter,omitempty"`
	// options is the weighted vote options.
	Options []*WeightedVoteOption `protobuf:"bytes,4,rep,name=options,proto3" json:"options,omitempty"`
	// metadata is any arbitrary metadata attached to the vote.
	// the recommended format of the metadata is to be found here: https://docs.cosmos.network/v0.47/modules/gov#vote-5
	Metadata string `protobuf:"bytes,5,opt,name=metadata,proto3" json:"metadata,omitempty"`
}

Vote defines a vote on a governance proposal. A Vote consists of a proposal ID, the voter, and the vote option.

func NewVote

func NewVote(proposalID uint64, voter string, options WeightedVoteOptions, metadata string) Vote

NewVote creates a new Vote instance

func (*Vote) Descriptor

func (*Vote) Descriptor() ([]byte, []int)

func (Vote) Empty

func (v Vote) Empty() bool

Empty returns whether a vote is empty.

func (*Vote) GetMetadata

func (m *Vote) GetMetadata() string

func (*Vote) GetOptions

func (m *Vote) GetOptions() []*WeightedVoteOption

func (*Vote) GetProposalId

func (m *Vote) GetProposalId() uint64

func (*Vote) GetVoter

func (m *Vote) GetVoter() string

func (*Vote) Marshal

func (m *Vote) Marshal() (dAtA []byte, err error)

func (*Vote) MarshalTo

func (m *Vote) MarshalTo(dAtA []byte) (int, error)

func (*Vote) MarshalToSizedBuffer

func (m *Vote) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*Vote) ProtoMessage

func (*Vote) ProtoMessage()

func (*Vote) Reset

func (m *Vote) Reset()

func (*Vote) Size

func (m *Vote) Size() (n int)

func (*Vote) String

func (m *Vote) String() string

func (*Vote) Unmarshal

func (m *Vote) Unmarshal(dAtA []byte) error

func (*Vote) XXX_DiscardUnknown

func (m *Vote) XXX_DiscardUnknown()

func (*Vote) XXX_Marshal

func (m *Vote) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Vote) XXX_Merge

func (m *Vote) XXX_Merge(src proto.Message)

func (*Vote) XXX_Size

func (m *Vote) XXX_Size() int

func (*Vote) XXX_Unmarshal

func (m *Vote) XXX_Unmarshal(b []byte) error

type VoteOption

type VoteOption int32

VoteOption enumerates the valid vote options for a given governance proposal.

const (
	// VOTE_OPTION_UNSPECIFIED defines a no-op vote option.
	VoteOption_VOTE_OPTION_UNSPECIFIED VoteOption = 0
	// VOTE_OPTION_YES defines the yes proposal vote option.
	VoteOption_VOTE_OPTION_YES VoteOption = 1
	// VOTE_OPTION_ONE defines the first proposal vote option.
	VoteOption_VOTE_OPTION_ONE VoteOption = 1
	// VOTE_OPTION_ABSTAIN defines the abstain proposal vote option.
	VoteOption_VOTE_OPTION_ABSTAIN VoteOption = 2
	// VOTE_OPTION_TWO defines the second proposal vote option.
	VoteOption_VOTE_OPTION_TWO VoteOption = 2
	// VOTE_OPTION_NO defines the no proposal vote option.
	VoteOption_VOTE_OPTION_NO VoteOption = 3
	// VOTE_OPTION_THREE defines the third proposal vote option.
	VoteOption_VOTE_OPTION_THREE VoteOption = 3
	// VOTE_OPTION_NO_WITH_VETO defines the no with veto proposal vote option.
	VoteOption_VOTE_OPTION_NO_WITH_VETO VoteOption = 4
	// VOTE_OPTION_FOUR defines the fourth proposal vote option.
	VoteOption_VOTE_OPTION_FOUR VoteOption = 4
	// VOTE_OPTION_SPAM defines the spam proposal vote option.
	VoteOption_VOTE_OPTION_SPAM VoteOption = 5
)

func VoteOptionFromString

func VoteOptionFromString(str string) (VoteOption, error)

VoteOptionFromString returns a VoteOption from a string. It returns an error if the string is invalid.

func (VoteOption) EnumDescriptor

func (VoteOption) EnumDescriptor() ([]byte, []int)

func (VoteOption) Format

func (vo VoteOption) Format(s fmt.State, verb rune)

Format implements the fmt.Formatter interface.

func (VoteOption) String

func (x VoteOption) String() string

type Votes

type Votes []*Vote

Votes is a collection of Vote objects

func (Votes) Equal

func (v Votes) Equal(other Votes) bool

Equal returns true if two slices (order-dependant) of votes are equal.

func (Votes) String

func (v Votes) String() string

String implements stringer interface

type VotingParams deprecated

type VotingParams struct {
	// Duration of the voting period.
	VotingPeriod *time.Duration `protobuf:"bytes,1,opt,name=voting_period,json=votingPeriod,proto3,stdduration" json:"voting_period,omitempty"`
}

VotingParams defines the params for voting on governance proposals.

Deprecated: Do not use.

func (*VotingParams) Descriptor

func (*VotingParams) Descriptor() ([]byte, []int)

func (*VotingParams) GetVotingPeriod

func (m *VotingParams) GetVotingPeriod() *time.Duration

func (*VotingParams) Marshal

func (m *VotingParams) Marshal() (dAtA []byte, err error)

func (*VotingParams) MarshalTo

func (m *VotingParams) MarshalTo(dAtA []byte) (int, error)

func (*VotingParams) MarshalToSizedBuffer

func (m *VotingParams) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*VotingParams) ProtoMessage

func (*VotingParams) ProtoMessage()

func (*VotingParams) Reset

func (m *VotingParams) Reset()

func (*VotingParams) Size

func (m *VotingParams) Size() (n int)

func (*VotingParams) String

func (m *VotingParams) String() string

func (*VotingParams) Unmarshal

func (m *VotingParams) Unmarshal(dAtA []byte) error

func (*VotingParams) XXX_DiscardUnknown

func (m *VotingParams) XXX_DiscardUnknown()

func (*VotingParams) XXX_Marshal

func (m *VotingParams) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*VotingParams) XXX_Merge

func (m *VotingParams) XXX_Merge(src proto.Message)

func (*VotingParams) XXX_Size

func (m *VotingParams) XXX_Size() int

func (*VotingParams) XXX_Unmarshal

func (m *VotingParams) XXX_Unmarshal(b []byte) error

type WeightedVoteOption

type WeightedVoteOption struct {
	// option defines the valid vote options, it must not contain duplicate vote options.
	Option VoteOption `protobuf:"varint,1,opt,name=option,proto3,enum=cosmos.gov.v1.VoteOption" json:"option,omitempty"`
	// weight is the vote weight associated with the vote option.
	Weight string `protobuf:"bytes,2,opt,name=weight,proto3" json:"weight,omitempty"`
}

WeightedVoteOption defines a unit of vote for vote split.

func NewWeightedVoteOption

func NewWeightedVoteOption(option VoteOption, weight math.LegacyDec) *WeightedVoteOption

func (*WeightedVoteOption) Descriptor

func (*WeightedVoteOption) Descriptor() ([]byte, []int)

func (*WeightedVoteOption) GetOption

func (m *WeightedVoteOption) GetOption() VoteOption

func (*WeightedVoteOption) GetWeight

func (m *WeightedVoteOption) GetWeight() string

func (*WeightedVoteOption) IsValid

func (w *WeightedVoteOption) IsValid() bool

IsValid returns true if the sub vote is valid and false otherwise.

func (*WeightedVoteOption) Marshal

func (m *WeightedVoteOption) Marshal() (dAtA []byte, err error)

func (*WeightedVoteOption) MarshalTo

func (m *WeightedVoteOption) MarshalTo(dAtA []byte) (int, error)

func (*WeightedVoteOption) MarshalToSizedBuffer

func (m *WeightedVoteOption) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*WeightedVoteOption) ProtoMessage

func (*WeightedVoteOption) ProtoMessage()

func (*WeightedVoteOption) Reset

func (m *WeightedVoteOption) Reset()

func (*WeightedVoteOption) Size

func (m *WeightedVoteOption) Size() (n int)

func (*WeightedVoteOption) String

func (m *WeightedVoteOption) String() string

func (*WeightedVoteOption) Unmarshal

func (m *WeightedVoteOption) Unmarshal(dAtA []byte) error

func (*WeightedVoteOption) XXX_DiscardUnknown

func (m *WeightedVoteOption) XXX_DiscardUnknown()

func (*WeightedVoteOption) XXX_Marshal

func (m *WeightedVoteOption) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*WeightedVoteOption) XXX_Merge

func (m *WeightedVoteOption) XXX_Merge(src proto.Message)

func (*WeightedVoteOption) XXX_Size

func (m *WeightedVoteOption) XXX_Size() int

func (*WeightedVoteOption) XXX_Unmarshal

func (m *WeightedVoteOption) XXX_Unmarshal(b []byte) error

type WeightedVoteOptions

type WeightedVoteOptions []*WeightedVoteOption

WeightedVoteOptions describes array of WeightedVoteOptions

func NewNonSplitVoteOption

func NewNonSplitVoteOption(option VoteOption) WeightedVoteOptions

NewNonSplitVoteOption creates a single option vote with weight 1

func WeightedVoteOptionsFromString

func WeightedVoteOptionsFromString(str string) (WeightedVoteOptions, error)

WeightedVoteOptionsFromString returns weighted vote options from string. It returns an error if the string is invalid.

func (WeightedVoteOptions) String

func (v WeightedVoteOptions) String() string

Jump to

Keyboard shortcuts

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