types

package
v20.2.2-retracted Latest Latest
Warning

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

Go to latest
Published: Nov 20, 2023 License: Apache-2.0 Imports: 41 Imported by: 15

Documentation

Overview

Package types is a reverse proxy.

It translates gRPC into RESTful JSON APIs.

Index

Constants

View Source
const (
	TypeEvtCreateGauge  = "create_gauge"
	TypeEvtAddToGauge   = "add_to_gauge"
	TypeEvtCreateGroup  = "create_group"
	TypeEvtDistribution = "distribution"

	AttributeGaugeID     = "gauge_id"
	AttributeGroupID     = "group_id"
	AttributeLockedDenom = "denom"
	AttributeReceiver    = "receiver"
	AttributeAmount      = "amount"
)

Incentive module event types.

View Source
const (
	TypeMsgCreateGauge = "create_gauge"
	TypeMsgAddToGauge  = "add_to_gauge"
	TypeMsgCreateGroup = "create_group"
)
View Source
const DefaultIndex uint64 = 1

DefaultIndex is the default incentive module's global index.

View Source
const (
	ProposalTypeCreateGroups = "CreateGroups"
)

Variables

View Source
var (
	BaseGasFeeForCreateGauge      = 10_000
	BaseGasFeeForAddRewardToGauge = 10_000
	// We set the default value to 1ns, as this is the only uptime we support as long as charging is disabled (or
	// until more supported uptimes are authorized by governance).
	DefaultConcentratedUptime = time.Nanosecond

	// PerpetualNumEpochsPaidOver is the number of epochs that must be given
	// for a gauge to be perpetual. For any other number of epochs
	// other than zero, the gauge is non-perpetual. Zero is invalid.
	PerpetualNumEpochsPaidOver = uint64(0)
)
View Source
var (
	ErrNoPoolIDsGiven        = fmt.Errorf("no pool IDs given")
	ErrZeroNumEpochsPaidOver = fmt.Errorf("num epochs paid over must be greater than zero for non-perpetual gauges")
	ErrUnauthorized          = fmt.Errorf("unauthorized to perform this action. Must be an incentives module account")
)
View Source
var (
	// CreateGaugeFee is the fee required to create a new gauge.
	CreateGaugeFee = osmomath.NewInt(50 * 1_000_000)
	// AddToGagugeFee is the fee required to add to gauge.
	AddToGaugeFee = osmomath.NewInt(25 * 1_000_000)
)
View Source
var (
	ErrInvalidLengthGauge        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowGauge          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupGauge = fmt.Errorf("proto: unexpected end of group")
)
View Source
var (
	ErrInvalidLengthGenesis        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowGenesis          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupGenesis = fmt.Errorf("proto: unexpected end of group")
)
View Source
var (
	ErrInvalidLengthGov        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowGov          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupGov = fmt.Errorf("proto: unexpected end of group")
)
View Source
var (
	ErrInvalidLengthGroup        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowGroup          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupGroup = fmt.Errorf("proto: unexpected end of group")
)
View Source
var (
	// ModuleName defines the module name.
	ModuleName = "incentives"

	// StoreKey defines the primary module store key.
	StoreKey = ModuleName

	// RouterKey is the message route for slashing.
	RouterKey = ModuleName

	// QuerierRoute defines the module's query routing key.
	QuerierRoute = ModuleName

	// MemStoreKey defines the in-memory store key.
	MemStoreKey = "mem_capability"

	// KeyPrefixTimestamp defines prefix key for timestamp iterator key.
	KeyPrefixTimestamp = []byte{0x01}

	// KeyLastGaugeID defines key for setting last gauge ID.
	KeyLastGaugeID = []byte{0x02}

	// KeyPrefixPeriodGauge defines prefix key for storing gauges.
	KeyPrefixPeriodGauge = []byte{0x03}

	// KeyPrefixGauges defines prefix key for storing reference key for all gauges.
	KeyPrefixGauges = []byte{0x04}

	// KeyPrefixUpcomingGauges defines prefix key for storing reference key for upcoming gauges.
	KeyPrefixUpcomingGauges = []byte{0x04, 0x00}

	// KeyPrefixActiveGauges defines prefix key for storing reference key for active gauges.
	KeyPrefixActiveGauges = []byte{0x04, 0x01}

	// KeyPrefixFinishedGauges defines prefix key for storing reference key for finished gauges.
	KeyPrefixFinishedGauges = []byte{0x04, 0x02}

	// KeyPrefixGaugesByDenom defines prefix key for storing indexes of gauge IDs by denomination.
	KeyPrefixGaugesByDenom = []byte{0x05}

	// KeyIndexSeparator defines key for merging bytes.
	KeyIndexSeparator = []byte{0x07}

	// KeyPrefixGroup defines prefix key for storing groups.
	KeyPrefixGroup = []byte{0x08}

	// LockableDurationsKey defines key for storing valid durations for giving incentives.
	LockableDurationsKey = []byte("lockable_durations")

	NoLockInternalPrefix = "no-lock/i/"
	NoLockExternalPrefix = "no-lock/e/"
)
View Source
var (
	KeyDistrEpochIdentifier = []byte("DistrEpochIdentifier")
	KeyGroupCreationFee     = []byte("GroupCreationFee")
	KeyCreatorWhitelist     = []byte("CreatorWhitelist")

	// 100 OSMO
	DefaultGroupCreationFee = sdk.NewCoins(sdk.NewCoin("uosmo", sdk.NewInt(100_000_000)))
)

Incentives parameters key store.

View Source
var (
	ErrInvalidLengthParams        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowParams          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupParams = 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 = codec.NewAminoCodec(amino)
)
View Source
var SplittingPolicy_name = map[int32]string{
	0: "ByVolume",
}
View Source
var SplittingPolicy_value = map[string]int32{
	"ByVolume": 0,
}

Functions

func KeyGroupByGaugeID

func KeyGroupByGaugeID(groupGaugeId uint64) []byte

KeyGroupByGaugeID returns group key for a given groupGaugeId.

func KeyPrefix

func KeyPrefix(p string) []byte

func NewCreateGroupsProposal

func NewCreateGroupsProposal(title, description string, groups []CreateGroup) govtypes.Content

NewCreateGroupsProposal returns a new instance of a group creation proposal struct.

func NoLockExternalGaugeDenom

func NoLockExternalGaugeDenom(poolId uint64) string

NoLockExternalGaugeDenom returns the gauge denom for the no-lock external gauge for the given pool ID.

func NoLockInternalGaugeDenom

func NoLockInternalGaugeDenom(poolId uint64) string

NoLockInternalGaugeDenom returns the gauge denom for the no-lock internal gauge for the given pool ID.

func ParamKeyTable

func ParamKeyTable() paramtypes.KeyTable

ParamKeyTable returns the key table for the incentive module's parameters.

func RegisterCodec

func RegisterCodec(cdc *codec.LegacyAmino)

RegisterCodec registers the necessary x/incentives interfaces and concrete types on the provided LegacyAmino codec. These types are used for Amino JSON serialization.

func RegisterInterfaces

func RegisterInterfaces(registry cdctypes.InterfaceRegistry)

RegisterInterfaces registers interfaces and implementations of the incentives module.

func RegisterMsgServer

func RegisterMsgServer(s grpc1.Server, srv MsgServer)

func RegisterQueryHandler

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

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

func RegisterQueryHandlerClient

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

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

func RegisterQueryHandlerFromEndpoint

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

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

func RegisterQueryHandlerServer

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

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

func RegisterQueryServer

func RegisterQueryServer(s grpc1.Server, srv QueryServer)

func ValidateGroupCreaionFee

func ValidateGroupCreaionFee(i interface{}) error

func ValidateGroupCreationFee

func ValidateGroupCreationFee(i interface{}) error

Types

type AccountKeeper

type AccountKeeper interface {
	GetModuleAddress(moduleName string) sdk.AccAddress
}

type ActiveGaugesPerDenomRequest

type ActiveGaugesPerDenomRequest struct {
	// Desired denom when querying active gagues
	Denom string `protobuf:"bytes,1,opt,name=denom,proto3" json:"denom,omitempty"`
	// Pagination defines pagination for the request
	Pagination *query.PageRequest `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"`
}

func (*ActiveGaugesPerDenomRequest) Descriptor

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

func (*ActiveGaugesPerDenomRequest) GetDenom

func (m *ActiveGaugesPerDenomRequest) GetDenom() string

func (*ActiveGaugesPerDenomRequest) GetPagination

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

func (*ActiveGaugesPerDenomRequest) Marshal

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

func (*ActiveGaugesPerDenomRequest) MarshalTo

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

func (*ActiveGaugesPerDenomRequest) MarshalToSizedBuffer

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

func (*ActiveGaugesPerDenomRequest) ProtoMessage

func (*ActiveGaugesPerDenomRequest) ProtoMessage()

func (*ActiveGaugesPerDenomRequest) Reset

func (m *ActiveGaugesPerDenomRequest) Reset()

func (*ActiveGaugesPerDenomRequest) Size

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

func (*ActiveGaugesPerDenomRequest) String

func (m *ActiveGaugesPerDenomRequest) String() string

func (*ActiveGaugesPerDenomRequest) Unmarshal

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

func (*ActiveGaugesPerDenomRequest) XXX_DiscardUnknown

func (m *ActiveGaugesPerDenomRequest) XXX_DiscardUnknown()

func (*ActiveGaugesPerDenomRequest) XXX_Marshal

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

func (*ActiveGaugesPerDenomRequest) XXX_Merge

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

func (*ActiveGaugesPerDenomRequest) XXX_Size

func (m *ActiveGaugesPerDenomRequest) XXX_Size() int

func (*ActiveGaugesPerDenomRequest) XXX_Unmarshal

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

type ActiveGaugesPerDenomResponse

type ActiveGaugesPerDenomResponse struct {
	// Active gagues that match denom in query
	Data []Gauge `protobuf:"bytes,1,rep,name=data,proto3" json:"data"`
	// Pagination defines pagination for the response
	Pagination *query.PageResponse `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"`
}

func (*ActiveGaugesPerDenomResponse) Descriptor

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

func (*ActiveGaugesPerDenomResponse) GetData

func (m *ActiveGaugesPerDenomResponse) GetData() []Gauge

func (*ActiveGaugesPerDenomResponse) GetPagination

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

func (*ActiveGaugesPerDenomResponse) Marshal

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

func (*ActiveGaugesPerDenomResponse) MarshalTo

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

func (*ActiveGaugesPerDenomResponse) MarshalToSizedBuffer

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

func (*ActiveGaugesPerDenomResponse) ProtoMessage

func (*ActiveGaugesPerDenomResponse) ProtoMessage()

func (*ActiveGaugesPerDenomResponse) Reset

func (m *ActiveGaugesPerDenomResponse) Reset()

func (*ActiveGaugesPerDenomResponse) Size

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

func (*ActiveGaugesPerDenomResponse) String

func (*ActiveGaugesPerDenomResponse) Unmarshal

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

func (*ActiveGaugesPerDenomResponse) XXX_DiscardUnknown

func (m *ActiveGaugesPerDenomResponse) XXX_DiscardUnknown()

func (*ActiveGaugesPerDenomResponse) XXX_Marshal

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

func (*ActiveGaugesPerDenomResponse) XXX_Merge

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

func (*ActiveGaugesPerDenomResponse) XXX_Size

func (m *ActiveGaugesPerDenomResponse) XXX_Size() int

func (*ActiveGaugesPerDenomResponse) XXX_Unmarshal

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

type ActiveGaugesRequest

type ActiveGaugesRequest struct {
	// Pagination defines pagination for the request
	Pagination *query.PageRequest `protobuf:"bytes,1,opt,name=pagination,proto3" json:"pagination,omitempty"`
}

func (*ActiveGaugesRequest) Descriptor

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

func (*ActiveGaugesRequest) GetPagination

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

func (*ActiveGaugesRequest) Marshal

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

func (*ActiveGaugesRequest) MarshalTo

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

func (*ActiveGaugesRequest) MarshalToSizedBuffer

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

func (*ActiveGaugesRequest) ProtoMessage

func (*ActiveGaugesRequest) ProtoMessage()

func (*ActiveGaugesRequest) Reset

func (m *ActiveGaugesRequest) Reset()

func (*ActiveGaugesRequest) Size

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

func (*ActiveGaugesRequest) String

func (m *ActiveGaugesRequest) String() string

func (*ActiveGaugesRequest) Unmarshal

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

func (*ActiveGaugesRequest) XXX_DiscardUnknown

func (m *ActiveGaugesRequest) XXX_DiscardUnknown()

func (*ActiveGaugesRequest) XXX_Marshal

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

func (*ActiveGaugesRequest) XXX_Merge

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

func (*ActiveGaugesRequest) XXX_Size

func (m *ActiveGaugesRequest) XXX_Size() int

func (*ActiveGaugesRequest) XXX_Unmarshal

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

type ActiveGaugesResponse

type ActiveGaugesResponse struct {
	// Active gagues only
	Data []Gauge `protobuf:"bytes,1,rep,name=data,proto3" json:"data"`
	// Pagination defines pagination for the response
	Pagination *query.PageResponse `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"`
}

func (*ActiveGaugesResponse) Descriptor

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

func (*ActiveGaugesResponse) GetData

func (m *ActiveGaugesResponse) GetData() []Gauge

func (*ActiveGaugesResponse) GetPagination

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

func (*ActiveGaugesResponse) Marshal

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

func (*ActiveGaugesResponse) MarshalTo

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

func (*ActiveGaugesResponse) MarshalToSizedBuffer

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

func (*ActiveGaugesResponse) ProtoMessage

func (*ActiveGaugesResponse) ProtoMessage()

func (*ActiveGaugesResponse) Reset

func (m *ActiveGaugesResponse) Reset()

func (*ActiveGaugesResponse) Size

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

func (*ActiveGaugesResponse) String

func (m *ActiveGaugesResponse) String() string

func (*ActiveGaugesResponse) Unmarshal

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

func (*ActiveGaugesResponse) XXX_DiscardUnknown

func (m *ActiveGaugesResponse) XXX_DiscardUnknown()

func (*ActiveGaugesResponse) XXX_Marshal

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

func (*ActiveGaugesResponse) XXX_Merge

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

func (*ActiveGaugesResponse) XXX_Size

func (m *ActiveGaugesResponse) XXX_Size() int

func (*ActiveGaugesResponse) XXX_Unmarshal

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

type BankKeeper

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

	HasSupply(ctx sdk.Context, denom string) bool

	SendCoinsFromModuleToManyAccounts(
		ctx sdk.Context, senderModule string, recipientAddrs []sdk.AccAddress, amts []sdk.Coins,
	) error
	SendCoinsFromAccountToModule(ctx sdk.Context, senderAddr sdk.AccAddress, recipientModule string, amt sdk.Coins) error
}

BankKeeper defines the expected interface needed to retrieve account balances.

type CommunityPoolKeeper

type CommunityPoolKeeper interface {
	FundCommunityPool(ctx sdk.Context, amount sdk.Coins, sender sdk.AccAddress) error
}

CommunityPoolKeeper defines the contract needed to be fulfilled for distribution keeper.

type ConcentratedLiquidityKeeper

type ConcentratedLiquidityKeeper interface {
	CreateIncentive(ctx sdk.Context, poolId uint64, sender sdk.AccAddress, incentiveCoin sdk.Coin, emissionRate osmomath.Dec, startTime time.Time, minUptime time.Duration) (cltypes.IncentiveRecord, error)
	GetConcentratedPoolById(ctx sdk.Context, poolId uint64) (cltypes.ConcentratedPoolExtension, error)
}

type CreateGroup

type CreateGroup struct {
	PoolIds []uint64 `protobuf:"varint,1,rep,packed,name=pool_ids,json=poolIds,proto3" json:"pool_ids,omitempty"`
}

CreateGroup is called via governance to create a new group. It takes an array of pool IDs to split the incentives across.

func (*CreateGroup) Descriptor

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

func (*CreateGroup) GetPoolIds

func (m *CreateGroup) GetPoolIds() []uint64

func (*CreateGroup) Marshal

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

func (*CreateGroup) MarshalTo

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

func (*CreateGroup) MarshalToSizedBuffer

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

func (*CreateGroup) ProtoMessage

func (*CreateGroup) ProtoMessage()

func (*CreateGroup) Reset

func (m *CreateGroup) Reset()

func (*CreateGroup) Size

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

func (*CreateGroup) String

func (m *CreateGroup) String() string

func (*CreateGroup) Unmarshal

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

func (*CreateGroup) XXX_DiscardUnknown

func (m *CreateGroup) XXX_DiscardUnknown()

func (*CreateGroup) XXX_Marshal

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

func (*CreateGroup) XXX_Merge

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

func (*CreateGroup) XXX_Size

func (m *CreateGroup) XXX_Size() int

func (*CreateGroup) XXX_Unmarshal

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

type CreateGroupsProposal

type CreateGroupsProposal 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"`
	CreateGroups []CreateGroup `protobuf:"bytes,3,rep,name=create_groups,json=createGroups,proto3" json:"create_groups"`
}

CreateGroupsProposal is a type for creating one or more groups via governance. This is useful for creating groups without having to pay creation fees.

func (*CreateGroupsProposal) Descriptor

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

func (*CreateGroupsProposal) GetDescription

func (p *CreateGroupsProposal) GetDescription() string

GetDescription gets the description of the proposal

func (*CreateGroupsProposal) GetTitle

func (p *CreateGroupsProposal) GetTitle() string

func (*CreateGroupsProposal) Marshal

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

func (*CreateGroupsProposal) MarshalTo

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

func (*CreateGroupsProposal) MarshalToSizedBuffer

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

func (*CreateGroupsProposal) ProposalRoute

func (p *CreateGroupsProposal) ProposalRoute() string

ProposalRoute returns the router key for the proposal

func (*CreateGroupsProposal) ProposalType

func (p *CreateGroupsProposal) ProposalType() string

ProposalType returns the type of the proposal

func (*CreateGroupsProposal) ProtoMessage

func (*CreateGroupsProposal) ProtoMessage()

func (*CreateGroupsProposal) Reset

func (m *CreateGroupsProposal) Reset()

func (*CreateGroupsProposal) Size

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

func (CreateGroupsProposal) String

func (p CreateGroupsProposal) String() string

String returns a string to display the proposal.

func (*CreateGroupsProposal) Unmarshal

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

func (*CreateGroupsProposal) ValidateBasic

func (p *CreateGroupsProposal) ValidateBasic() error

ValidateBasic validates a governance proposal's abstract and basic contents

func (*CreateGroupsProposal) XXX_DiscardUnknown

func (m *CreateGroupsProposal) XXX_DiscardUnknown()

func (*CreateGroupsProposal) XXX_Marshal

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

func (*CreateGroupsProposal) XXX_Merge

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

func (*CreateGroupsProposal) XXX_Size

func (m *CreateGroupsProposal) XXX_Size() int

func (*CreateGroupsProposal) XXX_Unmarshal

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

type CumulativeVolumeDecreasedError

type CumulativeVolumeDecreasedError struct {
	PoolId         uint64
	PreviousVolume osmomath.Int
	NewVolume      osmomath.Int
}

func (CumulativeVolumeDecreasedError) Error

type DuplicatePoolIDError

type DuplicatePoolIDError struct {
	PoolIDs []uint64
}

func (DuplicatePoolIDError) Error

func (e DuplicatePoolIDError) Error() string

type EpochKeeper

type EpochKeeper interface {
	GetEpochInfo(ctx sdk.Context, identifier string) epochstypes.EpochInfo
}

EpochKeeper defines the expected interface needed to retrieve epoch info.

type GAMMKeeper

type GAMMKeeper interface {
	GetPoolType(ctx sdk.Context, poolId uint64) (poolmanagertypes.PoolType, error)
}

type Gauge

type Gauge struct {
	// id is the unique ID of a Gauge
	Id uint64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
	// is_perpetual is a flag to show if it's a perpetual or non-perpetual gauge
	// Non-perpetual gauges distribute their tokens equally per epoch while the
	// gauge is in the active period. Perpetual gauges distribute all their tokens
	// at a single time and only distribute their tokens again once the gauge is
	// refilled, Intended for use with incentives that get refilled daily.
	IsPerpetual bool `protobuf:"varint,2,opt,name=is_perpetual,json=isPerpetual,proto3" json:"is_perpetual,omitempty"`
	// distribute_to is where the gauge rewards are distributed to.
	// This is queried via lock duration or by timestamp
	DistributeTo types.QueryCondition `protobuf:"bytes,3,opt,name=distribute_to,json=distributeTo,proto3" json:"distribute_to"`
	// coins is the total amount of coins that have been in the gauge
	// Can distribute multiple coin denoms
	Coins github_com_cosmos_cosmos_sdk_types.Coins `protobuf:"bytes,4,rep,name=coins,proto3,castrepeated=github.com/cosmos/cosmos-sdk/types.Coins" json:"coins"`
	// start_time is the distribution start time
	StartTime time.Time `protobuf:"bytes,5,opt,name=start_time,json=startTime,proto3,stdtime" json:"start_time" yaml:"start_time"`
	// num_epochs_paid_over is the number of total epochs distribution will be
	// completed over
	NumEpochsPaidOver uint64 `protobuf:"varint,6,opt,name=num_epochs_paid_over,json=numEpochsPaidOver,proto3" json:"num_epochs_paid_over,omitempty"`
	// filled_epochs is the number of epochs distribution has been completed on
	// already
	FilledEpochs uint64 `protobuf:"varint,7,opt,name=filled_epochs,json=filledEpochs,proto3" json:"filled_epochs,omitempty"`
	// distributed_coins are coins that have been distributed already
	DistributedCoins github_com_cosmos_cosmos_sdk_types.Coins `` /* 153-byte string literal not displayed */
}

Gauge is an object that stores and distributes yields to recipients who satisfy certain conditions. Currently gauges support conditions around the duration for which a given denom is locked.

func NewGauge

func NewGauge(id uint64, isPerpetual bool, distrTo lockuptypes.QueryCondition, coins sdk.Coins, startTime time.Time, numEpochsPaidOver uint64, filledEpochs uint64, distrCoins sdk.Coins) Gauge

NewGauge creates a new gauge struct given the required gauge parameters.

func (*Gauge) Descriptor

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

func (*Gauge) GetCoins

func (*Gauge) GetDistributeTo

func (m *Gauge) GetDistributeTo() types.QueryCondition

func (*Gauge) GetDistributedCoins

func (m *Gauge) GetDistributedCoins() github_com_cosmos_cosmos_sdk_types.Coins

func (*Gauge) GetFilledEpochs

func (m *Gauge) GetFilledEpochs() uint64

func (*Gauge) GetId

func (m *Gauge) GetId() uint64

func (*Gauge) GetIsPerpetual

func (m *Gauge) GetIsPerpetual() bool

func (*Gauge) GetNumEpochsPaidOver

func (m *Gauge) GetNumEpochsPaidOver() uint64

func (*Gauge) GetStartTime

func (m *Gauge) GetStartTime() time.Time

func (Gauge) IsActiveGauge

func (gauge Gauge) IsActiveGauge(curTime time.Time) bool

IsActiveGauge returns true if the gauge is in an active state during the provided time.

func (Gauge) IsFinishedGauge

func (gauge Gauge) IsFinishedGauge(curTime time.Time) bool

IsFinishedGauge returns true if the gauge is in a finished state during the provided time.

func (Gauge) IsLastNonPerpetualDistribution

func (gauge Gauge) IsLastNonPerpetualDistribution() bool

IsLastNonPerpetualDistribution returns true if the this is the last distribution of the gauge. The last distribution is defined for non-perpetual gauges where FilledEpochs+1 >= NumEpochsPaidOver. Assumes that this is called before updating the gauge's state at the end of the epoch. If called after update, it still safe because of >= comparison.

func (Gauge) IsUpcomingGauge

func (gauge Gauge) IsUpcomingGauge(curTime time.Time) bool

IsUpcomingGauge returns true if the gauge's distribution start time is after the provided time.

func (*Gauge) Marshal

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

func (*Gauge) MarshalTo

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

func (*Gauge) MarshalToSizedBuffer

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

func (*Gauge) ProtoMessage

func (*Gauge) ProtoMessage()

func (*Gauge) Reset

func (m *Gauge) Reset()

func (*Gauge) Size

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

func (*Gauge) String

func (m *Gauge) String() string

func (*Gauge) Unmarshal

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

func (*Gauge) XXX_DiscardUnknown

func (m *Gauge) XXX_DiscardUnknown()

func (*Gauge) XXX_Marshal

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

func (*Gauge) XXX_Merge

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

func (*Gauge) XXX_Size

func (m *Gauge) XXX_Size() int

func (*Gauge) XXX_Unmarshal

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

type GaugeByIDRequest

type GaugeByIDRequest struct {
	// Gague ID being queried
	Id uint64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
}

func (*GaugeByIDRequest) Descriptor

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

func (*GaugeByIDRequest) GetId

func (m *GaugeByIDRequest) GetId() uint64

func (*GaugeByIDRequest) Marshal

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

func (*GaugeByIDRequest) MarshalTo

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

func (*GaugeByIDRequest) MarshalToSizedBuffer

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

func (*GaugeByIDRequest) ProtoMessage

func (*GaugeByIDRequest) ProtoMessage()

func (*GaugeByIDRequest) Reset

func (m *GaugeByIDRequest) Reset()

func (*GaugeByIDRequest) Size

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

func (*GaugeByIDRequest) String

func (m *GaugeByIDRequest) String() string

func (*GaugeByIDRequest) Unmarshal

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

func (*GaugeByIDRequest) XXX_DiscardUnknown

func (m *GaugeByIDRequest) XXX_DiscardUnknown()

func (*GaugeByIDRequest) XXX_Marshal

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

func (*GaugeByIDRequest) XXX_Merge

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

func (*GaugeByIDRequest) XXX_Size

func (m *GaugeByIDRequest) XXX_Size() int

func (*GaugeByIDRequest) XXX_Unmarshal

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

type GaugeByIDResponse

type GaugeByIDResponse struct {
	// Gauge that corresponds to provided gague ID
	Gauge *Gauge `protobuf:"bytes,1,opt,name=gauge,proto3" json:"gauge,omitempty"`
}

func (*GaugeByIDResponse) Descriptor

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

func (*GaugeByIDResponse) GetGauge

func (m *GaugeByIDResponse) GetGauge() *Gauge

func (*GaugeByIDResponse) Marshal

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

func (*GaugeByIDResponse) MarshalTo

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

func (*GaugeByIDResponse) MarshalToSizedBuffer

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

func (*GaugeByIDResponse) ProtoMessage

func (*GaugeByIDResponse) ProtoMessage()

func (*GaugeByIDResponse) Reset

func (m *GaugeByIDResponse) Reset()

func (*GaugeByIDResponse) Size

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

func (*GaugeByIDResponse) String

func (m *GaugeByIDResponse) String() string

func (*GaugeByIDResponse) Unmarshal

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

func (*GaugeByIDResponse) XXX_DiscardUnknown

func (m *GaugeByIDResponse) XXX_DiscardUnknown()

func (*GaugeByIDResponse) XXX_Marshal

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

func (*GaugeByIDResponse) XXX_Merge

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

func (*GaugeByIDResponse) XXX_Size

func (m *GaugeByIDResponse) XXX_Size() int

func (*GaugeByIDResponse) XXX_Unmarshal

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

type GaugeNotFoundError

type GaugeNotFoundError struct {
	GaugeID uint64
}

func (GaugeNotFoundError) Error

func (e GaugeNotFoundError) Error() string

type GaugeWeight

type GaugeWeight struct {
	GaugeId     uint64                      `protobuf:"varint,1,opt,name=gauge_id,json=gaugeId,proto3" json:"gauge_id,omitempty"`
	WeightRatio cosmossdk_io_math.LegacyDec `` /* 143-byte string literal not displayed */
}

func (*GaugeWeight) Descriptor

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

func (*GaugeWeight) GetGaugeId

func (m *GaugeWeight) GetGaugeId() uint64

func (*GaugeWeight) Marshal

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

func (*GaugeWeight) MarshalTo

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

func (*GaugeWeight) MarshalToSizedBuffer

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

func (*GaugeWeight) ProtoMessage

func (*GaugeWeight) ProtoMessage()

func (*GaugeWeight) Reset

func (m *GaugeWeight) Reset()

func (*GaugeWeight) Size

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

func (*GaugeWeight) String

func (m *GaugeWeight) String() string

func (*GaugeWeight) Unmarshal

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

func (*GaugeWeight) XXX_DiscardUnknown

func (m *GaugeWeight) XXX_DiscardUnknown()

func (*GaugeWeight) XXX_Marshal

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

func (*GaugeWeight) XXX_Merge

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

func (*GaugeWeight) XXX_Size

func (m *GaugeWeight) XXX_Size() int

func (*GaugeWeight) XXX_Unmarshal

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

type GaugesRequest

type GaugesRequest struct {
	// Pagination defines pagination for the request
	Pagination *query.PageRequest `protobuf:"bytes,1,opt,name=pagination,proto3" json:"pagination,omitempty"`
}

func (*GaugesRequest) Descriptor

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

func (*GaugesRequest) GetPagination

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

func (*GaugesRequest) Marshal

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

func (*GaugesRequest) MarshalTo

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

func (*GaugesRequest) MarshalToSizedBuffer

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

func (*GaugesRequest) ProtoMessage

func (*GaugesRequest) ProtoMessage()

func (*GaugesRequest) Reset

func (m *GaugesRequest) Reset()

func (*GaugesRequest) Size

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

func (*GaugesRequest) String

func (m *GaugesRequest) String() string

func (*GaugesRequest) Unmarshal

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

func (*GaugesRequest) XXX_DiscardUnknown

func (m *GaugesRequest) XXX_DiscardUnknown()

func (*GaugesRequest) XXX_Marshal

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

func (*GaugesRequest) XXX_Merge

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

func (*GaugesRequest) XXX_Size

func (m *GaugesRequest) XXX_Size() int

func (*GaugesRequest) XXX_Unmarshal

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

type GaugesResponse

type GaugesResponse struct {
	// Upcoming and active gauges
	Data []Gauge `protobuf:"bytes,1,rep,name=data,proto3" json:"data"`
	// Pagination defines pagination for the response
	Pagination *query.PageResponse `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"`
}

func (*GaugesResponse) Descriptor

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

func (*GaugesResponse) GetData

func (m *GaugesResponse) GetData() []Gauge

func (*GaugesResponse) GetPagination

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

func (*GaugesResponse) Marshal

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

func (*GaugesResponse) MarshalTo

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

func (*GaugesResponse) MarshalToSizedBuffer

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

func (*GaugesResponse) ProtoMessage

func (*GaugesResponse) ProtoMessage()

func (*GaugesResponse) Reset

func (m *GaugesResponse) Reset()

func (*GaugesResponse) Size

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

func (*GaugesResponse) String

func (m *GaugesResponse) String() string

func (*GaugesResponse) Unmarshal

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

func (*GaugesResponse) XXX_DiscardUnknown

func (m *GaugesResponse) XXX_DiscardUnknown()

func (*GaugesResponse) XXX_Marshal

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

func (*GaugesResponse) XXX_Merge

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

func (*GaugesResponse) XXX_Size

func (m *GaugesResponse) XXX_Size() int

func (*GaugesResponse) XXX_Unmarshal

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

type GenesisState

type GenesisState struct {
	// params are all the parameters of the module
	Params Params `protobuf:"bytes,1,opt,name=params,proto3" json:"params"`
	// gauges are all gauges (not including group gauges) that should exist at
	// genesis
	Gauges []Gauge `protobuf:"bytes,2,rep,name=gauges,proto3" json:"gauges"`
	// lockable_durations are all lockup durations that gauges can be locked for
	// in order to recieve incentives
	LockableDurations []time.Duration `` /* 140-byte string literal not displayed */
	// last_gauge_id is what the gauge number will increment from when creating
	// the next gauge after genesis
	LastGaugeId uint64 `protobuf:"varint,4,opt,name=last_gauge_id,json=lastGaugeId,proto3" json:"last_gauge_id,omitempty"`
	// gauges are all group gauges that should exist at genesis
	GroupGauges []Gauge `protobuf:"bytes,5,rep,name=group_gauges,json=groupGauges,proto3" json:"group_gauges"`
	// groups are all the groups that should exist at genesis
	Groups []Group `protobuf:"bytes,6,rep,name=groups,proto3" json:"groups"`
}

GenesisState defines the incentives module's various parameters when first initialized

func DefaultGenesis

func DefaultGenesis() *GenesisState

DefaultGenesis returns the incentive module's default genesis state.

func GetGenesisStateFromAppState

func GetGenesisStateFromAppState(cdc codec.JSONCodec, appState map[string]json.RawMessage) *GenesisState

GetGenesisStateFromAppState returns an incentive module GenesisState given a raw application genesis state.

func (*GenesisState) Descriptor

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

func (*GenesisState) GetGauges

func (m *GenesisState) GetGauges() []Gauge

func (*GenesisState) GetGroupGauges

func (m *GenesisState) GetGroupGauges() []Gauge

func (*GenesisState) GetGroups

func (m *GenesisState) GetGroups() []Group

func (*GenesisState) GetLastGaugeId

func (m *GenesisState) GetLastGaugeId() uint64

func (*GenesisState) GetLockableDurations

func (m *GenesisState) GetLockableDurations() []time.Duration

func (*GenesisState) GetParams

func (m *GenesisState) GetParams() Params

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

func (gs GenesisState) Validate() error

Validate performs basic genesis state validation, returning an error upon any failure.

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 Group

type Group struct {
	GroupGaugeId      uint64            `protobuf:"varint,1,opt,name=group_gauge_id,json=groupGaugeId,proto3" json:"group_gauge_id,omitempty"`
	InternalGaugeInfo InternalGaugeInfo `protobuf:"bytes,2,opt,name=internal_gauge_info,json=internalGaugeInfo,proto3" json:"internal_gauge_info"`
	SplittingPolicy   SplittingPolicy   `` /* 147-byte string literal not displayed */
}

Group is an object that stores a 1:1 mapped gauge ID, a list of pool gauge info, and a splitting policy. These are grouped into a single abstraction to allow for distribution of group incentives to internal gauges according to the specified splitting policy.

func (*Group) Descriptor

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

func (*Group) GetGroupGaugeId

func (m *Group) GetGroupGaugeId() uint64

func (*Group) GetInternalGaugeInfo

func (m *Group) GetInternalGaugeInfo() InternalGaugeInfo

func (*Group) GetSplittingPolicy

func (m *Group) GetSplittingPolicy() SplittingPolicy

func (*Group) Marshal

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

func (*Group) MarshalTo

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

func (*Group) MarshalToSizedBuffer

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

func (*Group) ProtoMessage

func (*Group) ProtoMessage()

func (*Group) Reset

func (m *Group) Reset()

func (*Group) Size

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

func (*Group) String

func (m *Group) String() string

func (*Group) Unmarshal

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

func (*Group) XXX_DiscardUnknown

func (m *Group) XXX_DiscardUnknown()

func (*Group) XXX_Marshal

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

func (*Group) XXX_Merge

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

func (*Group) XXX_Size

func (m *Group) XXX_Size() int

func (*Group) XXX_Unmarshal

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

type GroupNotFoundError

type GroupNotFoundError struct {
	GroupGaugeId uint64
}

func (GroupNotFoundError) Error

func (e GroupNotFoundError) Error() string

type GroupTotalWeightZeroError

type GroupTotalWeightZeroError struct {
	GroupID uint64
}

func (GroupTotalWeightZeroError) Error

type GroupsWithGauge

type GroupsWithGauge struct {
	Group Group `protobuf:"bytes,1,opt,name=group,proto3" json:"group"`
	Gauge Gauge `protobuf:"bytes,2,opt,name=gauge,proto3" json:"gauge"`
}

GroupsWithGauge is a helper struct that stores a group and its associated gauge.

func (*GroupsWithGauge) Descriptor

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

func (*GroupsWithGauge) GetGauge

func (m *GroupsWithGauge) GetGauge() Gauge

func (*GroupsWithGauge) GetGroup

func (m *GroupsWithGauge) GetGroup() Group

func (*GroupsWithGauge) Marshal

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

func (*GroupsWithGauge) MarshalTo

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

func (*GroupsWithGauge) MarshalToSizedBuffer

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

func (*GroupsWithGauge) ProtoMessage

func (*GroupsWithGauge) ProtoMessage()

func (*GroupsWithGauge) Reset

func (m *GroupsWithGauge) Reset()

func (*GroupsWithGauge) Size

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

func (*GroupsWithGauge) String

func (m *GroupsWithGauge) String() string

func (*GroupsWithGauge) Unmarshal

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

func (*GroupsWithGauge) XXX_DiscardUnknown

func (m *GroupsWithGauge) XXX_DiscardUnknown()

func (*GroupsWithGauge) XXX_Marshal

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

func (*GroupsWithGauge) XXX_Merge

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

func (*GroupsWithGauge) XXX_Size

func (m *GroupsWithGauge) XXX_Size() int

func (*GroupsWithGauge) XXX_Unmarshal

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

type IncentiveHooks

type IncentiveHooks interface {
	AfterCreateGauge(ctx sdk.Context, gaugeId uint64)
	AfterAddToGauge(ctx sdk.Context, gaugeId uint64)
	AfterStartDistribution(ctx sdk.Context, gaugeId uint64)
	AfterFinishDistribution(ctx sdk.Context, gaugeId uint64)
	AfterEpochDistribution(ctx sdk.Context)
}

type InternalGaugeInfo

type InternalGaugeInfo struct {
	TotalWeight  cosmossdk_io_math.Int `` /* 137-byte string literal not displayed */
	GaugeRecords []InternalGaugeRecord `protobuf:"bytes,2,rep,name=gauge_records,json=gaugeRecords,proto3" json:"gauge_records"`
}

Note that while both InternalGaugeInfo and InternalGaugeRecord could technically be replaced by DistrInfo and DistrRecord from the pool-incentives module, we create separate types here to keep our abstractions clean and readable (pool-incentives distribution abstractions are used in a very specific way that does not directly relate to gauge logic). This also helps us sidestep a refactor to avoid an import cycle.

func (*InternalGaugeInfo) Descriptor

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

func (*InternalGaugeInfo) GetGaugeRecords

func (m *InternalGaugeInfo) GetGaugeRecords() []InternalGaugeRecord

func (*InternalGaugeInfo) Marshal

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

func (*InternalGaugeInfo) MarshalTo

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

func (*InternalGaugeInfo) MarshalToSizedBuffer

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

func (*InternalGaugeInfo) ProtoMessage

func (*InternalGaugeInfo) ProtoMessage()

func (*InternalGaugeInfo) Reset

func (m *InternalGaugeInfo) Reset()

func (*InternalGaugeInfo) Size

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

func (*InternalGaugeInfo) String

func (m *InternalGaugeInfo) String() string

func (*InternalGaugeInfo) Unmarshal

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

func (*InternalGaugeInfo) XXX_DiscardUnknown

func (m *InternalGaugeInfo) XXX_DiscardUnknown()

func (*InternalGaugeInfo) XXX_Marshal

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

func (*InternalGaugeInfo) XXX_Merge

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

func (*InternalGaugeInfo) XXX_Size

func (m *InternalGaugeInfo) XXX_Size() int

func (*InternalGaugeInfo) XXX_Unmarshal

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

type InternalGaugeRecord

type InternalGaugeRecord struct {
	GaugeId uint64 `protobuf:"varint,1,opt,name=gauge_id,json=gaugeId,proto3" json:"gauge_id,omitempty" yaml:"gauge_id"`
	// CurrentWeight is the current weight of this gauge being distributed to for
	// this epoch. For instance, for volume splitting policy, this stores the
	// volume generated in the last epoch of the linked pool.
	CurrentWeight cosmossdk_io_math.Int `protobuf:"bytes,2,opt,name=current_weight,json=currentWeight,proto3,customtype=cosmossdk.io/math.Int" json:"current_weight"`
	// CumulativeWeight serves as a snapshot of the accumulator being tracked
	// based on splitting policy. For instance, for volume splitting policy, this
	// stores the cumulative volume for the linked pool at time of last update.
	CumulativeWeight cosmossdk_io_math.Int `` /* 132-byte string literal not displayed */
}

func (*InternalGaugeRecord) Descriptor

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

func (*InternalGaugeRecord) Equal

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

func (*InternalGaugeRecord) GetGaugeId

func (m *InternalGaugeRecord) GetGaugeId() uint64

func (*InternalGaugeRecord) Marshal

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

func (*InternalGaugeRecord) MarshalTo

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

func (*InternalGaugeRecord) MarshalToSizedBuffer

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

func (*InternalGaugeRecord) ProtoMessage

func (*InternalGaugeRecord) ProtoMessage()

func (*InternalGaugeRecord) Reset

func (m *InternalGaugeRecord) Reset()

func (*InternalGaugeRecord) Size

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

func (*InternalGaugeRecord) String

func (m *InternalGaugeRecord) String() string

func (*InternalGaugeRecord) Unmarshal

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

func (*InternalGaugeRecord) XXX_DiscardUnknown

func (m *InternalGaugeRecord) XXX_DiscardUnknown()

func (*InternalGaugeRecord) XXX_Marshal

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

func (*InternalGaugeRecord) XXX_Merge

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

func (*InternalGaugeRecord) XXX_Size

func (m *InternalGaugeRecord) XXX_Size() int

func (*InternalGaugeRecord) XXX_Unmarshal

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

type InvalidGaugeTypeError

type InvalidGaugeTypeError struct {
	GaugeType lockuptypes.LockQueryType
}

func (InvalidGaugeTypeError) Error

func (e InvalidGaugeTypeError) Error() string

type LockableDurationsInfo

type LockableDurationsInfo struct {
	// List of incentivised durations that gauges will pay out to
	LockableDurations []time.Duration `` /* 140-byte string literal not displayed */
}

func (*LockableDurationsInfo) Descriptor

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

func (*LockableDurationsInfo) GetLockableDurations

func (m *LockableDurationsInfo) GetLockableDurations() []time.Duration

func (*LockableDurationsInfo) Marshal

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

func (*LockableDurationsInfo) MarshalTo

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

func (*LockableDurationsInfo) MarshalToSizedBuffer

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

func (*LockableDurationsInfo) ProtoMessage

func (*LockableDurationsInfo) ProtoMessage()

func (*LockableDurationsInfo) Reset

func (m *LockableDurationsInfo) Reset()

func (*LockableDurationsInfo) Size

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

func (*LockableDurationsInfo) String

func (m *LockableDurationsInfo) String() string

func (*LockableDurationsInfo) Unmarshal

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

func (*LockableDurationsInfo) XXX_DiscardUnknown

func (m *LockableDurationsInfo) XXX_DiscardUnknown()

func (*LockableDurationsInfo) XXX_Marshal

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

func (*LockableDurationsInfo) XXX_Merge

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

func (*LockableDurationsInfo) XXX_Size

func (m *LockableDurationsInfo) XXX_Size() int

func (*LockableDurationsInfo) XXX_Unmarshal

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

type LockupKeeper

type LockupKeeper interface {
	GetLocksLongerThanDurationDenom(ctx sdk.Context, denom string, duration time.Duration) []lockuptypes.PeriodLock
	GetPeriodLocksAccumulation(ctx sdk.Context, query lockuptypes.QueryCondition) osmomath.Int
	GetAccountPeriodLocks(ctx sdk.Context, addr sdk.AccAddress) []lockuptypes.PeriodLock
	GetLockByID(ctx sdk.Context, lockID uint64) (*lockuptypes.PeriodLock, error)
}

LockupKeeper defines the expected interface needed to retrieve locks.

type ModuleToDistributeCoinsRequest

type ModuleToDistributeCoinsRequest struct {
}

func (*ModuleToDistributeCoinsRequest) Descriptor

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

func (*ModuleToDistributeCoinsRequest) Marshal

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

func (*ModuleToDistributeCoinsRequest) MarshalTo

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

func (*ModuleToDistributeCoinsRequest) MarshalToSizedBuffer

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

func (*ModuleToDistributeCoinsRequest) ProtoMessage

func (*ModuleToDistributeCoinsRequest) ProtoMessage()

func (*ModuleToDistributeCoinsRequest) Reset

func (m *ModuleToDistributeCoinsRequest) Reset()

func (*ModuleToDistributeCoinsRequest) Size

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

func (*ModuleToDistributeCoinsRequest) String

func (*ModuleToDistributeCoinsRequest) Unmarshal

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

func (*ModuleToDistributeCoinsRequest) XXX_DiscardUnknown

func (m *ModuleToDistributeCoinsRequest) XXX_DiscardUnknown()

func (*ModuleToDistributeCoinsRequest) XXX_Marshal

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

func (*ModuleToDistributeCoinsRequest) XXX_Merge

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

func (*ModuleToDistributeCoinsRequest) XXX_Size

func (m *ModuleToDistributeCoinsRequest) XXX_Size() int

func (*ModuleToDistributeCoinsRequest) XXX_Unmarshal

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

type ModuleToDistributeCoinsResponse

type ModuleToDistributeCoinsResponse struct {
	// Coins that have yet to be distributed
	Coins github_com_cosmos_cosmos_sdk_types.Coins `protobuf:"bytes,1,rep,name=coins,proto3,castrepeated=github.com/cosmos/cosmos-sdk/types.Coins" json:"coins"`
}

func (*ModuleToDistributeCoinsResponse) Descriptor

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

func (*ModuleToDistributeCoinsResponse) GetCoins

func (*ModuleToDistributeCoinsResponse) Marshal

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

func (*ModuleToDistributeCoinsResponse) MarshalTo

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

func (*ModuleToDistributeCoinsResponse) MarshalToSizedBuffer

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

func (*ModuleToDistributeCoinsResponse) ProtoMessage

func (*ModuleToDistributeCoinsResponse) ProtoMessage()

func (*ModuleToDistributeCoinsResponse) Reset

func (*ModuleToDistributeCoinsResponse) Size

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

func (*ModuleToDistributeCoinsResponse) String

func (*ModuleToDistributeCoinsResponse) Unmarshal

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

func (*ModuleToDistributeCoinsResponse) XXX_DiscardUnknown

func (m *ModuleToDistributeCoinsResponse) XXX_DiscardUnknown()

func (*ModuleToDistributeCoinsResponse) XXX_Marshal

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

func (*ModuleToDistributeCoinsResponse) XXX_Merge

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

func (*ModuleToDistributeCoinsResponse) XXX_Size

func (m *ModuleToDistributeCoinsResponse) XXX_Size() int

func (*ModuleToDistributeCoinsResponse) XXX_Unmarshal

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

type MsgAddToGauge

type MsgAddToGauge struct {
	// owner is the gauge owner's address
	Owner string `protobuf:"bytes,1,opt,name=owner,proto3" json:"owner,omitempty" yaml:"owner"`
	// gauge_id is the ID of gauge that rewards are getting added to
	GaugeId uint64 `protobuf:"varint,2,opt,name=gauge_id,json=gaugeId,proto3" json:"gauge_id,omitempty"`
	// rewards are the coin(s) to add to gauge
	Rewards github_com_cosmos_cosmos_sdk_types.Coins `protobuf:"bytes,3,rep,name=rewards,proto3,castrepeated=github.com/cosmos/cosmos-sdk/types.Coins" json:"rewards"`
}

MsgAddToGauge adds coins to a previously created gauge

func NewMsgAddToGauge

func NewMsgAddToGauge(owner sdk.AccAddress, gaugeId uint64, rewards sdk.Coins) *MsgAddToGauge

NewMsgAddToGauge creates a message to add rewards to a specific gauge.

func (*MsgAddToGauge) Descriptor

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

func (*MsgAddToGauge) GetGaugeId

func (m *MsgAddToGauge) GetGaugeId() uint64

func (*MsgAddToGauge) GetOwner

func (m *MsgAddToGauge) GetOwner() string

func (*MsgAddToGauge) GetRewards

func (MsgAddToGauge) GetSignBytes

func (m MsgAddToGauge) GetSignBytes() []byte

GetSignBytes takes an add to gauge message and turns it into a byte array.

func (MsgAddToGauge) GetSigners

func (m MsgAddToGauge) GetSigners() []sdk.AccAddress

GetSigners takes an add to gauge message and returns the owner in a byte array.

func (*MsgAddToGauge) Marshal

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

func (*MsgAddToGauge) MarshalTo

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

func (*MsgAddToGauge) MarshalToSizedBuffer

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

func (*MsgAddToGauge) ProtoMessage

func (*MsgAddToGauge) ProtoMessage()

func (*MsgAddToGauge) Reset

func (m *MsgAddToGauge) Reset()

func (MsgAddToGauge) Route

func (m MsgAddToGauge) Route() string

Route takes an add to gauge message, then returns the RouterKey used for slashing.

func (*MsgAddToGauge) Size

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

func (*MsgAddToGauge) String

func (m *MsgAddToGauge) String() string

func (MsgAddToGauge) Type

func (m MsgAddToGauge) Type() string

Type takes an add to gauge message, then returns an add to gauge message type.

func (*MsgAddToGauge) Unmarshal

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

func (MsgAddToGauge) ValidateBasic

func (m MsgAddToGauge) ValidateBasic() error

ValidateBasic checks that the add to gauge message is valid.

func (*MsgAddToGauge) XXX_DiscardUnknown

func (m *MsgAddToGauge) XXX_DiscardUnknown()

func (*MsgAddToGauge) XXX_Marshal

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

func (*MsgAddToGauge) XXX_Merge

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

func (*MsgAddToGauge) XXX_Size

func (m *MsgAddToGauge) XXX_Size() int

func (*MsgAddToGauge) XXX_Unmarshal

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

type MsgAddToGaugeResponse

type MsgAddToGaugeResponse struct {
}

func (*MsgAddToGaugeResponse) Descriptor

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

func (*MsgAddToGaugeResponse) Marshal

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

func (*MsgAddToGaugeResponse) MarshalTo

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

func (*MsgAddToGaugeResponse) MarshalToSizedBuffer

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

func (*MsgAddToGaugeResponse) ProtoMessage

func (*MsgAddToGaugeResponse) ProtoMessage()

func (*MsgAddToGaugeResponse) Reset

func (m *MsgAddToGaugeResponse) Reset()

func (*MsgAddToGaugeResponse) Size

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

func (*MsgAddToGaugeResponse) String

func (m *MsgAddToGaugeResponse) String() string

func (*MsgAddToGaugeResponse) Unmarshal

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

func (*MsgAddToGaugeResponse) XXX_DiscardUnknown

func (m *MsgAddToGaugeResponse) XXX_DiscardUnknown()

func (*MsgAddToGaugeResponse) XXX_Marshal

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

func (*MsgAddToGaugeResponse) XXX_Merge

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

func (*MsgAddToGaugeResponse) XXX_Size

func (m *MsgAddToGaugeResponse) XXX_Size() int

func (*MsgAddToGaugeResponse) XXX_Unmarshal

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

type MsgClient

type MsgClient interface {
	CreateGauge(ctx context.Context, in *MsgCreateGauge, opts ...grpc.CallOption) (*MsgCreateGaugeResponse, error)
	AddToGauge(ctx context.Context, in *MsgAddToGauge, opts ...grpc.CallOption) (*MsgAddToGaugeResponse, error)
	CreateGroup(ctx context.Context, in *MsgCreateGroup, opts ...grpc.CallOption) (*MsgCreateGroupResponse, 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 MsgCreateGauge

type MsgCreateGauge struct {
	// is_perpetual shows if it's a perpetual or non-perpetual gauge
	// Non-perpetual gauges distribute their tokens equally per epoch while the
	// gauge is in the active period. Perpetual gauges distribute all their tokens
	// at a single time and only distribute their tokens again once the gauge is
	// refilled
	IsPerpetual bool `protobuf:"varint,1,opt,name=is_perpetual,json=isPerpetual,proto3" json:"is_perpetual,omitempty"`
	// owner is the address of gauge creator
	Owner string `protobuf:"bytes,2,opt,name=owner,proto3" json:"owner,omitempty" yaml:"owner"`
	// distribute_to show which lock the gauge should distribute to by time
	// duration or by timestamp
	DistributeTo types.QueryCondition `protobuf:"bytes,3,opt,name=distribute_to,json=distributeTo,proto3" json:"distribute_to"`
	// coins are coin(s) to be distributed by the gauge
	Coins github_com_cosmos_cosmos_sdk_types.Coins `protobuf:"bytes,4,rep,name=coins,proto3,castrepeated=github.com/cosmos/cosmos-sdk/types.Coins" json:"coins"`
	// start_time is the distribution start time
	StartTime time.Time `protobuf:"bytes,5,opt,name=start_time,json=startTime,proto3,stdtime" json:"start_time" yaml:"timestamp"`
	// num_epochs_paid_over is the number of epochs distribution will be completed
	// over
	NumEpochsPaidOver uint64 `protobuf:"varint,6,opt,name=num_epochs_paid_over,json=numEpochsPaidOver,proto3" json:"num_epochs_paid_over,omitempty"`
	// pool_id is the ID of the pool that the gauge is meant to be associated
	// with. if pool_id is set, then the "QueryCondition.LockQueryType" must be
	// "NoLock" with all other fields of the "QueryCondition.LockQueryType" struct
	// unset, including "QueryCondition.Denom". However, note that, internally,
	// the empty string in "QueryCondition.Denom" ends up being overwritten with
	// incentivestypes.NoLockExternalGaugeDenom(<pool-id>) so that the gauges
	// associated with a pool can be queried by this prefix if needed.
	PoolId uint64 `protobuf:"varint,7,opt,name=pool_id,json=poolId,proto3" json:"pool_id,omitempty"`
}

MsgCreateGauge creates a gague to distribute rewards to users

func NewMsgCreateGauge

func NewMsgCreateGauge(isPerpetual bool, owner sdk.AccAddress, distributeTo lockuptypes.QueryCondition, coins sdk.Coins, startTime time.Time, numEpochsPaidOver uint64, poolId uint64) *MsgCreateGauge

NewMsgCreateGauge creates a message to create a gauge with the provided parameters.

func (*MsgCreateGauge) Descriptor

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

func (*MsgCreateGauge) GetCoins

func (*MsgCreateGauge) GetDistributeTo

func (m *MsgCreateGauge) GetDistributeTo() types.QueryCondition

func (*MsgCreateGauge) GetIsPerpetual

func (m *MsgCreateGauge) GetIsPerpetual() bool

func (*MsgCreateGauge) GetNumEpochsPaidOver

func (m *MsgCreateGauge) GetNumEpochsPaidOver() uint64

func (*MsgCreateGauge) GetOwner

func (m *MsgCreateGauge) GetOwner() string

func (*MsgCreateGauge) GetPoolId

func (m *MsgCreateGauge) GetPoolId() uint64

func (MsgCreateGauge) GetSignBytes

func (m MsgCreateGauge) GetSignBytes() []byte

GetSignBytes takes a create gauge message and turns it into a byte array.

func (MsgCreateGauge) GetSigners

func (m MsgCreateGauge) GetSigners() []sdk.AccAddress

GetSigners takes a create gauge message and returns the owner in a byte array.

func (*MsgCreateGauge) GetStartTime

func (m *MsgCreateGauge) GetStartTime() time.Time

func (*MsgCreateGauge) Marshal

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

func (*MsgCreateGauge) MarshalTo

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

func (*MsgCreateGauge) MarshalToSizedBuffer

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

func (*MsgCreateGauge) ProtoMessage

func (*MsgCreateGauge) ProtoMessage()

func (*MsgCreateGauge) Reset

func (m *MsgCreateGauge) Reset()

func (MsgCreateGauge) Route

func (m MsgCreateGauge) Route() string

Route takes a create gauge message, then returns the RouterKey used for slashing.

func (*MsgCreateGauge) Size

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

func (*MsgCreateGauge) String

func (m *MsgCreateGauge) String() string

func (MsgCreateGauge) Type

func (m MsgCreateGauge) Type() string

Type takes a create gauge message, then returns a create gauge message type.

func (*MsgCreateGauge) Unmarshal

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

func (MsgCreateGauge) ValidateBasic

func (m MsgCreateGauge) ValidateBasic() error

ValidateBasic checks that the create gauge message is valid.

func (*MsgCreateGauge) XXX_DiscardUnknown

func (m *MsgCreateGauge) XXX_DiscardUnknown()

func (*MsgCreateGauge) XXX_Marshal

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

func (*MsgCreateGauge) XXX_Merge

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

func (*MsgCreateGauge) XXX_Size

func (m *MsgCreateGauge) XXX_Size() int

func (*MsgCreateGauge) XXX_Unmarshal

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

type MsgCreateGaugeResponse

type MsgCreateGaugeResponse struct {
}

func (*MsgCreateGaugeResponse) Descriptor

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

func (*MsgCreateGaugeResponse) Marshal

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

func (*MsgCreateGaugeResponse) MarshalTo

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

func (*MsgCreateGaugeResponse) MarshalToSizedBuffer

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

func (*MsgCreateGaugeResponse) ProtoMessage

func (*MsgCreateGaugeResponse) ProtoMessage()

func (*MsgCreateGaugeResponse) Reset

func (m *MsgCreateGaugeResponse) Reset()

func (*MsgCreateGaugeResponse) Size

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

func (*MsgCreateGaugeResponse) String

func (m *MsgCreateGaugeResponse) String() string

func (*MsgCreateGaugeResponse) Unmarshal

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

func (*MsgCreateGaugeResponse) XXX_DiscardUnknown

func (m *MsgCreateGaugeResponse) XXX_DiscardUnknown()

func (*MsgCreateGaugeResponse) XXX_Marshal

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

func (*MsgCreateGaugeResponse) XXX_Merge

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

func (*MsgCreateGaugeResponse) XXX_Size

func (m *MsgCreateGaugeResponse) XXX_Size() int

func (*MsgCreateGaugeResponse) XXX_Unmarshal

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

type MsgCreateGroup

type MsgCreateGroup struct {
	// coins are the provided coins that the group will distribute
	Coins github_com_cosmos_cosmos_sdk_types.Coins `protobuf:"bytes,1,rep,name=coins,proto3,castrepeated=github.com/cosmos/cosmos-sdk/types.Coins" json:"coins"`
	// num_epochs_paid_over is the number of epochs distribution will be completed
	// in. 0 means it's perpetual
	NumEpochsPaidOver uint64 `protobuf:"varint,2,opt,name=num_epochs_paid_over,json=numEpochsPaidOver,proto3" json:"num_epochs_paid_over,omitempty"`
	// owner is the group owner's address
	Owner string `protobuf:"bytes,3,opt,name=owner,proto3" json:"owner,omitempty" yaml:"owner"`
	// pool_ids are the IDs of pools that the group is comprised of
	PoolIds []uint64 `protobuf:"varint,4,rep,packed,name=pool_ids,json=poolIds,proto3" json:"pool_ids,omitempty"`
}

MsgCreateGroup creates a group to distribute rewards to a group of pools

func NewMsgCreateGroup

func NewMsgCreateGroup(rewards sdk.Coins, numEpochsPaidOver uint64, owner sdk.AccAddress, poolIds []uint64) *MsgCreateGroup

NewMsgCreateGroup creates a message to create a group with the provided parameters.

func (*MsgCreateGroup) Descriptor

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

func (*MsgCreateGroup) GetCoins

func (*MsgCreateGroup) GetNumEpochsPaidOver

func (m *MsgCreateGroup) GetNumEpochsPaidOver() uint64

func (*MsgCreateGroup) GetOwner

func (m *MsgCreateGroup) GetOwner() string

func (*MsgCreateGroup) GetPoolIds

func (m *MsgCreateGroup) GetPoolIds() []uint64

func (MsgCreateGroup) GetSignBytes

func (m MsgCreateGroup) GetSignBytes() []byte

GetSignBytes takes a create group message and turns it into a byte array.

func (MsgCreateGroup) GetSigners

func (m MsgCreateGroup) GetSigners() []sdk.AccAddress

GetSigners takes a create group message and returns the owner in a byte array.

func (*MsgCreateGroup) Marshal

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

func (*MsgCreateGroup) MarshalTo

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

func (*MsgCreateGroup) MarshalToSizedBuffer

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

func (*MsgCreateGroup) ProtoMessage

func (*MsgCreateGroup) ProtoMessage()

func (*MsgCreateGroup) Reset

func (m *MsgCreateGroup) Reset()

func (MsgCreateGroup) Route

func (m MsgCreateGroup) Route() string

Route takes a create group message, then returns the RouterKey.

func (*MsgCreateGroup) Size

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

func (*MsgCreateGroup) String

func (m *MsgCreateGroup) String() string

func (MsgCreateGroup) Type

func (m MsgCreateGroup) Type() string

Type takes a create group message, then returns the message type.

func (*MsgCreateGroup) Unmarshal

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

func (MsgCreateGroup) ValidateBasic

func (m MsgCreateGroup) ValidateBasic() error

ValidateBasic checks that the create group message is valid.

func (*MsgCreateGroup) XXX_DiscardUnknown

func (m *MsgCreateGroup) XXX_DiscardUnknown()

func (*MsgCreateGroup) XXX_Marshal

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

func (*MsgCreateGroup) XXX_Merge

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

func (*MsgCreateGroup) XXX_Size

func (m *MsgCreateGroup) XXX_Size() int

func (*MsgCreateGroup) XXX_Unmarshal

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

type MsgCreateGroupResponse

type MsgCreateGroupResponse struct {
	// group_id is the ID of the group that is created from this msg
	GroupId uint64 `protobuf:"varint,1,opt,name=group_id,json=groupId,proto3" json:"group_id,omitempty"`
}

func (*MsgCreateGroupResponse) Descriptor

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

func (*MsgCreateGroupResponse) GetGroupId

func (m *MsgCreateGroupResponse) GetGroupId() uint64

func (*MsgCreateGroupResponse) Marshal

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

func (*MsgCreateGroupResponse) MarshalTo

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

func (*MsgCreateGroupResponse) MarshalToSizedBuffer

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

func (*MsgCreateGroupResponse) ProtoMessage

func (*MsgCreateGroupResponse) ProtoMessage()

func (*MsgCreateGroupResponse) Reset

func (m *MsgCreateGroupResponse) Reset()

func (*MsgCreateGroupResponse) Size

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

func (*MsgCreateGroupResponse) String

func (m *MsgCreateGroupResponse) String() string

func (*MsgCreateGroupResponse) Unmarshal

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

func (*MsgCreateGroupResponse) XXX_DiscardUnknown

func (m *MsgCreateGroupResponse) XXX_DiscardUnknown()

func (*MsgCreateGroupResponse) XXX_Marshal

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

func (*MsgCreateGroupResponse) XXX_Merge

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

func (*MsgCreateGroupResponse) XXX_Size

func (m *MsgCreateGroupResponse) XXX_Size() int

func (*MsgCreateGroupResponse) XXX_Unmarshal

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

type MsgServer

MsgServer is the server API for Msg service.

type MultiIncentiveHooks

type MultiIncentiveHooks []IncentiveHooks

MultiIncentiveHooks combines multiple incentive hooks. All hook functions are run in array sequence.

func NewMultiIncentiveHooks

func NewMultiIncentiveHooks(hooks ...IncentiveHooks) MultiIncentiveHooks

NewMultiIncentiveHooks combines multiple incentive hooks into a single IncentiveHooks array.

func (MultiIncentiveHooks) AfterAddToGauge

func (h MultiIncentiveHooks) AfterAddToGauge(ctx sdk.Context, gaugeId uint64)

func (MultiIncentiveHooks) AfterCreateGauge

func (h MultiIncentiveHooks) AfterCreateGauge(ctx sdk.Context, gaugeId uint64)

func (MultiIncentiveHooks) AfterEpochDistribution

func (h MultiIncentiveHooks) AfterEpochDistribution(ctx sdk.Context)

func (MultiIncentiveHooks) AfterFinishDistribution

func (h MultiIncentiveHooks) AfterFinishDistribution(ctx sdk.Context, gaugeId uint64)

func (MultiIncentiveHooks) AfterStartDistribution

func (h MultiIncentiveHooks) AfterStartDistribution(ctx sdk.Context, gaugeId uint64)

type NoPoolVolumeError

type NoPoolVolumeError struct {
	PoolId uint64
}

func (NoPoolVolumeError) Error

func (e NoPoolVolumeError) Error() string

type NoVolumeSinceLastSyncError

type NoVolumeSinceLastSyncError struct {
	PoolID uint64
}

func (NoVolumeSinceLastSyncError) Error

type OnePoolIDGroupError

type OnePoolIDGroupError struct {
	PoolID uint64
}

func (OnePoolIDGroupError) Error

func (e OnePoolIDGroupError) Error() string

type Params

type Params struct {
	// distr_epoch_identifier is what epoch type distribution will be triggered by
	// (day, week, etc.)
	DistrEpochIdentifier string `` /* 153-byte string literal not displayed */
	// group_creation_fee is the fee required to create a new group
	// It is only charged to all addresses other than incentive module account
	// or addresses in the unrestricted_creator_whitelist
	GroupCreationFee github_com_cosmos_cosmos_sdk_types.Coins `` /* 155-byte string literal not displayed */
	// unrestricted_creator_whitelist is a list of addresses that are
	// allowed to bypass restrictions on permissionless Group
	// creation. In the future, we might expand these to creating gauges
	// as well.
	// The goal of this is to allow a subdao to manage incentives efficiently
	// without being stopped by 5 day governance process or a high fee.
	// At the same time, it prevents spam by having a fee for all
	// other users.
	UnrestrictedCreatorWhitelist []string `` /* 185-byte string literal not displayed */
}

Params holds parameters for the incentives module

func DefaultParams

func DefaultParams() Params

DefaultParams returns the default incentives module parameters.

func NewParams

func NewParams(distrEpochIdentifier string, groupCreationFee sdk.Coins) Params

NewParams takes an epoch distribution identifier and group creation fee, then returns an incentives Params struct.

func (*Params) Descriptor

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

func (*Params) GetDistrEpochIdentifier

func (m *Params) GetDistrEpochIdentifier() string

func (*Params) GetGroupCreationFee

func (m *Params) GetGroupCreationFee() github_com_cosmos_cosmos_sdk_types.Coins

func (*Params) GetUnrestrictedCreatorWhitelist

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

func (*Params) Marshal

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

func (*Params) MarshalTo

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

func (*Params) MarshalToSizedBuffer

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

func (*Params) ParamSetPairs

func (p *Params) ParamSetPairs() paramtypes.ParamSetPairs

ParamSetPairs takes the parameter struct and associates the paramsubspace key and field of the parameters as a KVStore.

func (*Params) ProtoMessage

func (*Params) ProtoMessage()

func (*Params) Reset

func (m *Params) Reset()

func (*Params) Size

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

func (*Params) String

func (m *Params) String() string

func (*Params) Unmarshal

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

func (Params) Validate

func (p Params) Validate() error

Validate checks that the incentives module parameters are valid.

func (*Params) XXX_DiscardUnknown

func (m *Params) XXX_DiscardUnknown()

func (*Params) XXX_Marshal

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

func (*Params) XXX_Merge

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

func (*Params) XXX_Size

func (m *Params) XXX_Size() int

func (*Params) XXX_Unmarshal

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

type PoolIncentiveKeeper

type PoolIncentiveKeeper interface {
	GetPoolIdFromGaugeId(ctx sdk.Context, gaugeId uint64, lockableDuration time.Duration) (uint64, error)
	GetInternalGaugeIDForPool(ctx sdk.Context, poolID uint64) (uint64, error)
	SetPoolGaugeIdNoLock(ctx sdk.Context, poolId uint64, gaugeId uint64)
	GetLongestLockableDuration(ctx sdk.Context) (time.Duration, error)
}

type PoolManagerKeeper

type PoolManagerKeeper interface {
	GetPool(ctx sdk.Context, poolId uint64) (poolmanagertypes.PoolI, error)
	GetOsmoVolumeForPool(ctx sdk.Context, poolId uint64) osmomath.Int
}

type QueryAllGroupsGaugesRequest

type QueryAllGroupsGaugesRequest struct {
}

func (*QueryAllGroupsGaugesRequest) Descriptor

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

func (*QueryAllGroupsGaugesRequest) Marshal

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

func (*QueryAllGroupsGaugesRequest) MarshalTo

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

func (*QueryAllGroupsGaugesRequest) MarshalToSizedBuffer

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

func (*QueryAllGroupsGaugesRequest) ProtoMessage

func (*QueryAllGroupsGaugesRequest) ProtoMessage()

func (*QueryAllGroupsGaugesRequest) Reset

func (m *QueryAllGroupsGaugesRequest) Reset()

func (*QueryAllGroupsGaugesRequest) Size

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

func (*QueryAllGroupsGaugesRequest) String

func (m *QueryAllGroupsGaugesRequest) String() string

func (*QueryAllGroupsGaugesRequest) Unmarshal

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

func (*QueryAllGroupsGaugesRequest) XXX_DiscardUnknown

func (m *QueryAllGroupsGaugesRequest) XXX_DiscardUnknown()

func (*QueryAllGroupsGaugesRequest) XXX_Marshal

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

func (*QueryAllGroupsGaugesRequest) XXX_Merge

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

func (*QueryAllGroupsGaugesRequest) XXX_Size

func (m *QueryAllGroupsGaugesRequest) XXX_Size() int

func (*QueryAllGroupsGaugesRequest) XXX_Unmarshal

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

type QueryAllGroupsGaugesResponse

type QueryAllGroupsGaugesResponse struct {
	Gauges []Gauge `protobuf:"bytes,1,rep,name=gauges,proto3" json:"gauges"`
}

func (*QueryAllGroupsGaugesResponse) Descriptor

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

func (*QueryAllGroupsGaugesResponse) GetGauges

func (m *QueryAllGroupsGaugesResponse) GetGauges() []Gauge

func (*QueryAllGroupsGaugesResponse) Marshal

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

func (*QueryAllGroupsGaugesResponse) MarshalTo

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

func (*QueryAllGroupsGaugesResponse) MarshalToSizedBuffer

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

func (*QueryAllGroupsGaugesResponse) ProtoMessage

func (*QueryAllGroupsGaugesResponse) ProtoMessage()

func (*QueryAllGroupsGaugesResponse) Reset

func (m *QueryAllGroupsGaugesResponse) Reset()

func (*QueryAllGroupsGaugesResponse) Size

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

func (*QueryAllGroupsGaugesResponse) String

func (*QueryAllGroupsGaugesResponse) Unmarshal

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

func (*QueryAllGroupsGaugesResponse) XXX_DiscardUnknown

func (m *QueryAllGroupsGaugesResponse) XXX_DiscardUnknown()

func (*QueryAllGroupsGaugesResponse) XXX_Marshal

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

func (*QueryAllGroupsGaugesResponse) XXX_Merge

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

func (*QueryAllGroupsGaugesResponse) XXX_Size

func (m *QueryAllGroupsGaugesResponse) XXX_Size() int

func (*QueryAllGroupsGaugesResponse) XXX_Unmarshal

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

type QueryAllGroupsRequest

type QueryAllGroupsRequest struct {
}

func (*QueryAllGroupsRequest) Descriptor

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

func (*QueryAllGroupsRequest) Marshal

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

func (*QueryAllGroupsRequest) MarshalTo

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

func (*QueryAllGroupsRequest) MarshalToSizedBuffer

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

func (*QueryAllGroupsRequest) ProtoMessage

func (*QueryAllGroupsRequest) ProtoMessage()

func (*QueryAllGroupsRequest) Reset

func (m *QueryAllGroupsRequest) Reset()

func (*QueryAllGroupsRequest) Size

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

func (*QueryAllGroupsRequest) String

func (m *QueryAllGroupsRequest) String() string

func (*QueryAllGroupsRequest) Unmarshal

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

func (*QueryAllGroupsRequest) XXX_DiscardUnknown

func (m *QueryAllGroupsRequest) XXX_DiscardUnknown()

func (*QueryAllGroupsRequest) XXX_Marshal

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

func (*QueryAllGroupsRequest) XXX_Merge

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

func (*QueryAllGroupsRequest) XXX_Size

func (m *QueryAllGroupsRequest) XXX_Size() int

func (*QueryAllGroupsRequest) XXX_Unmarshal

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

type QueryAllGroupsResponse

type QueryAllGroupsResponse struct {
	Groups []Group `protobuf:"bytes,1,rep,name=groups,proto3" json:"groups"`
}

func (*QueryAllGroupsResponse) Descriptor

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

func (*QueryAllGroupsResponse) GetGroups

func (m *QueryAllGroupsResponse) GetGroups() []Group

func (*QueryAllGroupsResponse) Marshal

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

func (*QueryAllGroupsResponse) MarshalTo

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

func (*QueryAllGroupsResponse) MarshalToSizedBuffer

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

func (*QueryAllGroupsResponse) ProtoMessage

func (*QueryAllGroupsResponse) ProtoMessage()

func (*QueryAllGroupsResponse) Reset

func (m *QueryAllGroupsResponse) Reset()

func (*QueryAllGroupsResponse) Size

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

func (*QueryAllGroupsResponse) String

func (m *QueryAllGroupsResponse) String() string

func (*QueryAllGroupsResponse) Unmarshal

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

func (*QueryAllGroupsResponse) XXX_DiscardUnknown

func (m *QueryAllGroupsResponse) XXX_DiscardUnknown()

func (*QueryAllGroupsResponse) XXX_Marshal

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

func (*QueryAllGroupsResponse) XXX_Merge

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

func (*QueryAllGroupsResponse) XXX_Size

func (m *QueryAllGroupsResponse) XXX_Size() int

func (*QueryAllGroupsResponse) XXX_Unmarshal

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

type QueryAllGroupsWithGaugeRequest

type QueryAllGroupsWithGaugeRequest struct {
}

func (*QueryAllGroupsWithGaugeRequest) Descriptor

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

func (*QueryAllGroupsWithGaugeRequest) Marshal

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

func (*QueryAllGroupsWithGaugeRequest) MarshalTo

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

func (*QueryAllGroupsWithGaugeRequest) MarshalToSizedBuffer

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

func (*QueryAllGroupsWithGaugeRequest) ProtoMessage

func (*QueryAllGroupsWithGaugeRequest) ProtoMessage()

func (*QueryAllGroupsWithGaugeRequest) Reset

func (m *QueryAllGroupsWithGaugeRequest) Reset()

func (*QueryAllGroupsWithGaugeRequest) Size

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

func (*QueryAllGroupsWithGaugeRequest) String

func (*QueryAllGroupsWithGaugeRequest) Unmarshal

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

func (*QueryAllGroupsWithGaugeRequest) XXX_DiscardUnknown

func (m *QueryAllGroupsWithGaugeRequest) XXX_DiscardUnknown()

func (*QueryAllGroupsWithGaugeRequest) XXX_Marshal

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

func (*QueryAllGroupsWithGaugeRequest) XXX_Merge

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

func (*QueryAllGroupsWithGaugeRequest) XXX_Size

func (m *QueryAllGroupsWithGaugeRequest) XXX_Size() int

func (*QueryAllGroupsWithGaugeRequest) XXX_Unmarshal

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

type QueryAllGroupsWithGaugeResponse

type QueryAllGroupsWithGaugeResponse struct {
	GroupsWithGauge []GroupsWithGauge `protobuf:"bytes,1,rep,name=groups_with_gauge,json=groupsWithGauge,proto3" json:"groups_with_gauge"`
}

func (*QueryAllGroupsWithGaugeResponse) Descriptor

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

func (*QueryAllGroupsWithGaugeResponse) GetGroupsWithGauge

func (m *QueryAllGroupsWithGaugeResponse) GetGroupsWithGauge() []GroupsWithGauge

func (*QueryAllGroupsWithGaugeResponse) Marshal

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

func (*QueryAllGroupsWithGaugeResponse) MarshalTo

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

func (*QueryAllGroupsWithGaugeResponse) MarshalToSizedBuffer

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

func (*QueryAllGroupsWithGaugeResponse) ProtoMessage

func (*QueryAllGroupsWithGaugeResponse) ProtoMessage()

func (*QueryAllGroupsWithGaugeResponse) Reset

func (*QueryAllGroupsWithGaugeResponse) Size

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

func (*QueryAllGroupsWithGaugeResponse) String

func (*QueryAllGroupsWithGaugeResponse) Unmarshal

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

func (*QueryAllGroupsWithGaugeResponse) XXX_DiscardUnknown

func (m *QueryAllGroupsWithGaugeResponse) XXX_DiscardUnknown()

func (*QueryAllGroupsWithGaugeResponse) XXX_Marshal

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

func (*QueryAllGroupsWithGaugeResponse) XXX_Merge

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

func (*QueryAllGroupsWithGaugeResponse) XXX_Size

func (m *QueryAllGroupsWithGaugeResponse) XXX_Size() int

func (*QueryAllGroupsWithGaugeResponse) XXX_Unmarshal

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

type QueryClient

type QueryClient interface {
	// ModuleToDistributeCoins returns coins that are going to be distributed
	ModuleToDistributeCoins(ctx context.Context, in *ModuleToDistributeCoinsRequest, opts ...grpc.CallOption) (*ModuleToDistributeCoinsResponse, error)
	// GaugeByID returns gauges by their respective ID
	GaugeByID(ctx context.Context, in *GaugeByIDRequest, opts ...grpc.CallOption) (*GaugeByIDResponse, error)
	// Gauges returns both upcoming and active gauges
	Gauges(ctx context.Context, in *GaugesRequest, opts ...grpc.CallOption) (*GaugesResponse, error)
	// ActiveGauges returns active gauges
	ActiveGauges(ctx context.Context, in *ActiveGaugesRequest, opts ...grpc.CallOption) (*ActiveGaugesResponse, error)
	// ActiveGaugesPerDenom returns active gauges by denom
	ActiveGaugesPerDenom(ctx context.Context, in *ActiveGaugesPerDenomRequest, opts ...grpc.CallOption) (*ActiveGaugesPerDenomResponse, error)
	// Returns scheduled gauges that have not yet occured
	UpcomingGauges(ctx context.Context, in *UpcomingGaugesRequest, opts ...grpc.CallOption) (*UpcomingGaugesResponse, error)
	// UpcomingGaugesPerDenom returns scheduled gauges that have not yet occured
	// by denom
	UpcomingGaugesPerDenom(ctx context.Context, in *UpcomingGaugesPerDenomRequest, opts ...grpc.CallOption) (*UpcomingGaugesPerDenomResponse, error)
	// RewardsEst returns an estimate of the rewards from now until a specified
	// time in the future The querier either provides an address or a set of locks
	// for which they want to find the associated rewards
	RewardsEst(ctx context.Context, in *RewardsEstRequest, opts ...grpc.CallOption) (*RewardsEstResponse, error)
	// LockableDurations returns lockable durations that are valid to distribute
	// incentives for
	LockableDurations(ctx context.Context, in *QueryLockableDurationsRequest, opts ...grpc.CallOption) (*QueryLockableDurationsResponse, error)
	// AllGroups returns all groups
	AllGroups(ctx context.Context, in *QueryAllGroupsRequest, opts ...grpc.CallOption) (*QueryAllGroupsResponse, error)
	// AllGroupsGauges returns all group gauges
	AllGroupsGauges(ctx context.Context, in *QueryAllGroupsGaugesRequest, opts ...grpc.CallOption) (*QueryAllGroupsGaugesResponse, error)
	// AllGroupsWithGauge returns all groups with their group gauge
	AllGroupsWithGauge(ctx context.Context, in *QueryAllGroupsWithGaugeRequest, opts ...grpc.CallOption) (*QueryAllGroupsWithGaugeResponse, error)
	// GroupByGroupGaugeID returns a group given its group gauge ID
	GroupByGroupGaugeID(ctx context.Context, in *QueryGroupByGroupGaugeIDRequest, opts ...grpc.CallOption) (*QueryGroupByGroupGaugeIDResponse, error)
	// CurrentWeightByGroupGaugeID returns the current weight since the
	// the last epoch given a group gauge ID
	CurrentWeightByGroupGaugeID(ctx context.Context, in *QueryCurrentWeightByGroupGaugeIDRequest, opts ...grpc.CallOption) (*QueryCurrentWeightByGroupGaugeIDResponse, 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 QueryCurrentWeightByGroupGaugeIDRequest

type QueryCurrentWeightByGroupGaugeIDRequest struct {
	GroupGaugeId uint64 `protobuf:"varint,1,opt,name=group_gauge_id,json=groupGaugeId,proto3" json:"group_gauge_id,omitempty"`
}

func (*QueryCurrentWeightByGroupGaugeIDRequest) Descriptor

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

func (*QueryCurrentWeightByGroupGaugeIDRequest) GetGroupGaugeId

func (m *QueryCurrentWeightByGroupGaugeIDRequest) GetGroupGaugeId() uint64

func (*QueryCurrentWeightByGroupGaugeIDRequest) Marshal

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

func (*QueryCurrentWeightByGroupGaugeIDRequest) MarshalTo

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

func (*QueryCurrentWeightByGroupGaugeIDRequest) MarshalToSizedBuffer

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

func (*QueryCurrentWeightByGroupGaugeIDRequest) ProtoMessage

func (*QueryCurrentWeightByGroupGaugeIDRequest) Reset

func (*QueryCurrentWeightByGroupGaugeIDRequest) Size

func (*QueryCurrentWeightByGroupGaugeIDRequest) String

func (*QueryCurrentWeightByGroupGaugeIDRequest) Unmarshal

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

func (*QueryCurrentWeightByGroupGaugeIDRequest) XXX_DiscardUnknown

func (m *QueryCurrentWeightByGroupGaugeIDRequest) XXX_DiscardUnknown()

func (*QueryCurrentWeightByGroupGaugeIDRequest) XXX_Marshal

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

func (*QueryCurrentWeightByGroupGaugeIDRequest) XXX_Merge

func (*QueryCurrentWeightByGroupGaugeIDRequest) XXX_Size

func (*QueryCurrentWeightByGroupGaugeIDRequest) XXX_Unmarshal

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

type QueryCurrentWeightByGroupGaugeIDResponse

type QueryCurrentWeightByGroupGaugeIDResponse struct {
	GaugeWeight []GaugeWeight `protobuf:"bytes,1,rep,name=gauge_weight,json=gaugeWeight,proto3" json:"gauge_weight"`
}

func (*QueryCurrentWeightByGroupGaugeIDResponse) Descriptor

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

func (*QueryCurrentWeightByGroupGaugeIDResponse) GetGaugeWeight

func (*QueryCurrentWeightByGroupGaugeIDResponse) Marshal

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

func (*QueryCurrentWeightByGroupGaugeIDResponse) MarshalTo

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

func (*QueryCurrentWeightByGroupGaugeIDResponse) MarshalToSizedBuffer

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

func (*QueryCurrentWeightByGroupGaugeIDResponse) ProtoMessage

func (*QueryCurrentWeightByGroupGaugeIDResponse) Reset

func (*QueryCurrentWeightByGroupGaugeIDResponse) Size

func (*QueryCurrentWeightByGroupGaugeIDResponse) String

func (*QueryCurrentWeightByGroupGaugeIDResponse) Unmarshal

func (*QueryCurrentWeightByGroupGaugeIDResponse) XXX_DiscardUnknown

func (m *QueryCurrentWeightByGroupGaugeIDResponse) XXX_DiscardUnknown()

func (*QueryCurrentWeightByGroupGaugeIDResponse) XXX_Marshal

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

func (*QueryCurrentWeightByGroupGaugeIDResponse) XXX_Merge

func (*QueryCurrentWeightByGroupGaugeIDResponse) XXX_Size

func (*QueryCurrentWeightByGroupGaugeIDResponse) XXX_Unmarshal

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

type QueryGroupByGroupGaugeIDRequest

type QueryGroupByGroupGaugeIDRequest struct {
	Id uint64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
}

func (*QueryGroupByGroupGaugeIDRequest) Descriptor

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

func (*QueryGroupByGroupGaugeIDRequest) GetId

func (*QueryGroupByGroupGaugeIDRequest) Marshal

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

func (*QueryGroupByGroupGaugeIDRequest) MarshalTo

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

func (*QueryGroupByGroupGaugeIDRequest) MarshalToSizedBuffer

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

func (*QueryGroupByGroupGaugeIDRequest) ProtoMessage

func (*QueryGroupByGroupGaugeIDRequest) ProtoMessage()

func (*QueryGroupByGroupGaugeIDRequest) Reset

func (*QueryGroupByGroupGaugeIDRequest) Size

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

func (*QueryGroupByGroupGaugeIDRequest) String

func (*QueryGroupByGroupGaugeIDRequest) Unmarshal

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

func (*QueryGroupByGroupGaugeIDRequest) XXX_DiscardUnknown

func (m *QueryGroupByGroupGaugeIDRequest) XXX_DiscardUnknown()

func (*QueryGroupByGroupGaugeIDRequest) XXX_Marshal

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

func (*QueryGroupByGroupGaugeIDRequest) XXX_Merge

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

func (*QueryGroupByGroupGaugeIDRequest) XXX_Size

func (m *QueryGroupByGroupGaugeIDRequest) XXX_Size() int

func (*QueryGroupByGroupGaugeIDRequest) XXX_Unmarshal

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

type QueryGroupByGroupGaugeIDResponse

type QueryGroupByGroupGaugeIDResponse struct {
	Group Group `protobuf:"bytes,1,opt,name=group,proto3" json:"group"`
}

func (*QueryGroupByGroupGaugeIDResponse) Descriptor

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

func (*QueryGroupByGroupGaugeIDResponse) GetGroup

func (*QueryGroupByGroupGaugeIDResponse) Marshal

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

func (*QueryGroupByGroupGaugeIDResponse) MarshalTo

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

func (*QueryGroupByGroupGaugeIDResponse) MarshalToSizedBuffer

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

func (*QueryGroupByGroupGaugeIDResponse) ProtoMessage

func (*QueryGroupByGroupGaugeIDResponse) ProtoMessage()

func (*QueryGroupByGroupGaugeIDResponse) Reset

func (*QueryGroupByGroupGaugeIDResponse) Size

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

func (*QueryGroupByGroupGaugeIDResponse) String

func (*QueryGroupByGroupGaugeIDResponse) Unmarshal

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

func (*QueryGroupByGroupGaugeIDResponse) XXX_DiscardUnknown

func (m *QueryGroupByGroupGaugeIDResponse) XXX_DiscardUnknown()

func (*QueryGroupByGroupGaugeIDResponse) XXX_Marshal

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

func (*QueryGroupByGroupGaugeIDResponse) XXX_Merge

func (*QueryGroupByGroupGaugeIDResponse) XXX_Size

func (m *QueryGroupByGroupGaugeIDResponse) XXX_Size() int

func (*QueryGroupByGroupGaugeIDResponse) XXX_Unmarshal

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

type QueryLockableDurationsRequest

type QueryLockableDurationsRequest struct {
}

func (*QueryLockableDurationsRequest) Descriptor

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

func (*QueryLockableDurationsRequest) Marshal

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

func (*QueryLockableDurationsRequest) MarshalTo

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

func (*QueryLockableDurationsRequest) MarshalToSizedBuffer

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

func (*QueryLockableDurationsRequest) ProtoMessage

func (*QueryLockableDurationsRequest) ProtoMessage()

func (*QueryLockableDurationsRequest) Reset

func (m *QueryLockableDurationsRequest) Reset()

func (*QueryLockableDurationsRequest) Size

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

func (*QueryLockableDurationsRequest) String

func (*QueryLockableDurationsRequest) Unmarshal

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

func (*QueryLockableDurationsRequest) XXX_DiscardUnknown

func (m *QueryLockableDurationsRequest) XXX_DiscardUnknown()

func (*QueryLockableDurationsRequest) XXX_Marshal

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

func (*QueryLockableDurationsRequest) XXX_Merge

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

func (*QueryLockableDurationsRequest) XXX_Size

func (m *QueryLockableDurationsRequest) XXX_Size() int

func (*QueryLockableDurationsRequest) XXX_Unmarshal

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

type QueryLockableDurationsResponse

type QueryLockableDurationsResponse struct {
	// Time durations that users can lock coins for in order to recieve rewards
	LockableDurations []time.Duration `` /* 140-byte string literal not displayed */
}

func (*QueryLockableDurationsResponse) Descriptor

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

func (*QueryLockableDurationsResponse) GetLockableDurations

func (m *QueryLockableDurationsResponse) GetLockableDurations() []time.Duration

func (*QueryLockableDurationsResponse) Marshal

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

func (*QueryLockableDurationsResponse) MarshalTo

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

func (*QueryLockableDurationsResponse) MarshalToSizedBuffer

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

func (*QueryLockableDurationsResponse) ProtoMessage

func (*QueryLockableDurationsResponse) ProtoMessage()

func (*QueryLockableDurationsResponse) Reset

func (m *QueryLockableDurationsResponse) Reset()

func (*QueryLockableDurationsResponse) Size

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

func (*QueryLockableDurationsResponse) String

func (*QueryLockableDurationsResponse) Unmarshal

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

func (*QueryLockableDurationsResponse) XXX_DiscardUnknown

func (m *QueryLockableDurationsResponse) XXX_DiscardUnknown()

func (*QueryLockableDurationsResponse) XXX_Marshal

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

func (*QueryLockableDurationsResponse) XXX_Merge

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

func (*QueryLockableDurationsResponse) XXX_Size

func (m *QueryLockableDurationsResponse) XXX_Size() int

func (*QueryLockableDurationsResponse) XXX_Unmarshal

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

type QueryServer

type QueryServer interface {
	// ModuleToDistributeCoins returns coins that are going to be distributed
	ModuleToDistributeCoins(context.Context, *ModuleToDistributeCoinsRequest) (*ModuleToDistributeCoinsResponse, error)
	// GaugeByID returns gauges by their respective ID
	GaugeByID(context.Context, *GaugeByIDRequest) (*GaugeByIDResponse, error)
	// Gauges returns both upcoming and active gauges
	Gauges(context.Context, *GaugesRequest) (*GaugesResponse, error)
	// ActiveGauges returns active gauges
	ActiveGauges(context.Context, *ActiveGaugesRequest) (*ActiveGaugesResponse, error)
	// ActiveGaugesPerDenom returns active gauges by denom
	ActiveGaugesPerDenom(context.Context, *ActiveGaugesPerDenomRequest) (*ActiveGaugesPerDenomResponse, error)
	// Returns scheduled gauges that have not yet occured
	UpcomingGauges(context.Context, *UpcomingGaugesRequest) (*UpcomingGaugesResponse, error)
	// UpcomingGaugesPerDenom returns scheduled gauges that have not yet occured
	// by denom
	UpcomingGaugesPerDenom(context.Context, *UpcomingGaugesPerDenomRequest) (*UpcomingGaugesPerDenomResponse, error)
	// RewardsEst returns an estimate of the rewards from now until a specified
	// time in the future The querier either provides an address or a set of locks
	// for which they want to find the associated rewards
	RewardsEst(context.Context, *RewardsEstRequest) (*RewardsEstResponse, error)
	// LockableDurations returns lockable durations that are valid to distribute
	// incentives for
	LockableDurations(context.Context, *QueryLockableDurationsRequest) (*QueryLockableDurationsResponse, error)
	// AllGroups returns all groups
	AllGroups(context.Context, *QueryAllGroupsRequest) (*QueryAllGroupsResponse, error)
	// AllGroupsGauges returns all group gauges
	AllGroupsGauges(context.Context, *QueryAllGroupsGaugesRequest) (*QueryAllGroupsGaugesResponse, error)
	// AllGroupsWithGauge returns all groups with their group gauge
	AllGroupsWithGauge(context.Context, *QueryAllGroupsWithGaugeRequest) (*QueryAllGroupsWithGaugeResponse, error)
	// GroupByGroupGaugeID returns a group given its group gauge ID
	GroupByGroupGaugeID(context.Context, *QueryGroupByGroupGaugeIDRequest) (*QueryGroupByGroupGaugeIDResponse, error)
	// CurrentWeightByGroupGaugeID returns the current weight since the
	// the last epoch given a group gauge ID
	CurrentWeightByGroupGaugeID(context.Context, *QueryCurrentWeightByGroupGaugeIDRequest) (*QueryCurrentWeightByGroupGaugeIDResponse, error)
}

QueryServer is the server API for Query service.

type RewardsEstRequest

type RewardsEstRequest struct {
	// Address that is being queried for future estimated rewards
	Owner string `protobuf:"bytes,1,opt,name=owner,proto3" json:"owner,omitempty" yaml:"owner"`
	// Lock IDs included in future reward estimation
	LockIds []uint64 `protobuf:"varint,2,rep,packed,name=lock_ids,json=lockIds,proto3" json:"lock_ids,omitempty"`
	// Upper time limit of reward estimation
	// Lower limit is current epoch
	EndEpoch int64 `protobuf:"varint,3,opt,name=end_epoch,json=endEpoch,proto3" json:"end_epoch,omitempty"`
}

func (*RewardsEstRequest) Descriptor

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

func (*RewardsEstRequest) GetEndEpoch

func (m *RewardsEstRequest) GetEndEpoch() int64

func (*RewardsEstRequest) GetLockIds

func (m *RewardsEstRequest) GetLockIds() []uint64

func (*RewardsEstRequest) GetOwner

func (m *RewardsEstRequest) GetOwner() string

func (*RewardsEstRequest) Marshal

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

func (*RewardsEstRequest) MarshalTo

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

func (*RewardsEstRequest) MarshalToSizedBuffer

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

func (*RewardsEstRequest) ProtoMessage

func (*RewardsEstRequest) ProtoMessage()

func (*RewardsEstRequest) Reset

func (m *RewardsEstRequest) Reset()

func (*RewardsEstRequest) Size

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

func (*RewardsEstRequest) String

func (m *RewardsEstRequest) String() string

func (*RewardsEstRequest) Unmarshal

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

func (*RewardsEstRequest) XXX_DiscardUnknown

func (m *RewardsEstRequest) XXX_DiscardUnknown()

func (*RewardsEstRequest) XXX_Marshal

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

func (*RewardsEstRequest) XXX_Merge

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

func (*RewardsEstRequest) XXX_Size

func (m *RewardsEstRequest) XXX_Size() int

func (*RewardsEstRequest) XXX_Unmarshal

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

type RewardsEstResponse

type RewardsEstResponse struct {
	// Estimated coin rewards that will be recieved at provided address
	// from specified locks between current time and end epoch
	Coins github_com_cosmos_cosmos_sdk_types.Coins `protobuf:"bytes,1,rep,name=coins,proto3,castrepeated=github.com/cosmos/cosmos-sdk/types.Coins" json:"coins"`
}

func (*RewardsEstResponse) Descriptor

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

func (*RewardsEstResponse) GetCoins

func (*RewardsEstResponse) Marshal

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

func (*RewardsEstResponse) MarshalTo

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

func (*RewardsEstResponse) MarshalToSizedBuffer

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

func (*RewardsEstResponse) ProtoMessage

func (*RewardsEstResponse) ProtoMessage()

func (*RewardsEstResponse) Reset

func (m *RewardsEstResponse) Reset()

func (*RewardsEstResponse) Size

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

func (*RewardsEstResponse) String

func (m *RewardsEstResponse) String() string

func (*RewardsEstResponse) Unmarshal

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

func (*RewardsEstResponse) XXX_DiscardUnknown

func (m *RewardsEstResponse) XXX_DiscardUnknown()

func (*RewardsEstResponse) XXX_Marshal

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

func (*RewardsEstResponse) XXX_Merge

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

func (*RewardsEstResponse) XXX_Size

func (m *RewardsEstResponse) XXX_Size() int

func (*RewardsEstResponse) XXX_Unmarshal

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

type SplittingPolicy

type SplittingPolicy int32

SplittingPolicy determines the way we want to split incentives in groupGauges

const (
	ByVolume SplittingPolicy = 0
)

func (SplittingPolicy) EnumDescriptor

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

func (SplittingPolicy) String

func (x SplittingPolicy) String() string

type TxFeesKeeper

type TxFeesKeeper interface {
	GetBaseDenom(ctx sdk.Context) (denom string, err error)
}

TxFeesKeeper defines the expected interface needed to managing transaction fees.

type UnexpectedFinishedGaugeError

type UnexpectedFinishedGaugeError struct {
	GaugeId uint64
}

func (UnexpectedFinishedGaugeError) Error

type UnimplementedMsgServer

type UnimplementedMsgServer struct {
}

UnimplementedMsgServer can be embedded to have forward compatible implementations.

func (*UnimplementedMsgServer) AddToGauge

func (*UnimplementedMsgServer) CreateGauge

func (*UnimplementedMsgServer) CreateGroup

type UnimplementedQueryServer

type UnimplementedQueryServer struct {
}

UnimplementedQueryServer can be embedded to have forward compatible implementations.

func (*UnimplementedQueryServer) ActiveGauges

func (*UnimplementedQueryServer) ActiveGaugesPerDenom

func (*UnimplementedQueryServer) AllGroups

func (*UnimplementedQueryServer) AllGroupsGauges

func (*UnimplementedQueryServer) AllGroupsWithGauge

func (*UnimplementedQueryServer) GaugeByID

func (*UnimplementedQueryServer) Gauges

func (*UnimplementedQueryServer) GroupByGroupGaugeID

func (*UnimplementedQueryServer) LockableDurations

func (*UnimplementedQueryServer) ModuleToDistributeCoins

func (*UnimplementedQueryServer) RewardsEst

func (*UnimplementedQueryServer) UpcomingGauges

func (*UnimplementedQueryServer) UpcomingGaugesPerDenom

type UnsupportedSplittingPolicyError

type UnsupportedSplittingPolicyError struct {
	GroupGaugeId    uint64
	SplittingPolicy SplittingPolicy
}

func (UnsupportedSplittingPolicyError) Error

type UpcomingGaugesPerDenomRequest

type UpcomingGaugesPerDenomRequest struct {
	// Filter for upcoming gagues that match specific denom
	Denom string `protobuf:"bytes,1,opt,name=denom,proto3" json:"denom,omitempty"`
	// Pagination defines pagination for the request
	Pagination *query.PageRequest `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"`
}

func (*UpcomingGaugesPerDenomRequest) Descriptor

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

func (*UpcomingGaugesPerDenomRequest) GetDenom

func (m *UpcomingGaugesPerDenomRequest) GetDenom() string

func (*UpcomingGaugesPerDenomRequest) GetPagination

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

func (*UpcomingGaugesPerDenomRequest) Marshal

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

func (*UpcomingGaugesPerDenomRequest) MarshalTo

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

func (*UpcomingGaugesPerDenomRequest) MarshalToSizedBuffer

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

func (*UpcomingGaugesPerDenomRequest) ProtoMessage

func (*UpcomingGaugesPerDenomRequest) ProtoMessage()

func (*UpcomingGaugesPerDenomRequest) Reset

func (m *UpcomingGaugesPerDenomRequest) Reset()

func (*UpcomingGaugesPerDenomRequest) Size

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

func (*UpcomingGaugesPerDenomRequest) String

func (*UpcomingGaugesPerDenomRequest) Unmarshal

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

func (*UpcomingGaugesPerDenomRequest) XXX_DiscardUnknown

func (m *UpcomingGaugesPerDenomRequest) XXX_DiscardUnknown()

func (*UpcomingGaugesPerDenomRequest) XXX_Marshal

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

func (*UpcomingGaugesPerDenomRequest) XXX_Merge

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

func (*UpcomingGaugesPerDenomRequest) XXX_Size

func (m *UpcomingGaugesPerDenomRequest) XXX_Size() int

func (*UpcomingGaugesPerDenomRequest) XXX_Unmarshal

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

type UpcomingGaugesPerDenomResponse

type UpcomingGaugesPerDenomResponse struct {
	// Upcoming gagues that match denom in query
	UpcomingGauges []Gauge `protobuf:"bytes,1,rep,name=upcoming_gauges,json=upcomingGauges,proto3" json:"upcoming_gauges"`
	// Pagination defines pagination for the response
	Pagination *query.PageResponse `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"`
}

func (*UpcomingGaugesPerDenomResponse) Descriptor

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

func (*UpcomingGaugesPerDenomResponse) GetPagination

func (*UpcomingGaugesPerDenomResponse) GetUpcomingGauges

func (m *UpcomingGaugesPerDenomResponse) GetUpcomingGauges() []Gauge

func (*UpcomingGaugesPerDenomResponse) Marshal

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

func (*UpcomingGaugesPerDenomResponse) MarshalTo

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

func (*UpcomingGaugesPerDenomResponse) MarshalToSizedBuffer

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

func (*UpcomingGaugesPerDenomResponse) ProtoMessage

func (*UpcomingGaugesPerDenomResponse) ProtoMessage()

func (*UpcomingGaugesPerDenomResponse) Reset

func (m *UpcomingGaugesPerDenomResponse) Reset()

func (*UpcomingGaugesPerDenomResponse) Size

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

func (*UpcomingGaugesPerDenomResponse) String

func (*UpcomingGaugesPerDenomResponse) Unmarshal

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

func (*UpcomingGaugesPerDenomResponse) XXX_DiscardUnknown

func (m *UpcomingGaugesPerDenomResponse) XXX_DiscardUnknown()

func (*UpcomingGaugesPerDenomResponse) XXX_Marshal

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

func (*UpcomingGaugesPerDenomResponse) XXX_Merge

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

func (*UpcomingGaugesPerDenomResponse) XXX_Size

func (m *UpcomingGaugesPerDenomResponse) XXX_Size() int

func (*UpcomingGaugesPerDenomResponse) XXX_Unmarshal

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

type UpcomingGaugesRequest

type UpcomingGaugesRequest struct {
	// Pagination defines pagination for the request
	Pagination *query.PageRequest `protobuf:"bytes,1,opt,name=pagination,proto3" json:"pagination,omitempty"`
}

func (*UpcomingGaugesRequest) Descriptor

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

func (*UpcomingGaugesRequest) GetPagination

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

func (*UpcomingGaugesRequest) Marshal

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

func (*UpcomingGaugesRequest) MarshalTo

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

func (*UpcomingGaugesRequest) MarshalToSizedBuffer

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

func (*UpcomingGaugesRequest) ProtoMessage

func (*UpcomingGaugesRequest) ProtoMessage()

func (*UpcomingGaugesRequest) Reset

func (m *UpcomingGaugesRequest) Reset()

func (*UpcomingGaugesRequest) Size

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

func (*UpcomingGaugesRequest) String

func (m *UpcomingGaugesRequest) String() string

func (*UpcomingGaugesRequest) Unmarshal

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

func (*UpcomingGaugesRequest) XXX_DiscardUnknown

func (m *UpcomingGaugesRequest) XXX_DiscardUnknown()

func (*UpcomingGaugesRequest) XXX_Marshal

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

func (*UpcomingGaugesRequest) XXX_Merge

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

func (*UpcomingGaugesRequest) XXX_Size

func (m *UpcomingGaugesRequest) XXX_Size() int

func (*UpcomingGaugesRequest) XXX_Unmarshal

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

type UpcomingGaugesResponse

type UpcomingGaugesResponse struct {
	// Gauges whose distribution is upcoming
	Data []Gauge `protobuf:"bytes,1,rep,name=data,proto3" json:"data"`
	// Pagination defines pagination for the response
	Pagination *query.PageResponse `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"`
}

func (*UpcomingGaugesResponse) Descriptor

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

func (*UpcomingGaugesResponse) GetData

func (m *UpcomingGaugesResponse) GetData() []Gauge

func (*UpcomingGaugesResponse) GetPagination

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

func (*UpcomingGaugesResponse) Marshal

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

func (*UpcomingGaugesResponse) MarshalTo

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

func (*UpcomingGaugesResponse) MarshalToSizedBuffer

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

func (*UpcomingGaugesResponse) ProtoMessage

func (*UpcomingGaugesResponse) ProtoMessage()

func (*UpcomingGaugesResponse) Reset

func (m *UpcomingGaugesResponse) Reset()

func (*UpcomingGaugesResponse) Size

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

func (*UpcomingGaugesResponse) String

func (m *UpcomingGaugesResponse) String() string

func (*UpcomingGaugesResponse) Unmarshal

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

func (*UpcomingGaugesResponse) XXX_DiscardUnknown

func (m *UpcomingGaugesResponse) XXX_DiscardUnknown()

func (*UpcomingGaugesResponse) XXX_Marshal

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

func (*UpcomingGaugesResponse) XXX_Merge

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

func (*UpcomingGaugesResponse) XXX_Size

func (m *UpcomingGaugesResponse) XXX_Size() int

func (*UpcomingGaugesResponse) XXX_Unmarshal

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

Jump to

Keyboard shortcuts

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