types

package
v2.0.0 Latest Latest
Warning

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

Go to latest
Published: Aug 11, 2021 License: Apache-2.0 Imports: 38 Imported by: 0

Documentation

Overview

Package types is a reverse proxy.

It translates gRPC into RESTful JSON APIs.

Index

Constants

View Source
const (
	AttributeKeyDepositor = "depositor"
	AttributeKeyVoter     = "voter"
	AttributeTxHash       = "txhash"
)

Variables

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 (
	ParamStoreKeyDepositParams = []byte("depositparams")
	ParamStoreKeyVotingParams  = []byte("votingparams")
	ParamStoreKeyTallyParams   = []byte("tallyparams")
)

parameter store keys

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 ProposalStatus_name = map[int32]string{
	0: "PROPOSAL_STATUS_UNSPECIFIED",
	1: "PROPOSAL_STATUS_DEPOSIT_PERIOD",
	2: "PROPOSAL_STATUS_CERTIFIER_VOTING_PERIOD",
	3: "PROPOSAL_STATUS_VALIDATOR_VOTING_PERIOD",
	4: "PROPOSAL_STATUS_PASSED",
	5: "PROPOSAL_STATUS_REJECTED",
	6: "PROPOSAL_STATUS_FAILED",
}
View Source
var ProposalStatus_value = map[string]int32{
	"PROPOSAL_STATUS_UNSPECIFIED":             0,
	"PROPOSAL_STATUS_DEPOSIT_PERIOD":          1,
	"PROPOSAL_STATUS_CERTIFIER_VOTING_PERIOD": 2,
	"PROPOSAL_STATUS_VALIDATOR_VOTING_PERIOD": 3,
	"PROPOSAL_STATUS_PASSED":                  4,
	"PROPOSAL_STATUS_REJECTED":                5,
	"PROPOSAL_STATUS_FAILED":                  6,
}

Functions

func ParamKeyTable

func ParamKeyTable() params.KeyTable

ParamKeyTable is the key declaration for parameters.

func ProposalHandler

func ProposalHandler(_ sdk.Context, c govtypes.Content) error

ProposalHandler implements the Handler interface for governance module-based proposals (ie. TextProposal and SoftwareUpgradeProposal). Since these are merely signaling mechanisms at the moment and do not affect state, it performs a no-op.

func RegisterInterfaces

func RegisterInterfaces(registry types.InterfaceRegistry)

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 (such as grpc.SendHeader, etc) 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 ValidateGenesis

func ValidateGenesis(data *GenesisState) error

ValidateGenesis validates gov genesis data.

Types

type CertKeeper

type CertKeeper interface {
	IsCertifier(ctx sdk.Context, addr sdk.AccAddress) bool
	GetAllCertifiers(ctx sdk.Context) (certifiers certtypes.Certifiers)
	GetCertifier(ctx sdk.Context, certifierAddress sdk.AccAddress) (certtypes.Certifier, error)
	HasCertifierAlias(ctx sdk.Context, alias string) bool
	IsCertified(ctx sdk.Context, content string, certType string) bool
	GetCertifiedIdentities(ctx sdk.Context) []sdk.AccAddress
}

type Deposit

type Deposit struct {
	*types.Deposit `protobuf:"bytes,1,opt,name=deposit,proto3,embedded=deposit" json:"deposit,omitempty"`
	TxHash         string `protobuf:"bytes,2,opt,name=tx_hash,json=txHash,proto3" json:"tx_hash,omitempty" yaml:"txhash"`
}

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

func NewDeposit

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

NewDeposit creates a new Deposit instance.

func (*Deposit) Descriptor

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

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) 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

type DepositParams struct {
	//  Minimum deposit for a proposal to enter voting period.
	MinInitialDeposit github_com_cosmos_cosmos_sdk_types.Coins `` /* 195-byte string literal not displayed */
	// Minimum deposit for a proposal to enter voting period.
	MinDeposit github_com_cosmos_cosmos_sdk_types.Coins `` /* 164-byte string literal not displayed */
	//  Maximum period for CTK holders to deposit on a proposal. Initial value: 2
	//  months.
	MaxDepositPeriod time.Duration `` /* 149-byte string literal not displayed */
}

DepositParams defines the params for deposits on governance proposals.

func NewDepositParams

func NewDepositParams(minInitialDeposit, minDeposit sdk.Coins, maxDepositPeriod time.Duration) DepositParams

NewDepositParams creates a new DepositParams object

func (*DepositParams) Descriptor

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

func (DepositParams) Equal

func (dp DepositParams) Equal(dp2 DepositParams) bool

Equal checks equality of DepositParams

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 (dp 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.

type GenesisState

type GenesisState struct {
	// starting_proposal_id is the ID of the starting proposal.
	StartingProposalId uint64 `` /* 146-byte string literal not displayed */
	// deposits defines all the deposits present at genesis.
	Deposits Deposits `protobuf:"bytes,2,rep,name=deposits,proto3,castrepeated=Deposits" json:"deposits"`
	// votes defines all the votes present at genesis.
	Votes Votes `protobuf:"bytes,3,rep,name=votes,proto3,castrepeated=Votes" json:"votes"`
	// proposals defines all the proposals present at genesis.
	Proposals Proposals `protobuf:"bytes,4,rep,name=proposals,proto3,castrepeated=Proposals" json:"proposals"`
	// params defines all the paramaters of related to deposit.
	DepositParams DepositParams `protobuf:"bytes,5,opt,name=deposit_params,json=depositParams,proto3" json:"deposit_params" yaml:"deposit_params"`
	// params defines all the paramaters of related to voting.
	VotingParams types.VotingParams `protobuf:"bytes,6,opt,name=voting_params,json=votingParams,proto3" json:"voting_params" yaml:"voting_params"`
	// params defines all the paramaters of related to tally.
	TallyParams TallyParams `protobuf:"bytes,7,opt,name=tally_params,json=tallyParams,proto3" json:"tally_params" yaml:"tally_params"`
}

GenesisState defines the gov module's genesis state.

func DefaultGenesisState

func DefaultGenesisState() *GenesisState

DefaultGenesisState creates a default GenesisState object.

func (*GenesisState) Descriptor

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

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 MsgClient

type MsgClient interface {
	// SubmitProposal defines a method to create new proposal given a content.
	SubmitProposal(ctx context.Context, in *types.MsgSubmitProposal, opts ...grpc.CallOption) (*types.MsgSubmitProposalResponse, error)
	// Vote defines a method to add a vote on a specific proposal.
	Vote(ctx context.Context, in *types.MsgVote, opts ...grpc.CallOption) (*types.MsgVoteResponse, error)
	// Deposit defines a method to add deposit on a specific proposal.
	Deposit(ctx context.Context, in *types.MsgDeposit, opts ...grpc.CallOption) (*types.MsgDepositResponse, 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 MsgServer

type MsgServer interface {
	// SubmitProposal defines a method to create new proposal given a content.
	SubmitProposal(context.Context, *types.MsgSubmitProposal) (*types.MsgSubmitProposalResponse, error)
	// Vote defines a method to add a vote on a specific proposal.
	Vote(context.Context, *types.MsgVote) (*types.MsgVoteResponse, error)
	// Deposit defines a method to add deposit on a specific proposal.
	Deposit(context.Context, *types.MsgDeposit) (*types.MsgDepositResponse, error)
}

MsgServer is the server API for Msg service.

type ParamSubspace

type ParamSubspace interface {
	Get(ctx sdk.Context, key []byte, ptr interface{})
	Set(ctx sdk.Context, key []byte, param interface{})
	WithKeyTable(table paramtypes.KeyTable) paramtypes.Subspace
}

type Params

type Params struct {
	VotingParams  govTypes.VotingParams `json:"voting_params" yaml:"voting_params"`
	TallyParams   TallyParams           `json:"tally_params" yaml:"tally_params"`
	DepositParams DepositParams         `json:"deposit_params" yaml:"deposit_parmas"`
}

Params returns all of the governance params

func NewParams

NewParams returns a Params structs including voting, deposit and tally params

func (Params) String

func (gp Params) String() string

type Proposal

type Proposal struct {
	Content                 *types2.Any                              `protobuf:"bytes,1,opt,name=content,proto3" json:"content,omitempty"`
	ProposalId              uint64                                   `protobuf:"varint,2,opt,name=proposal_id,json=proposalId,proto3" json:"id" yaml:"id"`
	Status                  ProposalStatus                           `` /* 129-byte string literal not displayed */
	IsProposerCouncilMember bool                                     `` /* 169-byte string literal not displayed */
	ProposerAddress         string                                   `` /* 130-byte string literal not displayed */
	FinalTallyResult        types.TallyResult                        `` /* 127-byte string literal not displayed */
	SubmitTime              time.Time                                `protobuf:"bytes,7,opt,name=submit_time,json=submitTime,proto3,stdtime" json:"submit_time" yaml:"submit_time"`
	DepositEndTime          time.Time                                `` /* 127-byte string literal not displayed */
	TotalDeposit            github_com_cosmos_cosmos_sdk_types.Coins `` /* 162-byte string literal not displayed */
	VotingStartTime         time.Time                                `` /* 132-byte string literal not displayed */
	VotingEndTime           time.Time                                `protobuf:"bytes,11,opt,name=voting_end_time,json=votingEndTime,proto3,stdtime" json:"voting_end_time" yaml:"voting_end_time"`
}

func NewProposal

func NewProposal(content govtypes.Content, id uint64, proposerAddress sdk.AccAddress, isProposerCouncilMember bool, submitTime time.Time, depositEndTime time.Time) (Proposal, error)

NewProposal creates a new Proposal instance

func (*Proposal) Descriptor

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

func (*Proposal) Equal

func (this *Proposal) Equal(that interface{}) bool

func (Proposal) GetContent

func (p Proposal) GetContent() govtypes.Content

GetContent returns the proposal Content

func (Proposal) GetTitle

func (p Proposal) GetTitle() string

func (Proposal) HasSecurityVoting

func (p Proposal) HasSecurityVoting() bool

HasSecurityVoting returns true if the proposal needs to go through security (certifier) voting before stake (validator) voting.

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) ProposalRoute

func (p Proposal) ProposalRoute() string

func (Proposal) ProposalType

func (p Proposal) ProposalType() string

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 (p Proposal) String() string

String implements stringer interface

func (*Proposal) Unmarshal

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

func (Proposal) UnpackInterfaces

func (p Proposal) UnpackInterfaces(unpacker types.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 is a type alias that represents a list of proposal IDs.

type ProposalStatus

type ProposalStatus int32

ProposalStatus enumerates the valid statuses of a proposal.

const (
	// PROPOSAL_STATUS_UNSPECIFIED defines the default propopsal status.
	StatusNil ProposalStatus = 0
	// PROPOSAL_STATUS_DEPOSIT_PERIOD defines a proposal status during the deposit
	// period.
	StatusDepositPeriod ProposalStatus = 1
	// PROPOSAL_STATUS_VOTING_PERIOD defines a certifier voting period status.
	StatusCertifierVotingPeriod ProposalStatus = 2
	// PROPOSAL_STATUS_VOTING_PERIOD defines a validator voting period status.
	StatusValidatorVotingPeriod ProposalStatus = 3
	// PROPOSAL_STATUS_PASSED defines a proposal status of a proposal that has
	// passed.
	StatusPassed ProposalStatus = 4
	// PROPOSAL_STATUS_REJECTED defines a proposal status of a proposal that has
	// been rejected.
	StatusRejected ProposalStatus = 5
	// PROPOSAL_STATUS_FAILED defines a proposal status of a proposal that has
	// failed.
	StatusFailed ProposalStatus = 6
)

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) Marshal

func (status ProposalStatus) Marshal() ([]byte, error)

Marshal implements the Marshal method for protobuf compatibility.

func (ProposalStatus) MarshalJSON

func (status ProposalStatus) MarshalJSON() ([]byte, error)

MarshalJSON marshals to JSON using string.

func (ProposalStatus) String

func (x ProposalStatus) String() string

func (*ProposalStatus) Unmarshal

func (status *ProposalStatus) Unmarshal(data []byte) error

Unmarshal implements the Unmarshal method for protobuf compatibility.

func (*ProposalStatus) UnmarshalJSON

func (status *ProposalStatus) UnmarshalJSON(data []byte) error

UnmarshalJSON unmarshals from JSON assuming Bech32 encoding.

type Proposals

type Proposals []Proposal

Proposals is an array of proposals.

func (Proposals) String

func (p Proposals) String() string

String implements stringer interface.

func (Proposals) UnpackInterfaces

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

UnpackInterfaces implements UnpackInterfacesMessage.UnpackInterfaces

type QueryClient

type QueryClient interface {
	// 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 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)
}

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 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) 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"`
}

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 []Deposit `protobuf:"bytes,1,rep,name=deposits,proto3" json:"deposits"`
	// 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 QueryParamsRequest

type QueryParamsRequest struct {
	// params_type defines which parameters to query for, can be one of "voting",
	// "tallying" or "deposit".
	ParamsType string `protobuf:"bytes,1,opt,name=params_type,json=paramsType,proto3" json:"params_type,omitempty"`
}

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

func (*QueryParamsRequest) Descriptor

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

func (*QueryParamsRequest) GetParamsType

func (m *QueryParamsRequest) GetParamsType() string

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 {
	// voting_params defines the parameters related to voting.
	VotingParams types.VotingParams `protobuf:"bytes,1,opt,name=voting_params,json=votingParams,proto3" json:"voting_params"`
	// deposit_params defines the parameters related to deposit.
	DepositParams DepositParams `protobuf:"bytes,2,opt,name=deposit_params,json=depositParams,proto3" json:"deposit_params"`
	// tally_params defines the parameters related to tally.
	TallyParams TallyParams `protobuf:"bytes,3,opt,name=tally_params,json=tallyParams,proto3" json:"tally_params"`
}

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

func (*QueryParamsResponse) Descriptor

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

func (*QueryParamsResponse) GetDepositParams

func (m *QueryParamsResponse) GetDepositParams() DepositParams

func (*QueryParamsResponse) GetTallyParams

func (m *QueryParamsResponse) GetTallyParams() TallyParams

func (*QueryParamsResponse) GetVotingParams

func (m *QueryParamsResponse) GetVotingParams() types.VotingParams

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 Proposal `protobuf:"bytes,1,opt,name=proposal,proto3" json:"proposal"`
}

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 QueryProposalsParams

type QueryProposalsParams struct {
	Page           int
	Limit          int
	Voter          sdk.AccAddress
	Depositor      sdk.AccAddress
	ProposalStatus ProposalStatus
}

QueryProposalsParams defines data structure for querying 'custom/gov/proposals'.

func NewQueryProposalsParams

func NewQueryProposalsParams(page, limit int, status ProposalStatus, voter, depositor sdk.AccAddress) QueryProposalsParams

NewQueryProposalsParams creates a new instance of QueryProposalsParams.

type QueryProposalsRequest

type QueryProposalsRequest struct {
	// proposal_status defines the status of the proposals.
	ProposalStatus ProposalStatus `` /* 144-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) 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 []Proposal `protobuf:"bytes,1,rep,name=proposals,proto3" json:"proposals"`
	// 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 {
	// 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 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)
}

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 types.TallyResult `protobuf:"bytes,1,opt,name=tally,proto3" json:"tally"`
}

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

func (*QueryTallyResultResponse) Descriptor

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

func (*QueryTallyResultResponse) GetTally

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 oter 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) 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 defined the queried vote.
	Vote Vote `protobuf:"bytes,1,opt,name=vote,proto3" json:"vote"`
}

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 defined the queried votes.
	Votes []Vote `protobuf:"bytes,1,rep,name=votes,proto3" json:"votes"`
	// 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 ShieldKeeper

type ShieldKeeper interface {
	GetPurchase(purchaseList shieldtypes.PurchaseList, purchaseID uint64) (shieldtypes.Purchase, bool)
	GetPurchaseList(ctx sdk.Context, poolID uint64, purchaser sdk.AccAddress) (shieldtypes.PurchaseList, bool)
	GetClaimProposalParams(ctx sdk.Context) shieldtypes.ClaimProposalParams
	SecureCollaterals(ctx sdk.Context, poolID uint64, purchaser sdk.AccAddress, purchaseID uint64, loss sdk.Coins, lockPeriod time.Duration) error
	RestoreShield(ctx sdk.Context, poolID uint64, purchaser sdk.AccAddress, id uint64, loss sdk.Coins) error
	ClaimEnd(ctx sdk.Context, id, poolID uint64, loss sdk.Coins)
}

type StakingKeeper

type StakingKeeper interface {
	IterateBondedValidatorsByPower(sdk.Context, func(index int64, validator stakingtypes.ValidatorI) (stop bool))
	TotalBondedTokens(sdk.Context) sdk.Int
	IterateDelegations(ctx sdk.Context, delegator sdk.AccAddress, fn func(index int64, delegation stakingtypes.DelegationI) (stop bool))
	BondDenom(sdk.Context) string
	GetValidator(ctx sdk.Context, addr sdk.ValAddress) (validator stakingtypes.Validator, found bool)
}

type TallyParams

type TallyParams struct {
	DefaultTally                     *types.TallyParams `protobuf:"bytes,1,opt,name=default_tally,json=defaultTally,proto3" json:"default_tally,omitempty"`
	CertifierUpdateSecurityVoteTally *types.TallyParams `` /* 163-byte string literal not displayed */
	CertifierUpdateStakeVoteTally    *types.TallyParams `` /* 154-byte string literal not displayed */
}

TallyParams defines the params for tallying votes on governance proposals.

func (*TallyParams) Descriptor

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

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 (tp 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 UnimplementedMsgServer

type UnimplementedMsgServer struct {
}

UnimplementedMsgServer can be embedded to have forward compatible implementations.

func (*UnimplementedMsgServer) Deposit

func (*UnimplementedMsgServer) SubmitProposal

func (*UnimplementedMsgServer) Vote

type UnimplementedQueryServer

type UnimplementedQueryServer struct {
}

UnimplementedQueryServer can be embedded to have forward compatible implementations.

func (*UnimplementedQueryServer) Deposit

func (*UnimplementedQueryServer) Deposits

func (*UnimplementedQueryServer) Params

func (*UnimplementedQueryServer) Proposal

func (*UnimplementedQueryServer) Proposals

func (*UnimplementedQueryServer) TallyResult

func (*UnimplementedQueryServer) Vote

func (*UnimplementedQueryServer) Votes

type UpgradeKeeper

type UpgradeKeeper interface {
	ValidatePlan(ctx sdk.Context, plan upgradetypes.Plan) error
}

type Vote

type Vote struct {
	*types.Vote `protobuf:"bytes,1,opt,name=deposit,proto3,embedded=deposit" json:"deposit,omitempty"`
	TxHash      string `protobuf:"bytes,2,opt,name=tx_hash,json=txHash,proto3" json:"tx_hash,omitempty" yaml:"txhash"`
}

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 sdk.AccAddress, option types.VoteOption, txhash string) Vote

NewVote creates a new Vote instance.

func (*Vote) Descriptor

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

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) 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 Votes

type Votes []Vote

Votes is a collection of Vote objects.

Jump to

Keyboard shortcuts

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