types

package
v0.0.4-testnet.mage Latest Latest
Warning

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

Go to latest
Published: Dec 30, 2022 License: Apache-2.0 Imports: 43 Imported by: 0

Documentation

Overview

Package types is a reverse proxy.

It translates gRPC into RESTful JSON APIs.

Index

Constants

View Source
const (
	BaseCommitteeType   = "furya-official/mageBaseCommittee"
	MemberCommitteeType = "furya-official/mageMemberCommittee" // Committee is composed of member addresses that vote to enact proposals within their permissions
	TokenCommitteeType  = "furya-official/mageTokenCommittee"  // Committee is composed of token holders with voting power determined by total token balance
	BondDenom           = "umage"
)
View Source
const (
	EventTypeProposalSubmit = "proposal_submit"
	EventTypeProposalClose  = "proposal_close"
	EventTypeProposalVote   = "proposal_vote"

	AttributeValueCategory          = "committee"
	AttributeKeyCommitteeID         = "committee_id"
	AttributeKeyProposalID          = "proposal_id"
	AttributeKeyDeadline            = "deadline"
	AttributeKeyProposalCloseStatus = "status"
	AttributeKeyVoter               = "voter"
	AttributeKeyVote                = "vote"
	AttributeKeyProposalOutcome     = "proposal_outcome"
	AttributeKeyProposalTally       = "proposal_tally"
)

Module event types

View Source
const (
	// ModuleName The name that will be used throughout the module
	ModuleName = "committee"

	// StoreKey Top level store key where all module items will be stored
	StoreKey = ModuleName

	// RouterKey Top level router key
	RouterKey = ModuleName

	// QuerierRoute Top level query string
	QuerierRoute = ModuleName

	// DefaultParamspace default name for parameter store
	DefaultParamspace = ModuleName
)
View Source
const (
	TypeMsgSubmitProposal = "commmittee_submit_proposal" // 'committee' prefix appended to avoid potential conflicts with gov msg types
	TypeMsgVote           = "committee_vote"
)
View Source
const (
	ProposalTypeCommitteeChange = "CommitteeChange"
	ProposalTypeCommitteeDelete = "CommitteeDelete"
)
View Source
const (
	QueryCommittees     = "committees"
	QueryCommittee      = "committee"
	QueryProposals      = "proposals"
	QueryProposal       = "proposal"
	QueryNextProposalID = "next-proposal-id"
	QueryVotes          = "votes"
	QueryVote           = "vote"
	QueryTally          = "tally"
	QueryRawParams      = "raw_params"
)

Query endpoints supported by the Querier

View Source
const DefaultNextProposalID uint64 = 1

DefaultNextProposalID is the starting poiint for proposal IDs.

View Source
const MaxCommitteeDescriptionLength int = 512

Variables

View Source
var (
	ErrInvalidLengthCommittee        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowCommittee          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupCommittee = fmt.Errorf("proto: unexpected end of group")
)
View Source
var (
	ErrUnknownCommittee        = sdkerrors.Register(ModuleName, 2, "committee not found")
	ErrInvalidCommittee        = sdkerrors.Register(ModuleName, 3, "invalid committee")
	ErrUnknownProposal         = sdkerrors.Register(ModuleName, 4, "proposal not found")
	ErrProposalExpired         = sdkerrors.Register(ModuleName, 5, "proposal expired")
	ErrInvalidPubProposal      = sdkerrors.Register(ModuleName, 6, "invalid pubproposal")
	ErrUnknownVote             = sdkerrors.Register(ModuleName, 7, "vote not found")
	ErrInvalidGenesis          = sdkerrors.Register(ModuleName, 8, "invalid genesis")
	ErrNoProposalHandlerExists = sdkerrors.Register(ModuleName, 9, "pubproposal has no corresponding handler")
	ErrUnknownSubspace         = sdkerrors.Register(ModuleName, 10, "subspace not found")
	ErrInvalidVoteType         = sdkerrors.Register(ModuleName, 11, "invalid vote type")
	ErrNotFoundProposalTally   = sdkerrors.Register(ModuleName, 12, "proposal tally not found")
)
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 (
	CommitteeKeyPrefix = []byte{0x00} // prefix for keys that store committees
	ProposalKeyPrefix  = []byte{0x01} // prefix for keys that store proposals
	VoteKeyPrefix      = []byte{0x02} // prefix for keys that store votes

	NextProposalIDKey = []byte{0x03} // key for the next proposal id
)

Key prefixes

View Source
var (
	ErrInvalidLengthPermissions        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowPermissions          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupPermissions = fmt.Errorf("proto: unexpected end of group")
)
View Source
var (
	ErrInvalidLengthProposal        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowProposal          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupProposal = fmt.Errorf("proto: unexpected end of group")
)
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 (

	// ModuleCdc references the global x/committee module codec. Note, the codec should
	// ONLY be used in certain instances of tests and for JSON encoding as Amino is
	// still used for that purpose.
	//
	// The actual codec used for serialization should be provided to x/committee and
	// defined at the application level.
	ModuleCdc = codec.NewAminoCodec(amino)
)
View Source
var TallyOption_name = map[int32]string{
	0: "TALLY_OPTION_UNSPECIFIED",
	1: "TALLY_OPTION_FIRST_PAST_THE_POST",
	2: "TALLY_OPTION_DEADLINE",
}
View Source
var TallyOption_value = map[string]int32{
	"TALLY_OPTION_UNSPECIFIED":         0,
	"TALLY_OPTION_FIRST_PAST_THE_POST": 1,
	"TALLY_OPTION_DEADLINE":            2,
}
View Source
var VoteType_name = map[int32]string{
	0: "VOTE_TYPE_UNSPECIFIED",
	1: "VOTE_TYPE_YES",
	2: "VOTE_TYPE_NO",
	3: "VOTE_TYPE_ABSTAIN",
}
View Source
var VoteType_value = map[string]int32{
	"VOTE_TYPE_UNSPECIFIED": 0,
	"VOTE_TYPE_YES":         1,
	"VOTE_TYPE_NO":          2,
	"VOTE_TYPE_ABSTAIN":     3,
}

Functions

func GetKeyFromID

func GetKeyFromID(id uint64) []byte

GetKeyFromID returns the bytes to use as a key for a uint64 id

func GetVoteKey

func GetVoteKey(proposalID uint64, voter sdk.AccAddress) []byte

func PackCommittee

func PackCommittee(committee Committee) (*cdctypes.Any, error)

PackCommittee converts a committee to Any

func PackCommittees

func PackCommittees(committees []Committee) ([]*cdctypes.Any, error)

PackCommittees converts a committee slice to Any slice

func PackPermissions

func PackPermissions(permissions []Permission) ([]*types.Any, error)

func RegisterInterfaces

func RegisterInterfaces(registry types.InterfaceRegistry)

func RegisterLegacyAminoCodec

func RegisterLegacyAminoCodec(cdc *codec.LegacyAmino)

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

func RegisterMsgServer

func RegisterMsgServer(s grpc1.Server, srv MsgServer)

func RegisterProposalTypeCodec

func RegisterProposalTypeCodec(o interface{}, name string)

RegisterProposalTypeCodec allows external modules to register their own pubproposal types on the internal ModuleCdc. This allows the MsgSubmitProposal to be correctly Amino encoded and decoded.

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 Uint64FromBytes

func Uint64FromBytes(bz []byte) uint64

Uint64FromBytes converts some fixed length bytes back into a uint64.

Types

type AccountKeeper

type AccountKeeper interface {
	GetAccount(sdk.Context, sdk.AccAddress) authtypes.AccountI
}

AccountKeeper defines the expected account keeper

type AllowedParamsChange

type AllowedParamsChange struct {
	Subspace string `protobuf:"bytes,1,opt,name=subspace,proto3" json:"subspace,omitempty"`
	Key      string `protobuf:"bytes,2,opt,name=key,proto3" json:"key,omitempty"`
	// Requirements for when the subparam value is a single record. This contains list of allowed attribute keys that can
	// be changed on the subparam record.
	SingleSubparamAllowedAttrs []string `` /* 143-byte string literal not displayed */
	// Requirements for when the subparam value is a list of records. The requirements contains requirements for each
	// record in the list.
	MultiSubparamsRequirements []SubparamRequirement `` /* 131-byte string literal not displayed */
}

AllowedParamsChange contains data on the allowed parameter changes for subspace, key, and sub params requirements.

func (*AllowedParamsChange) Descriptor

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

func (*AllowedParamsChange) GetKey

func (m *AllowedParamsChange) GetKey() string

func (*AllowedParamsChange) GetMultiSubparamsRequirements

func (m *AllowedParamsChange) GetMultiSubparamsRequirements() []SubparamRequirement

func (*AllowedParamsChange) GetSingleSubparamAllowedAttrs

func (m *AllowedParamsChange) GetSingleSubparamAllowedAttrs() []string

func (*AllowedParamsChange) GetSubspace

func (m *AllowedParamsChange) GetSubspace() string

func (*AllowedParamsChange) Marshal

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

func (*AllowedParamsChange) MarshalTo

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

func (*AllowedParamsChange) MarshalToSizedBuffer

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

func (*AllowedParamsChange) ProtoMessage

func (*AllowedParamsChange) ProtoMessage()

func (*AllowedParamsChange) Reset

func (m *AllowedParamsChange) Reset()

func (*AllowedParamsChange) Size

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

func (*AllowedParamsChange) String

func (m *AllowedParamsChange) String() string

func (*AllowedParamsChange) Unmarshal

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

func (*AllowedParamsChange) XXX_DiscardUnknown

func (m *AllowedParamsChange) XXX_DiscardUnknown()

func (*AllowedParamsChange) XXX_Marshal

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

func (*AllowedParamsChange) XXX_Merge

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

func (*AllowedParamsChange) XXX_Size

func (m *AllowedParamsChange) XXX_Size() int

func (*AllowedParamsChange) XXX_Unmarshal

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

type AllowedParamsChanges

type AllowedParamsChanges []AllowedParamsChange

func (*AllowedParamsChanges) Delete

func (changes *AllowedParamsChanges) Delete(subspace, key string)

Delete removes the first AllowedParamsChange matching subspace and key.

func (AllowedParamsChanges) Get

func (changes AllowedParamsChanges) Get(subspace, key string) (AllowedParamsChange, bool)

Get searches the allowedParamsChange slice for the first item matching a subspace and key. It returns false if not found.

func (*AllowedParamsChanges) Set

func (changes *AllowedParamsChanges) Set(newChange AllowedParamsChange)

Set adds a new AllowedParamsChange, overwriting the first exiting item with matching subspace and key.

type BankKeeper

type BankKeeper interface {
	GetSupply(ctx sdk.Context, denom string) sdk.Coin
	GetBalance(ctx sdk.Context, addr sdk.AccAddress, denom string) sdk.Coin
}

BankKeeper defines the expected bank keeper interface

type BaseCommittee

type BaseCommittee struct {
	ID          uint64                                          `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
	Description string                                          `protobuf:"bytes,2,opt,name=description,proto3" json:"description,omitempty"`
	Members     []github_com_cosmos_cosmos_sdk_types.AccAddress `protobuf:"bytes,3,rep,name=members,proto3,casttype=github.com/cosmos/cosmos-sdk/types.AccAddress" json:"members,omitempty"`
	Permissions []*types.Any                                    `protobuf:"bytes,4,rep,name=permissions,proto3" json:"permissions,omitempty"`
	// Smallest percentage that must vote for a proposal to pass
	VoteThreshold github_com_cosmos_cosmos_sdk_types.Dec `` /* 140-byte string literal not displayed */
	// The length of time a proposal remains active for. Proposals will close earlier if they get enough votes.
	ProposalDuration time.Duration `protobuf:"bytes,6,opt,name=proposal_duration,json=proposalDuration,proto3,stdduration" json:"proposal_duration"`
	TallyOption      TallyOption   `` /* 135-byte string literal not displayed */
}

BaseCommittee is a common type shared by all Committees

func (*BaseCommittee) Descriptor

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

func (*BaseCommittee) GetDescription

func (c *BaseCommittee) GetDescription() string

GetDescription is a getter for committee description

func (*BaseCommittee) GetID

func (c *BaseCommittee) GetID() uint64

GetID is a getter for committee ID

func (BaseCommittee) GetMembers

func (c BaseCommittee) GetMembers() []sdk.AccAddress

GetMembers is a getter for committee members

func (*BaseCommittee) GetPermissions

func (c *BaseCommittee) GetPermissions() []Permission

GetPermissions is a getter for committee permissions

func (BaseCommittee) GetProposalDuration

func (c BaseCommittee) GetProposalDuration() time.Duration

GetProposalDuration is a getter for committee ProposalDuration

func (BaseCommittee) GetTallyOption

func (c BaseCommittee) GetTallyOption() TallyOption

GetTallyOption is a getter for committee TallyOption

func (*BaseCommittee) GetType

func (c *BaseCommittee) GetType() string

GetType is a getter for committee type

func (BaseCommittee) GetVoteThreshold

func (c BaseCommittee) GetVoteThreshold() sdk.Dec

GetVoteThreshold is a getter for committee VoteThreshold

func (*BaseCommittee) HasMember

func (c *BaseCommittee) HasMember(addr sdk.AccAddress) bool

HasMember returns if a committee contains a given member address

func (BaseCommittee) HasPermissionsFor

func (c BaseCommittee) HasPermissionsFor(ctx sdk.Context, appCdc codec.Codec, pk ParamKeeper, proposal PubProposal) bool

HasPermissionsFor returns whether the committee is authorized to enact a proposal. As long as one permission allows the proposal then it goes through. Its the OR of all permissions.

func (*BaseCommittee) Marshal

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

func (*BaseCommittee) MarshalTo

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

func (*BaseCommittee) MarshalToSizedBuffer

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

func (*BaseCommittee) ProtoMessage

func (*BaseCommittee) ProtoMessage()

func (*BaseCommittee) Reset

func (m *BaseCommittee) Reset()

func (*BaseCommittee) SetMembers

func (c *BaseCommittee) SetMembers(members []sdk.AccAddress)

SetMembers is a setter for committee members

func (*BaseCommittee) SetPermissions

func (c *BaseCommittee) SetPermissions(permissions []Permission)

SetPermissions is a setter for committee permissions

func (*BaseCommittee) SetProposalDuration

func (c *BaseCommittee) SetProposalDuration(proposalDuration time.Duration)

SetProposalDuration is a setter for committee ProposalDuration

func (*BaseCommittee) SetVoteThreshold

func (c *BaseCommittee) SetVoteThreshold(voteThreshold sdk.Dec)

SetVoteThreshold is a setter for committee VoteThreshold

func (*BaseCommittee) Size

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

func (BaseCommittee) String

func (c BaseCommittee) String() string

String implements fmt.Stringer

func (*BaseCommittee) Unmarshal

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

func (BaseCommittee) UnpackInterfaces

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

UnpackInterfaces implements UnpackInterfacesMessage.UnpackInterfaces

func (BaseCommittee) Validate

func (c BaseCommittee) Validate() error

Validate validates BaseCommittee fields

func (*BaseCommittee) XXX_DiscardUnknown

func (m *BaseCommittee) XXX_DiscardUnknown()

func (*BaseCommittee) XXX_Marshal

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

func (*BaseCommittee) XXX_Merge

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

func (*BaseCommittee) XXX_Size

func (m *BaseCommittee) XXX_Size() int

func (*BaseCommittee) XXX_Unmarshal

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

type Committee

type Committee interface {
	codec.ProtoMarshaler
	codectypes.UnpackInterfacesMessage

	GetID() uint64
	GetType() string
	GetDescription() string

	GetMembers() []sdk.AccAddress
	SetMembers([]sdk.AccAddress)
	HasMember(addr sdk.AccAddress) bool

	GetPermissions() []Permission
	SetPermissions([]Permission)
	HasPermissionsFor(ctx sdk.Context, appCdc codec.Codec, pk ParamKeeper, proposal PubProposal) bool

	GetProposalDuration() time.Duration
	SetProposalDuration(time.Duration)

	GetVoteThreshold() sdk.Dec
	SetVoteThreshold(sdk.Dec)

	GetTallyOption() TallyOption
	Validate() error

	String() string
}

Committee is an interface for handling common actions on committees

func UnpackCommittee

func UnpackCommittee(committeeAny *cdctypes.Any) (Committee, error)

UnpackCommittee converts Any to Committee

type CommitteeChangeProposal

type CommitteeChangeProposal struct {
	Title        string     `protobuf:"bytes,1,opt,name=title,proto3" json:"title,omitempty"`
	Description  string     `protobuf:"bytes,2,opt,name=description,proto3" json:"description,omitempty"`
	NewCommittee *types.Any `protobuf:"bytes,3,opt,name=new_committee,json=newCommittee,proto3" json:"new_committee,omitempty"`
}

CommitteeChangeProposal is a gov proposal for creating a new committee or modifying an existing one.

func MustNewCommitteeChangeProposal

func MustNewCommitteeChangeProposal(title string, description string, newCommittee Committee) CommitteeChangeProposal

func NewCommitteeChangeProposal

func NewCommitteeChangeProposal(title string, description string, newCommittee Committee) (CommitteeChangeProposal, error)

func (*CommitteeChangeProposal) Descriptor

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

func (CommitteeChangeProposal) GetDescription

func (ccp CommitteeChangeProposal) GetDescription() string

GetDescription returns the description of the proposal.

func (CommitteeChangeProposal) GetNewCommittee

func (ccp CommitteeChangeProposal) GetNewCommittee() Committee

GetNewCommittee returns the new committee of the proposal.

func (CommitteeChangeProposal) GetTitle

func (ccp CommitteeChangeProposal) GetTitle() string

GetTitle returns the title of the proposal.

func (*CommitteeChangeProposal) Marshal

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

func (*CommitteeChangeProposal) MarshalTo

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

func (*CommitteeChangeProposal) MarshalToSizedBuffer

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

func (CommitteeChangeProposal) ProposalRoute

func (ccp CommitteeChangeProposal) ProposalRoute() string

ProposalRoute returns the routing key of the proposal.

func (CommitteeChangeProposal) ProposalType

func (ccp CommitteeChangeProposal) ProposalType() string

ProposalType returns the type of the proposal.

func (*CommitteeChangeProposal) ProtoMessage

func (*CommitteeChangeProposal) ProtoMessage()

func (*CommitteeChangeProposal) Reset

func (m *CommitteeChangeProposal) Reset()

func (*CommitteeChangeProposal) Size

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

func (*CommitteeChangeProposal) String

func (m *CommitteeChangeProposal) String() string

func (*CommitteeChangeProposal) Unmarshal

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

func (CommitteeChangeProposal) UnpackInterfaces

func (ccp CommitteeChangeProposal) UnpackInterfaces(unpacker codectypes.AnyUnpacker) error

UnpackInterfaces implements UnpackInterfacesMessage.UnpackInterfaces

func (CommitteeChangeProposal) ValidateBasic

func (ccp CommitteeChangeProposal) ValidateBasic() error

ValidateBasic runs basic stateless validity checks

func (*CommitteeChangeProposal) XXX_DiscardUnknown

func (m *CommitteeChangeProposal) XXX_DiscardUnknown()

func (*CommitteeChangeProposal) XXX_Marshal

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

func (*CommitteeChangeProposal) XXX_Merge

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

func (*CommitteeChangeProposal) XXX_Size

func (m *CommitteeChangeProposal) XXX_Size() int

func (*CommitteeChangeProposal) XXX_Unmarshal

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

type CommitteeDeleteProposal

type CommitteeDeleteProposal struct {
	Title       string `protobuf:"bytes,1,opt,name=title,proto3" json:"title,omitempty"`
	Description string `protobuf:"bytes,2,opt,name=description,proto3" json:"description,omitempty"`
	CommitteeID uint64 `protobuf:"varint,3,opt,name=committee_id,json=committeeId,proto3" json:"committee_id,omitempty"`
}

CommitteeDeleteProposal is a gov proposal for removing a committee.

func NewCommitteeDeleteProposal

func NewCommitteeDeleteProposal(title string, description string, committeeID uint64) CommitteeDeleteProposal

func (*CommitteeDeleteProposal) Descriptor

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

func (CommitteeDeleteProposal) GetDescription

func (cdp CommitteeDeleteProposal) GetDescription() string

GetDescription returns the description of the proposal.

func (CommitteeDeleteProposal) GetTitle

func (cdp CommitteeDeleteProposal) GetTitle() string

GetTitle returns the title of the proposal.

func (*CommitteeDeleteProposal) Marshal

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

func (*CommitteeDeleteProposal) MarshalTo

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

func (*CommitteeDeleteProposal) MarshalToSizedBuffer

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

func (CommitteeDeleteProposal) ProposalRoute

func (cdp CommitteeDeleteProposal) ProposalRoute() string

ProposalRoute returns the routing key of the proposal.

func (CommitteeDeleteProposal) ProposalType

func (cdp CommitteeDeleteProposal) ProposalType() string

ProposalType returns the type of the proposal.

func (*CommitteeDeleteProposal) ProtoMessage

func (*CommitteeDeleteProposal) ProtoMessage()

func (*CommitteeDeleteProposal) Reset

func (m *CommitteeDeleteProposal) Reset()

func (*CommitteeDeleteProposal) Size

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

func (*CommitteeDeleteProposal) String

func (m *CommitteeDeleteProposal) String() string

func (*CommitteeDeleteProposal) Unmarshal

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

func (CommitteeDeleteProposal) ValidateBasic

func (cdp CommitteeDeleteProposal) ValidateBasic() error

ValidateBasic runs basic stateless validity checks

func (*CommitteeDeleteProposal) XXX_DiscardUnknown

func (m *CommitteeDeleteProposal) XXX_DiscardUnknown()

func (*CommitteeDeleteProposal) XXX_Marshal

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

func (*CommitteeDeleteProposal) XXX_Merge

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

func (*CommitteeDeleteProposal) XXX_Size

func (m *CommitteeDeleteProposal) XXX_Size() int

func (*CommitteeDeleteProposal) XXX_Unmarshal

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

type Committees

type Committees []Committee

func UnpackCommittees

func UnpackCommittees(committeesAny []*cdctypes.Any) (Committees, error)

UnpackCommittees converts Any slice to Committee slice

func (Committees) UnpackInterfaces

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

UnpackInterfaces implements UnpackInterfacesMessage.UnpackInterfaces

type GenesisState

type GenesisState struct {
	NextProposalID uint64       `protobuf:"varint,1,opt,name=next_proposal_id,json=nextProposalId,proto3" json:"next_proposal_id,omitempty"`
	Committees     []*types.Any `protobuf:"bytes,2,rep,name=committees,proto3" json:"committees,omitempty"`
	Proposals      Proposals    `protobuf:"bytes,3,rep,name=proposals,proto3,castrepeated=Proposals" json:"proposals"`
	Votes          []Vote       `protobuf:"bytes,4,rep,name=votes,proto3" json:"votes"`
}

GenesisState defines the committee module's genesis state.

func DefaultGenesisState

func DefaultGenesisState() *GenesisState

DefaultGenesisState returns the default genesis state for the module.

func NewGenesisState

func NewGenesisState(nextProposalID uint64, committees []Committee, proposals Proposals, votes []Vote) *GenesisState

NewGenesisState returns a new genesis state object for the module.

func (*GenesisState) Descriptor

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

func (GenesisState) GetCommittees

func (gs GenesisState) GetCommittees() Committees

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 cdctypes.AnyUnpacker) error

UnpackInterfaces implements UnpackInterfacesMessage.UnpackInterfaces

func (GenesisState) Validate

func (gs GenesisState) Validate() error

Validate performs basic validation of genesis data.

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 GodPermission

type GodPermission struct {
}

GodPermission allows any governance proposal. It is used mainly for testing.

func (GodPermission) Allows

Allows implement permission interface for GodPermission.

func (*GodPermission) Descriptor

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

func (*GodPermission) Marshal

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

func (*GodPermission) MarshalTo

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

func (*GodPermission) MarshalToSizedBuffer

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

func (*GodPermission) ProtoMessage

func (*GodPermission) ProtoMessage()

func (*GodPermission) Reset

func (m *GodPermission) Reset()

func (*GodPermission) Size

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

func (*GodPermission) String

func (m *GodPermission) String() string

func (*GodPermission) Unmarshal

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

func (*GodPermission) XXX_DiscardUnknown

func (m *GodPermission) XXX_DiscardUnknown()

func (*GodPermission) XXX_Marshal

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

func (*GodPermission) XXX_Merge

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

func (*GodPermission) XXX_Size

func (m *GodPermission) XXX_Size() int

func (*GodPermission) XXX_Unmarshal

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

type MemberCommittee

type MemberCommittee struct {
	*BaseCommittee `protobuf:"bytes,1,opt,name=base_committee,json=baseCommittee,proto3,embedded=base_committee" json:"base_committee,omitempty"`
}

MemberCommittee is an alias of BaseCommittee

func MustNewMemberCommittee

func MustNewMemberCommittee(id uint64, description string, members []sdk.AccAddress, permissions []Permission,
	threshold sdk.Dec, duration time.Duration, tallyOption TallyOption,
) *MemberCommittee

MustNewMemberCommittee instantiates a new instance of MemberCommittee and panics on error

func NewMemberCommittee

func NewMemberCommittee(id uint64, description string, members []sdk.AccAddress, permissions []Permission,
	threshold sdk.Dec, duration time.Duration, tallyOption TallyOption,
) (*MemberCommittee, error)

NewMemberCommittee instantiates a new instance of MemberCommittee

func (*MemberCommittee) Descriptor

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

func (MemberCommittee) GetType

func (c MemberCommittee) GetType() string

GetType is a getter for committee type

func (*MemberCommittee) Marshal

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

func (*MemberCommittee) MarshalTo

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

func (*MemberCommittee) MarshalToSizedBuffer

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

func (*MemberCommittee) ProtoMessage

func (*MemberCommittee) ProtoMessage()

func (*MemberCommittee) Reset

func (m *MemberCommittee) Reset()

func (*MemberCommittee) Size

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

func (*MemberCommittee) Unmarshal

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

func (*MemberCommittee) XXX_DiscardUnknown

func (m *MemberCommittee) XXX_DiscardUnknown()

func (*MemberCommittee) XXX_Marshal

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

func (*MemberCommittee) XXX_Merge

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

func (*MemberCommittee) XXX_Size

func (m *MemberCommittee) XXX_Size() int

func (*MemberCommittee) XXX_Unmarshal

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

type MsgClient

type MsgClient interface {
	// SubmitProposal defines a method for submitting a committee proposal
	SubmitProposal(ctx context.Context, in *MsgSubmitProposal, opts ...grpc.CallOption) (*MsgSubmitProposalResponse, error)
	// Vote defines a method for voting on a proposal
	Vote(ctx context.Context, in *MsgVote, opts ...grpc.CallOption) (*MsgVoteResponse, 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 for submitting a committee proposal
	SubmitProposal(context.Context, *MsgSubmitProposal) (*MsgSubmitProposalResponse, error)
	// Vote defines a method for voting on a proposal
	Vote(context.Context, *MsgVote) (*MsgVoteResponse, error)
}

MsgServer is the server API for Msg service.

type MsgSubmitProposal

type MsgSubmitProposal struct {
	PubProposal *types.Any `protobuf:"bytes,1,opt,name=pub_proposal,json=pubProposal,proto3" json:"pub_proposal,omitempty"`
	Proposer    string     `protobuf:"bytes,2,opt,name=proposer,proto3" json:"proposer,omitempty"`
	CommitteeID uint64     `protobuf:"varint,3,opt,name=committee_id,json=committeeId,proto3" json:"committee_id,omitempty"`
}

MsgSubmitProposal is used by committee members to create a new proposal that they can vote on.

func NewMsgSubmitProposal

func NewMsgSubmitProposal(pubProposal PubProposal, proposer sdk.AccAddress, committeeID uint64) (*MsgSubmitProposal, error)

NewMsgSubmitProposal creates a new MsgSubmitProposal instance

func (*MsgSubmitProposal) Descriptor

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

func (MsgSubmitProposal) GetProposer

func (msg MsgSubmitProposal) GetProposer() sdk.AccAddress

func (MsgSubmitProposal) GetPubProposal

func (msg MsgSubmitProposal) GetPubProposal() PubProposal

func (MsgSubmitProposal) GetSignBytes

func (msg MsgSubmitProposal) GetSignBytes() []byte

GetSignBytes gets the canonical byte representation of the Msg.

func (MsgSubmitProposal) GetSigners

func (msg MsgSubmitProposal) GetSigners() []sdk.AccAddress

GetSigners returns the addresses of signers that must sign.

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

func (msg MsgSubmitProposal) Route() string

Route return the message type used for routing the message.

func (*MsgSubmitProposal) Size

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

func (*MsgSubmitProposal) String

func (m *MsgSubmitProposal) String() string

func (MsgSubmitProposal) Type

func (msg MsgSubmitProposal) Type() string

Type returns a human-readable string for the message, intended for utilization within events.

func (*MsgSubmitProposal) Unmarshal

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

func (MsgSubmitProposal) UnpackInterfaces

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

UnpackInterfaces implements UnpackInterfacesMessage.UnpackInterfaces

func (MsgSubmitProposal) ValidateBasic

func (msg MsgSubmitProposal) ValidateBasic() error

ValidateBasic does a simple validation check that doesn't require access to any other information.

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 {
	ProposalID uint64 `protobuf:"varint,1,opt,name=proposal_id,json=proposalId,proto3" json:"proposal_id,omitempty"`
}

MsgSubmitProposalResponse defines the SubmitProposal response type

func (*MsgSubmitProposalResponse) Descriptor

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

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 MsgVote

type MsgVote struct {
	ProposalID uint64   `protobuf:"varint,1,opt,name=proposal_id,json=proposalId,proto3" json:"proposal_id,omitempty"`
	Voter      string   `protobuf:"bytes,2,opt,name=voter,proto3" json:"voter,omitempty"`
	VoteType   VoteType `protobuf:"varint,3,opt,name=vote_type,json=voteType,proto3,enum=mage.committee.v1beta1.VoteType" json:"vote_type,omitempty"`
}

MsgVote is submitted by committee members to vote on proposals.

func NewMsgVote

func NewMsgVote(voter sdk.AccAddress, proposalID uint64, voteType VoteType) *MsgVote

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

func (*MsgVote) Descriptor

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

func (MsgVote) GetSignBytes

func (msg MsgVote) GetSignBytes() []byte

GetSignBytes gets the canonical byte representation of the Msg.

func (MsgVote) GetSigners

func (msg MsgVote) GetSigners() []sdk.AccAddress

GetSigners returns the addresses of signers that must sign.

func (MsgVote) GetVoter

func (msg MsgVote) GetVoter() sdk.AccAddress

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

func (msg MsgVote) Route() string

Route return the message type used for routing the message.

func (*MsgVote) Size

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

func (*MsgVote) String

func (m *MsgVote) String() string

func (MsgVote) Type

func (msg MsgVote) Type() string

Type returns a human-readable string for the message, intended for utilization within events.

func (*MsgVote) Unmarshal

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

func (MsgVote) ValidateBasic

func (msg MsgVote) ValidateBasic() error

ValidateBasic does a simple validation check that doesn't require access to any other information.

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

type MultiSubparamChanges []SubparamChanges

MultiSubparamChanges is a slice of SubparamChanges.

type ParamKeeper

type ParamKeeper interface {
	GetSubspace(string) (paramstypes.Subspace, bool)
}

type ParamsChangePermission

type ParamsChangePermission struct {
	AllowedParamsChanges AllowedParamsChanges `` /* 147-byte string literal not displayed */
}

ParamsChangePermission allows any parameter or sub parameter change proposal.

func (ParamsChangePermission) Allows

Allows implement permission interface for ParamsChangePermission.

func (*ParamsChangePermission) Descriptor

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

func (*ParamsChangePermission) GetAllowedParamsChanges

func (m *ParamsChangePermission) GetAllowedParamsChanges() AllowedParamsChanges

func (*ParamsChangePermission) Marshal

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

func (*ParamsChangePermission) MarshalTo

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

func (*ParamsChangePermission) MarshalToSizedBuffer

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

func (*ParamsChangePermission) ProtoMessage

func (*ParamsChangePermission) ProtoMessage()

func (*ParamsChangePermission) Reset

func (m *ParamsChangePermission) Reset()

func (*ParamsChangePermission) Size

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

func (*ParamsChangePermission) String

func (m *ParamsChangePermission) String() string

func (*ParamsChangePermission) Unmarshal

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

func (*ParamsChangePermission) XXX_DiscardUnknown

func (m *ParamsChangePermission) XXX_DiscardUnknown()

func (*ParamsChangePermission) XXX_Marshal

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

func (*ParamsChangePermission) XXX_Merge

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

func (*ParamsChangePermission) XXX_Size

func (m *ParamsChangePermission) XXX_Size() int

func (*ParamsChangePermission) XXX_Unmarshal

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

type Permission

type Permission interface {
	Allows(sdk.Context, ParamKeeper, PubProposal) bool
}

Permission is anything with a method that validates whether a proposal is allowed by it or not.

func UnpackPermissions

func UnpackPermissions(permissionsAny []*types.Any) ([]Permission, error)

type Proposal

type Proposal struct {
	Content     *types.Any `protobuf:"bytes,1,opt,name=content,proto3" json:"content,omitempty"`
	ID          uint64     `protobuf:"varint,2,opt,name=id,proto3" json:"id,omitempty"`
	CommitteeID uint64     `protobuf:"varint,3,opt,name=committee_id,json=committeeId,proto3" json:"committee_id,omitempty"`
	Deadline    time.Time  `protobuf:"bytes,4,opt,name=deadline,proto3,stdtime" json:"deadline"`
}

Proposal is an internal record of a governance proposal submitted to a committee.

func MustNewProposal

func MustNewProposal(pubProposal PubProposal, id uint64, committeeID uint64, deadline time.Time) Proposal

MustNewProposal instantiates a new instance of Proposal and panics if there is an error

func NewProposal

func NewProposal(pubProposal PubProposal, id uint64, committeeID uint64, deadline time.Time) (Proposal, error)

NewProposal instantiates a new instance of Proposal

func (*Proposal) Descriptor

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

func (Proposal) GetContent

func (p Proposal) GetContent() PubProposal

GetPubProposal returns the PubProposal (govtypes.Content)

func (Proposal) GetDescription

func (p Proposal) GetDescription() string

func (Proposal) GetTitle

func (p Proposal) GetTitle() string

func (Proposal) HasExpiredBy

func (p Proposal) HasExpiredBy(time time.Time) bool

HasExpiredBy calculates if the proposal will have expired by a certain time. All votes must be cast before deadline, those cast at time == deadline are not valid

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 the fmt.Stringer interface.

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

func (p Proposal) ValidateBasic() error

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 ProposalOutcome

type ProposalOutcome uint64

ProposalOutcome indicates the status of a proposal when it's closed and deleted from the store

const (
	// Passed indicates that the proposal passed and was successfully enacted
	Passed ProposalOutcome = iota
	// Failed indicates that the proposal failed and was not enacted
	Failed
	// Invalid indicates that proposal passed but an error occurred when attempting to enact it
	Invalid
)

func (ProposalOutcome) String

func (p ProposalOutcome) String() string

type Proposals

type Proposals []Proposal

func (Proposals) UnpackInterfaces

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

UnpackInterfaces implements UnpackInterfacesMessage.UnpackInterfaces

type PubProposal

type PubProposal govtypes.Content

PubProposal is the interface that all proposals must fulfill to be submitted to a committee. Proposal types can be created external to this module. For example a ParamChangeProposal, or CommunityPoolSpendProposal. It is pinned to the equivalent type in the gov module to create compatibility between proposal types.

type QueryClient

type QueryClient interface {
	// Committees queries all committess of the committee module.
	Committees(ctx context.Context, in *QueryCommitteesRequest, opts ...grpc.CallOption) (*QueryCommitteesResponse, error)
	// Committee queries a committee based on committee ID.
	Committee(ctx context.Context, in *QueryCommitteeRequest, opts ...grpc.CallOption) (*QueryCommitteeResponse, error)
	// Proposals queries proposals based on committee ID.
	Proposals(ctx context.Context, in *QueryProposalsRequest, opts ...grpc.CallOption) (*QueryProposalsResponse, error)
	// Deposits queries a proposal based on proposal ID.
	Proposal(ctx context.Context, in *QueryProposalRequest, opts ...grpc.CallOption) (*QueryProposalResponse, error)
	// NextProposalID queries the next proposal ID of the committee module.
	NextProposalID(ctx context.Context, in *QueryNextProposalIDRequest, opts ...grpc.CallOption) (*QueryNextProposalIDResponse, error)
	// Votes queries all votes for a single proposal ID.
	Votes(ctx context.Context, in *QueryVotesRequest, opts ...grpc.CallOption) (*QueryVotesResponse, error)
	// Vote queries the vote of a single voter for a single proposal ID.
	Vote(ctx context.Context, in *QueryVoteRequest, opts ...grpc.CallOption) (*QueryVoteResponse, error)
	// Tally queries the tally of a single proposal ID.
	Tally(ctx context.Context, in *QueryTallyRequest, opts ...grpc.CallOption) (*QueryTallyResponse, error)
	// RawParams queries the raw params data of any subspace and key.
	RawParams(ctx context.Context, in *QueryRawParamsRequest, opts ...grpc.CallOption) (*QueryRawParamsResponse, 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 QueryCommitteeParams

type QueryCommitteeParams struct {
	CommitteeID uint64 `json:"committee_id" yaml:"committee_id"`
}

func NewQueryCommitteeParams

func NewQueryCommitteeParams(committeeID uint64) QueryCommitteeParams

type QueryCommitteeRequest

type QueryCommitteeRequest struct {
	CommitteeId uint64 `protobuf:"varint,1,opt,name=committee_id,json=committeeId,proto3" json:"committee_id,omitempty"`
}

QueryCommitteeRequest defines the request type for querying x/committee committee.

func (*QueryCommitteeRequest) Descriptor

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

func (*QueryCommitteeRequest) Marshal

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

func (*QueryCommitteeRequest) MarshalTo

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

func (*QueryCommitteeRequest) MarshalToSizedBuffer

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

func (*QueryCommitteeRequest) ProtoMessage

func (*QueryCommitteeRequest) ProtoMessage()

func (*QueryCommitteeRequest) Reset

func (m *QueryCommitteeRequest) Reset()

func (*QueryCommitteeRequest) Size

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

func (*QueryCommitteeRequest) String

func (m *QueryCommitteeRequest) String() string

func (*QueryCommitteeRequest) Unmarshal

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

func (*QueryCommitteeRequest) XXX_DiscardUnknown

func (m *QueryCommitteeRequest) XXX_DiscardUnknown()

func (*QueryCommitteeRequest) XXX_Marshal

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

func (*QueryCommitteeRequest) XXX_Merge

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

func (*QueryCommitteeRequest) XXX_Size

func (m *QueryCommitteeRequest) XXX_Size() int

func (*QueryCommitteeRequest) XXX_Unmarshal

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

type QueryCommitteeResponse

type QueryCommitteeResponse struct {
	Committee *types.Any `protobuf:"bytes,1,opt,name=committee,proto3" json:"committee,omitempty"`
}

QueryCommitteeResponse defines the response type for querying x/committee committee.

func (*QueryCommitteeResponse) Descriptor

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

func (*QueryCommitteeResponse) Marshal

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

func (*QueryCommitteeResponse) MarshalTo

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

func (*QueryCommitteeResponse) MarshalToSizedBuffer

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

func (*QueryCommitteeResponse) ProtoMessage

func (*QueryCommitteeResponse) ProtoMessage()

func (*QueryCommitteeResponse) Reset

func (m *QueryCommitteeResponse) Reset()

func (*QueryCommitteeResponse) Size

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

func (*QueryCommitteeResponse) String

func (m *QueryCommitteeResponse) String() string

func (*QueryCommitteeResponse) Unmarshal

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

func (*QueryCommitteeResponse) XXX_DiscardUnknown

func (m *QueryCommitteeResponse) XXX_DiscardUnknown()

func (*QueryCommitteeResponse) XXX_Marshal

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

func (*QueryCommitteeResponse) XXX_Merge

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

func (*QueryCommitteeResponse) XXX_Size

func (m *QueryCommitteeResponse) XXX_Size() int

func (*QueryCommitteeResponse) XXX_Unmarshal

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

type QueryCommitteesRequest

type QueryCommitteesRequest struct {
}

QueryCommitteesRequest defines the request type for querying x/committee committees.

func (*QueryCommitteesRequest) Descriptor

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

func (*QueryCommitteesRequest) Marshal

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

func (*QueryCommitteesRequest) MarshalTo

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

func (*QueryCommitteesRequest) MarshalToSizedBuffer

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

func (*QueryCommitteesRequest) ProtoMessage

func (*QueryCommitteesRequest) ProtoMessage()

func (*QueryCommitteesRequest) Reset

func (m *QueryCommitteesRequest) Reset()

func (*QueryCommitteesRequest) Size

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

func (*QueryCommitteesRequest) String

func (m *QueryCommitteesRequest) String() string

func (*QueryCommitteesRequest) Unmarshal

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

func (*QueryCommitteesRequest) XXX_DiscardUnknown

func (m *QueryCommitteesRequest) XXX_DiscardUnknown()

func (*QueryCommitteesRequest) XXX_Marshal

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

func (*QueryCommitteesRequest) XXX_Merge

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

func (*QueryCommitteesRequest) XXX_Size

func (m *QueryCommitteesRequest) XXX_Size() int

func (*QueryCommitteesRequest) XXX_Unmarshal

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

type QueryCommitteesResponse

type QueryCommitteesResponse struct {
	Committees []*types.Any `protobuf:"bytes,1,rep,name=committees,proto3" json:"committees,omitempty"`
}

QueryCommitteesResponse defines the response type for querying x/committee committees.

func (*QueryCommitteesResponse) Descriptor

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

func (*QueryCommitteesResponse) Marshal

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

func (*QueryCommitteesResponse) MarshalTo

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

func (*QueryCommitteesResponse) MarshalToSizedBuffer

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

func (*QueryCommitteesResponse) ProtoMessage

func (*QueryCommitteesResponse) ProtoMessage()

func (*QueryCommitteesResponse) Reset

func (m *QueryCommitteesResponse) Reset()

func (*QueryCommitteesResponse) Size

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

func (*QueryCommitteesResponse) String

func (m *QueryCommitteesResponse) String() string

func (*QueryCommitteesResponse) Unmarshal

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

func (*QueryCommitteesResponse) XXX_DiscardUnknown

func (m *QueryCommitteesResponse) XXX_DiscardUnknown()

func (*QueryCommitteesResponse) XXX_Marshal

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

func (*QueryCommitteesResponse) XXX_Merge

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

func (*QueryCommitteesResponse) XXX_Size

func (m *QueryCommitteesResponse) XXX_Size() int

func (*QueryCommitteesResponse) XXX_Unmarshal

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

type QueryNextProposalIDRequest

type QueryNextProposalIDRequest struct {
}

QueryNextProposalIDRequest defines the request type for querying x/committee NextProposalID.

func (*QueryNextProposalIDRequest) Descriptor

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

func (*QueryNextProposalIDRequest) Marshal

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

func (*QueryNextProposalIDRequest) MarshalTo

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

func (*QueryNextProposalIDRequest) MarshalToSizedBuffer

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

func (*QueryNextProposalIDRequest) ProtoMessage

func (*QueryNextProposalIDRequest) ProtoMessage()

func (*QueryNextProposalIDRequest) Reset

func (m *QueryNextProposalIDRequest) Reset()

func (*QueryNextProposalIDRequest) Size

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

func (*QueryNextProposalIDRequest) String

func (m *QueryNextProposalIDRequest) String() string

func (*QueryNextProposalIDRequest) Unmarshal

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

func (*QueryNextProposalIDRequest) XXX_DiscardUnknown

func (m *QueryNextProposalIDRequest) XXX_DiscardUnknown()

func (*QueryNextProposalIDRequest) XXX_Marshal

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

func (*QueryNextProposalIDRequest) XXX_Merge

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

func (*QueryNextProposalIDRequest) XXX_Size

func (m *QueryNextProposalIDRequest) XXX_Size() int

func (*QueryNextProposalIDRequest) XXX_Unmarshal

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

type QueryNextProposalIDResponse

type QueryNextProposalIDResponse struct {
	NextProposalID uint64 `protobuf:"varint,1,opt,name=next_proposal_id,json=nextProposalId,proto3" json:"next_proposal_id,omitempty"`
}

QueryNextProposalIDRequest defines the response type for querying x/committee NextProposalID.

func (*QueryNextProposalIDResponse) Descriptor

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

func (*QueryNextProposalIDResponse) Marshal

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

func (*QueryNextProposalIDResponse) MarshalTo

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

func (*QueryNextProposalIDResponse) MarshalToSizedBuffer

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

func (*QueryNextProposalIDResponse) ProtoMessage

func (*QueryNextProposalIDResponse) ProtoMessage()

func (*QueryNextProposalIDResponse) Reset

func (m *QueryNextProposalIDResponse) Reset()

func (*QueryNextProposalIDResponse) Size

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

func (*QueryNextProposalIDResponse) String

func (m *QueryNextProposalIDResponse) String() string

func (*QueryNextProposalIDResponse) Unmarshal

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

func (*QueryNextProposalIDResponse) XXX_DiscardUnknown

func (m *QueryNextProposalIDResponse) XXX_DiscardUnknown()

func (*QueryNextProposalIDResponse) XXX_Marshal

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

func (*QueryNextProposalIDResponse) XXX_Merge

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

func (*QueryNextProposalIDResponse) XXX_Size

func (m *QueryNextProposalIDResponse) XXX_Size() int

func (*QueryNextProposalIDResponse) XXX_Unmarshal

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

type QueryProposalParams

type QueryProposalParams struct {
	ProposalID uint64 `json:"proposal_id" yaml:"proposal_id"`
}

func NewQueryProposalParams

func NewQueryProposalParams(proposalID uint64) QueryProposalParams

type QueryProposalRequest

type QueryProposalRequest struct {
	ProposalId uint64 `protobuf:"varint,1,opt,name=proposal_id,json=proposalId,proto3" json:"proposal_id,omitempty"`
}

QueryProposalRequest defines the request type for querying x/committee proposal.

func (*QueryProposalRequest) Descriptor

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

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 {
	PubProposal *types.Any `protobuf:"bytes,1,opt,name=pub_proposal,json=pubProposal,proto3" json:"pub_proposal,omitempty"`
	ID          uint64     `protobuf:"varint,2,opt,name=id,proto3" json:"id,omitempty"`
	CommitteeID uint64     `protobuf:"varint,3,opt,name=committee_id,json=committeeId,proto3" json:"committee_id,omitempty"`
	Deadline    time.Time  `protobuf:"bytes,4,opt,name=deadline,proto3,stdtime" json:"deadline"`
}

QueryProposalResponse defines the response type for querying x/committee proposal.

func (*QueryProposalResponse) Descriptor

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

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 QueryProposalsRequest

type QueryProposalsRequest struct {
	CommitteeId uint64 `protobuf:"varint,1,opt,name=committee_id,json=committeeId,proto3" json:"committee_id,omitempty"`
}

QueryProposalsRequest defines the request type for querying x/committee proposals.

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 []QueryProposalResponse `protobuf:"bytes,1,rep,name=proposals,proto3" json:"proposals"`
}

QueryProposalsResponse defines the response type for querying x/committee proposals.

func (*QueryProposalsResponse) Descriptor

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

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 QueryRawParamsParams

type QueryRawParamsParams struct {
	Subspace string
	Key      string
}

func NewQueryRawParamsParams

func NewQueryRawParamsParams(subspace, key string) QueryRawParamsParams

type QueryRawParamsRequest

type QueryRawParamsRequest struct {
	Subspace string `protobuf:"bytes,1,opt,name=subspace,proto3" json:"subspace,omitempty"`
	Key      string `protobuf:"bytes,2,opt,name=key,proto3" json:"key,omitempty"`
}

QueryRawParamsRequest defines the request type for querying x/committee raw params.

func (*QueryRawParamsRequest) Descriptor

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

func (*QueryRawParamsRequest) Marshal

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

func (*QueryRawParamsRequest) MarshalTo

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

func (*QueryRawParamsRequest) MarshalToSizedBuffer

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

func (*QueryRawParamsRequest) ProtoMessage

func (*QueryRawParamsRequest) ProtoMessage()

func (*QueryRawParamsRequest) Reset

func (m *QueryRawParamsRequest) Reset()

func (*QueryRawParamsRequest) Size

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

func (*QueryRawParamsRequest) String

func (m *QueryRawParamsRequest) String() string

func (*QueryRawParamsRequest) Unmarshal

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

func (*QueryRawParamsRequest) XXX_DiscardUnknown

func (m *QueryRawParamsRequest) XXX_DiscardUnknown()

func (*QueryRawParamsRequest) XXX_Marshal

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

func (*QueryRawParamsRequest) XXX_Merge

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

func (*QueryRawParamsRequest) XXX_Size

func (m *QueryRawParamsRequest) XXX_Size() int

func (*QueryRawParamsRequest) XXX_Unmarshal

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

type QueryRawParamsResponse

type QueryRawParamsResponse struct {
	RawData string `protobuf:"bytes,1,opt,name=raw_data,json=rawData,proto3" json:"raw_data,omitempty"`
}

QueryRawParamsResponse defines the response type for querying x/committee raw params.

func (*QueryRawParamsResponse) Descriptor

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

func (*QueryRawParamsResponse) Marshal

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

func (*QueryRawParamsResponse) MarshalTo

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

func (*QueryRawParamsResponse) MarshalToSizedBuffer

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

func (*QueryRawParamsResponse) ProtoMessage

func (*QueryRawParamsResponse) ProtoMessage()

func (*QueryRawParamsResponse) Reset

func (m *QueryRawParamsResponse) Reset()

func (*QueryRawParamsResponse) Size

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

func (*QueryRawParamsResponse) String

func (m *QueryRawParamsResponse) String() string

func (*QueryRawParamsResponse) Unmarshal

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

func (*QueryRawParamsResponse) XXX_DiscardUnknown

func (m *QueryRawParamsResponse) XXX_DiscardUnknown()

func (*QueryRawParamsResponse) XXX_Marshal

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

func (*QueryRawParamsResponse) XXX_Merge

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

func (*QueryRawParamsResponse) XXX_Size

func (m *QueryRawParamsResponse) XXX_Size() int

func (*QueryRawParamsResponse) XXX_Unmarshal

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

type QueryServer

type QueryServer interface {
	// Committees queries all committess of the committee module.
	Committees(context.Context, *QueryCommitteesRequest) (*QueryCommitteesResponse, error)
	// Committee queries a committee based on committee ID.
	Committee(context.Context, *QueryCommitteeRequest) (*QueryCommitteeResponse, error)
	// Proposals queries proposals based on committee ID.
	Proposals(context.Context, *QueryProposalsRequest) (*QueryProposalsResponse, error)
	// Deposits queries a proposal based on proposal ID.
	Proposal(context.Context, *QueryProposalRequest) (*QueryProposalResponse, error)
	// NextProposalID queries the next proposal ID of the committee module.
	NextProposalID(context.Context, *QueryNextProposalIDRequest) (*QueryNextProposalIDResponse, error)
	// Votes queries all votes for a single proposal ID.
	Votes(context.Context, *QueryVotesRequest) (*QueryVotesResponse, error)
	// Vote queries the vote of a single voter for a single proposal ID.
	Vote(context.Context, *QueryVoteRequest) (*QueryVoteResponse, error)
	// Tally queries the tally of a single proposal ID.
	Tally(context.Context, *QueryTallyRequest) (*QueryTallyResponse, error)
	// RawParams queries the raw params data of any subspace and key.
	RawParams(context.Context, *QueryRawParamsRequest) (*QueryRawParamsResponse, error)
}

QueryServer is the server API for Query service.

type QueryTallyRequest

type QueryTallyRequest struct {
	ProposalId uint64 `protobuf:"varint,1,opt,name=proposal_id,json=proposalId,proto3" json:"proposal_id,omitempty"`
}

QueryTallyRequest defines the request type for querying x/committee tally.

func (*QueryTallyRequest) Descriptor

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

func (*QueryTallyRequest) Marshal

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

func (*QueryTallyRequest) MarshalTo

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

func (*QueryTallyRequest) MarshalToSizedBuffer

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

func (*QueryTallyRequest) ProtoMessage

func (*QueryTallyRequest) ProtoMessage()

func (*QueryTallyRequest) Reset

func (m *QueryTallyRequest) Reset()

func (*QueryTallyRequest) Size

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

func (*QueryTallyRequest) String

func (m *QueryTallyRequest) String() string

func (*QueryTallyRequest) Unmarshal

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

func (*QueryTallyRequest) XXX_DiscardUnknown

func (m *QueryTallyRequest) XXX_DiscardUnknown()

func (*QueryTallyRequest) XXX_Marshal

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

func (*QueryTallyRequest) XXX_Merge

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

func (*QueryTallyRequest) XXX_Size

func (m *QueryTallyRequest) XXX_Size() int

func (*QueryTallyRequest) XXX_Unmarshal

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

type QueryTallyResponse

type QueryTallyResponse struct {
	ProposalID    uint64                                 `protobuf:"varint,1,opt,name=proposal_id,json=proposalId,proto3" json:"proposal_id,omitempty"`
	YesVotes      github_com_cosmos_cosmos_sdk_types.Dec `protobuf:"bytes,2,opt,name=yes_votes,json=yesVotes,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Dec" json:"yes_votes"`
	NoVotes       github_com_cosmos_cosmos_sdk_types.Dec `protobuf:"bytes,3,opt,name=no_votes,json=noVotes,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Dec" json:"no_votes"`
	CurrentVotes  github_com_cosmos_cosmos_sdk_types.Dec `` /* 137-byte string literal not displayed */
	PossibleVotes github_com_cosmos_cosmos_sdk_types.Dec `` /* 140-byte string literal not displayed */
	VoteThreshold github_com_cosmos_cosmos_sdk_types.Dec `` /* 140-byte string literal not displayed */
	Quorum        github_com_cosmos_cosmos_sdk_types.Dec `protobuf:"bytes,7,opt,name=quorum,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Dec" json:"quorum"`
}

QueryTallyResponse defines the response type for querying x/committee tally.

func (*QueryTallyResponse) Descriptor

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

func (*QueryTallyResponse) Marshal

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

func (*QueryTallyResponse) MarshalTo

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

func (*QueryTallyResponse) MarshalToSizedBuffer

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

func (*QueryTallyResponse) ProtoMessage

func (*QueryTallyResponse) ProtoMessage()

func (*QueryTallyResponse) Reset

func (m *QueryTallyResponse) Reset()

func (*QueryTallyResponse) Size

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

func (*QueryTallyResponse) String

func (m *QueryTallyResponse) String() string

func (*QueryTallyResponse) Unmarshal

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

func (*QueryTallyResponse) XXX_DiscardUnknown

func (m *QueryTallyResponse) XXX_DiscardUnknown()

func (*QueryTallyResponse) XXX_Marshal

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

func (*QueryTallyResponse) XXX_Merge

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

func (*QueryTallyResponse) XXX_Size

func (m *QueryTallyResponse) XXX_Size() int

func (*QueryTallyResponse) XXX_Unmarshal

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

type QueryVoteParams

type QueryVoteParams struct {
	ProposalID uint64         `json:"proposal_id" yaml:"proposal_id"`
	Voter      sdk.AccAddress `json:"voter" yaml:"voter"`
}

func NewQueryVoteParams

func NewQueryVoteParams(proposalID uint64, voter sdk.AccAddress) QueryVoteParams

type QueryVoteRequest

type QueryVoteRequest struct {
	ProposalId uint64 `protobuf:"varint,1,opt,name=proposal_id,json=proposalId,proto3" json:"proposal_id,omitempty"`
	Voter      string `protobuf:"bytes,2,opt,name=voter,proto3" json:"voter,omitempty"`
}

QueryVoteRequest defines the request type for querying x/committee vote.

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 {
	ProposalID uint64   `protobuf:"varint,1,opt,name=proposal_id,json=proposalId,proto3" json:"proposal_id,omitempty"`
	Voter      string   `protobuf:"bytes,2,opt,name=voter,proto3" json:"voter,omitempty"`
	VoteType   VoteType `protobuf:"varint,3,opt,name=vote_type,json=voteType,proto3,enum=mage.committee.v1beta1.VoteType" json:"vote_type,omitempty"`
}

QueryVoteResponse defines the response type for querying x/committee vote.

func (*QueryVoteResponse) Descriptor

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

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 {
	ProposalId uint64             `protobuf:"varint,1,opt,name=proposal_id,json=proposalId,proto3" json:"proposal_id,omitempty"`
	Pagination *query.PageRequest `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"`
}

QueryVotesRequest defines the request type for querying x/committee votes.

func (*QueryVotesRequest) Descriptor

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

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 []QueryVoteResponse `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 defines the response type for querying x/committee votes.

func (*QueryVotesResponse) Descriptor

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

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 SoftwareUpgradePermission

type SoftwareUpgradePermission struct {
}

SoftwareUpgradePermission permission type for software upgrade proposals

func (SoftwareUpgradePermission) Allows

Allows implement permission interface for SoftwareUpgradePermission.

func (*SoftwareUpgradePermission) Descriptor

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

func (*SoftwareUpgradePermission) Marshal

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

func (*SoftwareUpgradePermission) MarshalTo

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

func (*SoftwareUpgradePermission) MarshalToSizedBuffer

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

func (*SoftwareUpgradePermission) ProtoMessage

func (*SoftwareUpgradePermission) ProtoMessage()

func (*SoftwareUpgradePermission) Reset

func (m *SoftwareUpgradePermission) Reset()

func (*SoftwareUpgradePermission) Size

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

func (*SoftwareUpgradePermission) String

func (m *SoftwareUpgradePermission) String() string

func (*SoftwareUpgradePermission) Unmarshal

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

func (*SoftwareUpgradePermission) XXX_DiscardUnknown

func (m *SoftwareUpgradePermission) XXX_DiscardUnknown()

func (*SoftwareUpgradePermission) XXX_Marshal

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

func (*SoftwareUpgradePermission) XXX_Merge

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

func (*SoftwareUpgradePermission) XXX_Size

func (m *SoftwareUpgradePermission) XXX_Size() int

func (*SoftwareUpgradePermission) XXX_Unmarshal

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

type SubparamChanges

type SubparamChanges map[string]interface{}

SubparamChanges is a map of sub param change keys and its values.

type SubparamRequirement

type SubparamRequirement struct {
	// The required attr key of the param record.
	Key string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"`
	// The required param value for the param record key. The key and value is used to match to the target param record.
	Val string `protobuf:"bytes,2,opt,name=val,proto3" json:"val,omitempty"`
	// The sub param attrs that are allowed to be changed.
	AllowedSubparamAttrChanges []string `` /* 143-byte string literal not displayed */
}

SubparamRequirement contains requirements for a single record in a subparam value list

func (*SubparamRequirement) Descriptor

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

func (*SubparamRequirement) GetAllowedSubparamAttrChanges

func (m *SubparamRequirement) GetAllowedSubparamAttrChanges() []string

func (*SubparamRequirement) GetKey

func (m *SubparamRequirement) GetKey() string

func (*SubparamRequirement) GetVal

func (m *SubparamRequirement) GetVal() string

func (*SubparamRequirement) Marshal

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

func (*SubparamRequirement) MarshalTo

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

func (*SubparamRequirement) MarshalToSizedBuffer

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

func (*SubparamRequirement) ProtoMessage

func (*SubparamRequirement) ProtoMessage()

func (*SubparamRequirement) Reset

func (m *SubparamRequirement) Reset()

func (*SubparamRequirement) Size

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

func (*SubparamRequirement) String

func (m *SubparamRequirement) String() string

func (*SubparamRequirement) Unmarshal

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

func (*SubparamRequirement) XXX_DiscardUnknown

func (m *SubparamRequirement) XXX_DiscardUnknown()

func (*SubparamRequirement) XXX_Marshal

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

func (*SubparamRequirement) XXX_Merge

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

func (*SubparamRequirement) XXX_Size

func (m *SubparamRequirement) XXX_Size() int

func (*SubparamRequirement) XXX_Unmarshal

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

type TallyOption

type TallyOption int32

TallyOption enumerates the valid types of a tally.

const (
	// TALLY_OPTION_UNSPECIFIED defines a null tally option.
	TALLY_OPTION_UNSPECIFIED TallyOption = 0
	// Votes are tallied each block and the proposal passes as soon as the vote threshold is reached
	TALLY_OPTION_FIRST_PAST_THE_POST TallyOption = 1
	// Votes are tallied exactly once, when the deadline time is reached
	TALLY_OPTION_DEADLINE TallyOption = 2
)

func (TallyOption) EnumDescriptor

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

func (TallyOption) Marshal

func (t TallyOption) Marshal() ([]byte, error)

Marshal needed for protobuf compatibility.

func (TallyOption) String

func (x TallyOption) String() string

func (*TallyOption) Unmarshal

func (t *TallyOption) Unmarshal(data []byte) error

Unmarshal needed for protobuf compatibility.

type TextPermission

type TextPermission struct {
}

TextPermission allows any text governance proposal.

func (TextPermission) Allows

Allows implement permission interface for TextPermission.

func (*TextPermission) Descriptor

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

func (*TextPermission) Marshal

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

func (*TextPermission) MarshalTo

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

func (*TextPermission) MarshalToSizedBuffer

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

func (*TextPermission) ProtoMessage

func (*TextPermission) ProtoMessage()

func (*TextPermission) Reset

func (m *TextPermission) Reset()

func (*TextPermission) Size

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

func (*TextPermission) String

func (m *TextPermission) String() string

func (*TextPermission) Unmarshal

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

func (*TextPermission) XXX_DiscardUnknown

func (m *TextPermission) XXX_DiscardUnknown()

func (*TextPermission) XXX_Marshal

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

func (*TextPermission) XXX_Merge

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

func (*TextPermission) XXX_Size

func (m *TextPermission) XXX_Size() int

func (*TextPermission) XXX_Unmarshal

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

type TokenCommittee

type TokenCommittee struct {
	*BaseCommittee `protobuf:"bytes,1,opt,name=base_committee,json=baseCommittee,proto3,embedded=base_committee" json:"base_committee,omitempty"`
	Quorum         github_com_cosmos_cosmos_sdk_types.Dec `protobuf:"bytes,2,opt,name=quorum,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Dec" json:"quorum"`
	TallyDenom     string                                 `protobuf:"bytes,3,opt,name=tally_denom,json=tallyDenom,proto3" json:"tally_denom,omitempty"`
}

TokenCommittee supports voting on proposals by token holders

func MustNewTokenCommittee

func MustNewTokenCommittee(id uint64, description string, members []sdk.AccAddress, permissions []Permission,
	threshold sdk.Dec, duration time.Duration, tallyOption TallyOption, quorum sdk.Dec, tallyDenom string,
) *TokenCommittee

MustNewTokenCommittee instantiates a new instance of TokenCommittee and panics on error

func NewTokenCommittee

func NewTokenCommittee(id uint64, description string, members []sdk.AccAddress, permissions []Permission,
	threshold sdk.Dec, duration time.Duration, tallyOption TallyOption, quorum sdk.Dec, tallyDenom string,
) (*TokenCommittee, error)

NewTokenCommittee instantiates a new instance of TokenCommittee

func (*TokenCommittee) Descriptor

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

func (TokenCommittee) GetQuorum

func (c TokenCommittee) GetQuorum() sdk.Dec

GetQuorum returns the quorum of the committee

func (TokenCommittee) GetTallyDenom

func (c TokenCommittee) GetTallyDenom() string

GetTallyDenom returns the tally denom of the committee

func (TokenCommittee) GetType

func (c TokenCommittee) GetType() string

GetType is a getter for committee type

func (*TokenCommittee) Marshal

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

func (*TokenCommittee) MarshalTo

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

func (*TokenCommittee) MarshalToSizedBuffer

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

func (*TokenCommittee) ProtoMessage

func (*TokenCommittee) ProtoMessage()

func (*TokenCommittee) Reset

func (m *TokenCommittee) Reset()

func (*TokenCommittee) Size

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

func (*TokenCommittee) Unmarshal

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

func (TokenCommittee) Validate

func (c TokenCommittee) Validate() error

Validate validates the committee's fields

func (*TokenCommittee) XXX_DiscardUnknown

func (m *TokenCommittee) XXX_DiscardUnknown()

func (*TokenCommittee) XXX_Marshal

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

func (*TokenCommittee) XXX_Merge

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

func (*TokenCommittee) XXX_Size

func (m *TokenCommittee) XXX_Size() int

func (*TokenCommittee) XXX_Unmarshal

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

type UnimplementedMsgServer

type UnimplementedMsgServer struct {
}

UnimplementedMsgServer can be embedded to have forward compatible implementations.

func (*UnimplementedMsgServer) SubmitProposal

func (*UnimplementedMsgServer) Vote

type UnimplementedQueryServer

type UnimplementedQueryServer struct {
}

UnimplementedQueryServer can be embedded to have forward compatible implementations.

func (*UnimplementedQueryServer) Committee

func (*UnimplementedQueryServer) Committees

func (*UnimplementedQueryServer) NextProposalID

func (*UnimplementedQueryServer) Proposal

func (*UnimplementedQueryServer) Proposals

func (*UnimplementedQueryServer) RawParams

func (*UnimplementedQueryServer) Tally

func (*UnimplementedQueryServer) Vote

func (*UnimplementedQueryServer) Votes

type Vote

type Vote struct {
	ProposalID uint64                                        `protobuf:"varint,1,opt,name=proposal_id,json=proposalId,proto3" json:"proposal_id,omitempty"`
	Voter      github_com_cosmos_cosmos_sdk_types.AccAddress `protobuf:"bytes,2,opt,name=voter,proto3,casttype=github.com/cosmos/cosmos-sdk/types.AccAddress" json:"voter,omitempty"`
	VoteType   VoteType                                      `protobuf:"varint,3,opt,name=vote_type,json=voteType,proto3,enum=mage.committee.v1beta1.VoteType" json:"vote_type,omitempty"`
}

Vote is an internal record of a single governance vote.

func NewVote

func NewVote(proposalID uint64, voter sdk.AccAddress, voteType VoteType) Vote

NewVote instantiates a new instance of Vote

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

func (m *Vote) String() string

func (*Vote) Unmarshal

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

func (Vote) Validate

func (v Vote) Validate() error

Validates Vote fields

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 VoteType

type VoteType int32

VoteType enumerates the valid types of a vote.

const (
	// VOTE_TYPE_UNSPECIFIED defines a no-op vote option.
	VOTE_TYPE_UNSPECIFIED VoteType = 0
	// VOTE_TYPE_YES defines a yes vote option.
	VOTE_TYPE_YES VoteType = 1
	// VOTE_TYPE_NO defines a no vote option.
	VOTE_TYPE_NO VoteType = 2
	// VOTE_TYPE_ABSTAIN defines an abstain vote option.
	VOTE_TYPE_ABSTAIN VoteType = 3
)

func (VoteType) EnumDescriptor

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

func (VoteType) Format

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

Format implements the fmt.Formatter interface.

func (VoteType) Marshal

func (vt VoteType) Marshal() ([]byte, error)

Marshal needed for protobuf compatibility.

func (VoteType) String

func (x VoteType) String() string

func (*VoteType) Unmarshal

func (vt *VoteType) Unmarshal(data []byte) error

Unmarshal needed for protobuf compatibility.

func (VoteType) Validate

func (vt VoteType) Validate() error

Jump to

Keyboard shortcuts

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