types

package
v3.0.1-0...-844edf2 Latest Latest
Warning

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

Go to latest
Published: Jun 23, 2022 License: Apache-2.0 Imports: 32 Imported by: 0

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"

	AttributeGaugeID = "gauge_id"
)

event types

View Source
const (
	TypeMsgCreateGauge = "create_gauge"
	TypeMsgAddToGauge  = "add_to_gauge"
)

constants

View Source
const DefaultIndex uint64 = 1

DefaultIndex is the default capability global index

Variables

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 (
	// 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}

	// KeyCurrentEpoch defines key for storing current epoch
	KeyCurrentEpoch = []byte{0x08}

	// KeyEpochBeginBlock defines key for storing begin block of current epoch
	KeyEpochBeginBlock = []byte{0x09}

	LockableDurationsKey = []byte("lockable_durations")
)
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 (
	KeyDistrEpochIdentifier = []byte("DistrEpochIdentifier")
)

Parameter store keys

View Source
var (
	ModuleCdc = codec.NewAminoCodec(amino)
)

Functions

func KeyPrefix

func KeyPrefix(p string) []byte

func ParamKeyTable

func ParamKeyTable() paramtypes.KeyTable

ParamTable for minting module.

func RegisterCodec

func RegisterCodec(cdc *codec.LegacyAmino)

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

func RegisterMsgServer

func RegisterMsgServer(s grpc1.Server, srv MsgServer)

func RegisterQueryHandler

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

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

func RegisterQueryHandlerClient

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

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

func RegisterQueryHandlerFromEndpoint

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

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

func RegisterQueryHandlerServer

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

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

func RegisterQueryServer

func RegisterQueryServer(s grpc1.Server, srv QueryServer)

Types

type ActiveGaugesRequest

type ActiveGaugesRequest struct {
	// pagination defines an 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 {
	Data []Gauge `protobuf:"bytes,1,rep,name=data,proto3" json:"data"`
	// pagination defines an 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 {
	GetAllBalances(ctx sdk.Context, addr sdk.AccAddress) sdk.Coins

	SendCoinsFromModuleToAccount(ctx sdk.Context, senderModule string, recipientAddr sdk.AccAddress, amt 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 EpochKeeper

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

type Gauge

type Gauge struct {
	Id          uint64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
	IsPerpetual bool   `protobuf:"varint,2,opt,name=is_perpetual,json=isPerpetual,proto3" json:"is_perpetual,omitempty"`
	// distribution incentives by third party
	// Rewards are distributed to lockups that are are returned by at least one of
	// these queries
	DistributeTo types.QueryCondition                     `protobuf:"bytes,3,opt,name=distribute_to,json=distributeTo,proto3" json:"distribute_to"`
	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"`
	// distribution start time
	StartTime         time.Time                                `protobuf:"bytes,5,opt,name=start_time,json=startTime,proto3,stdtime" json:"start_time" yaml:"start_time"`
	NumEpochsPaidOver uint64                                   `protobuf:"varint,6,opt,name=num_epochs_paid_over,json=numEpochsPaidOver,proto3" json:"num_epochs_paid_over,omitempty"`
	FilledEpochs      uint64                                   `protobuf:"varint,7,opt,name=filled_epochs,json=filledEpochs,proto3" json:"filled_epochs,omitempty"`
	DistributedCoins  github_com_cosmos_cosmos_sdk_types.Coins `` /* 153-byte string literal not displayed */
}

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

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

func (Gauge) IsFinishedGauge

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

func (Gauge) IsUpcomingGauge

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

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 {
	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 *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 GaugesRequest

type GaugesRequest struct {
	// pagination defines an 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 {
	Data []Gauge `protobuf:"bytes,1,rep,name=data,proto3" json:"data"`
	// pagination defines an 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 defines all the parameters of the module
	Params            Params          `protobuf:"bytes,1,opt,name=params,proto3" json:"params"`
	Gauges            []Gauge         `protobuf:"bytes,2,rep,name=gauges,proto3" json:"gauges"`
	LockableDurations []time.Duration `` /* 140-byte string literal not displayed */
}

GenesisState defines the incentives module's genesis state.

func DefaultGenesis

func DefaultGenesis() *GenesisState

DefaultGenesis returns the default Capability genesis state

func GetGenesisStateFromAppState

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

GetGenesisStateFromAppState returns x/incentives GenesisState given raw application genesis state.

func (*GenesisState) Descriptor

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

func (*GenesisState) GetGauges

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

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 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)
	AfterDistribute(ctx sdk.Context, gaugeId uint64)
}

type LockableDurationsInfo

type LockableDurationsInfo struct {
	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 {
	GetLocksPastTimeDenom(ctx sdk.Context, denom string, timestamp time.Time) []lockuptypes.PeriodLock
	GetLocksLongerThanDurationDenom(ctx sdk.Context, denom string, duration time.Duration) []lockuptypes.PeriodLock
	GetPeriodLocksAccumulation(ctx sdk.Context, query lockuptypes.QueryCondition) sdk.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 ModuleDistributedCoinsRequest

type ModuleDistributedCoinsRequest struct {
}

func (*ModuleDistributedCoinsRequest) Descriptor

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

func (*ModuleDistributedCoinsRequest) Marshal

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

func (*ModuleDistributedCoinsRequest) MarshalTo

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

func (*ModuleDistributedCoinsRequest) MarshalToSizedBuffer

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

func (*ModuleDistributedCoinsRequest) ProtoMessage

func (*ModuleDistributedCoinsRequest) ProtoMessage()

func (*ModuleDistributedCoinsRequest) Reset

func (m *ModuleDistributedCoinsRequest) Reset()

func (*ModuleDistributedCoinsRequest) Size

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

func (*ModuleDistributedCoinsRequest) String

func (*ModuleDistributedCoinsRequest) Unmarshal

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

func (*ModuleDistributedCoinsRequest) XXX_DiscardUnknown

func (m *ModuleDistributedCoinsRequest) XXX_DiscardUnknown()

func (*ModuleDistributedCoinsRequest) XXX_Marshal

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

func (*ModuleDistributedCoinsRequest) XXX_Merge

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

func (*ModuleDistributedCoinsRequest) XXX_Size

func (m *ModuleDistributedCoinsRequest) XXX_Size() int

func (*ModuleDistributedCoinsRequest) XXX_Unmarshal

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

type ModuleDistributedCoinsResponse

type ModuleDistributedCoinsResponse struct {
	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 (*ModuleDistributedCoinsResponse) Descriptor

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

func (*ModuleDistributedCoinsResponse) GetCoins

func (*ModuleDistributedCoinsResponse) Marshal

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

func (*ModuleDistributedCoinsResponse) MarshalTo

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

func (*ModuleDistributedCoinsResponse) MarshalToSizedBuffer

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

func (*ModuleDistributedCoinsResponse) ProtoMessage

func (*ModuleDistributedCoinsResponse) ProtoMessage()

func (*ModuleDistributedCoinsResponse) Reset

func (m *ModuleDistributedCoinsResponse) Reset()

func (*ModuleDistributedCoinsResponse) Size

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

func (*ModuleDistributedCoinsResponse) String

func (*ModuleDistributedCoinsResponse) Unmarshal

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

func (*ModuleDistributedCoinsResponse) XXX_DiscardUnknown

func (m *ModuleDistributedCoinsResponse) XXX_DiscardUnknown()

func (*ModuleDistributedCoinsResponse) XXX_Marshal

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

func (*ModuleDistributedCoinsResponse) XXX_Merge

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

func (*ModuleDistributedCoinsResponse) XXX_Size

func (m *ModuleDistributedCoinsResponse) XXX_Size() int

func (*ModuleDistributedCoinsResponse) XXX_Unmarshal

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

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 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   string                                   `protobuf:"bytes,1,opt,name=owner,proto3" json:"owner,omitempty" yaml:"owner"`
	GaugeId uint64                                   `protobuf:"varint,2,opt,name=gauge_id,json=gaugeId,proto3" json:"gauge_id,omitempty"`
	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"`
}

func NewMsgAddToGauge

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

NewMsgCreateGauge creates a message to create a 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

func (MsgAddToGauge) GetSigners

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

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

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

func (*MsgAddToGauge) Unmarshal

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

func (MsgAddToGauge) ValidateBasic

func (m MsgAddToGauge) ValidateBasic() error

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

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 {
	IsPerpetual bool `protobuf:"varint,1,opt,name=is_perpetual,json=isPerpetual,proto3" json:"is_perpetual,omitempty"`
	// distribution incentives by third party
	Owner        string                                   `protobuf:"bytes,2,opt,name=owner,proto3" json:"owner,omitempty" yaml:"owner"`
	DistributeTo types.QueryCondition                     `protobuf:"bytes,3,opt,name=distribute_to,json=distributeTo,proto3" json:"distribute_to"`
	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"`
	// distribution start time
	StartTime         time.Time `protobuf:"bytes,5,opt,name=start_time,json=startTime,proto3,stdtime" json:"start_time" yaml:"timestamp"`
	NumEpochsPaidOver uint64    `protobuf:"varint,6,opt,name=num_epochs_paid_over,json=numEpochsPaidOver,proto3" json:"num_epochs_paid_over,omitempty"`
}

func NewMsgCreateGauge

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

NewMsgCreateGauge creates a message to create a gauge

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

func (m MsgCreateGauge) GetSignBytes() []byte

func (MsgCreateGauge) GetSigners

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

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

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

func (*MsgCreateGauge) Unmarshal

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

func (MsgCreateGauge) ValidateBasic

func (m MsgCreateGauge) ValidateBasic() error

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 MsgServer

type MsgServer interface {
	CreateGauge(context.Context, *MsgCreateGauge) (*MsgCreateGaugeResponse, error)
	AddToGauge(context.Context, *MsgAddToGauge) (*MsgAddToGaugeResponse, error)
}

MsgServer is the server API for Msg service.

type MultiIncentiveHooks

type MultiIncentiveHooks []IncentiveHooks

combine multiple incentive hooks, all hook functions are run in array sequence

func NewMultiIncentiveHooks

func NewMultiIncentiveHooks(hooks ...IncentiveHooks) MultiIncentiveHooks

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

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

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 Params

type Params struct {
	// distribution epoch identifier
	DistrEpochIdentifier string `` /* 153-byte string literal not displayed */
}

Params holds parameters for the incentives module

func DefaultParams

func DefaultParams() Params

default minting module parameters

func NewParams

func NewParams(distrEpochIdentifier string) Params

func (*Params) Descriptor

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

func (*Params) GetDistrEpochIdentifier

func (m *Params) GetDistrEpochIdentifier() 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

Implements params.ParamSet

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 params

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 QueryClient

type QueryClient interface {
	// returns coins that is going to be distributed
	ModuleToDistributeCoins(ctx context.Context, in *ModuleToDistributeCoinsRequest, opts ...grpc.CallOption) (*ModuleToDistributeCoinsResponse, error)
	// returns coins that are distributed by module so far
	ModuleDistributedCoins(ctx context.Context, in *ModuleDistributedCoinsRequest, opts ...grpc.CallOption) (*ModuleDistributedCoinsResponse, error)
	// returns Gauge by id
	GaugeByID(ctx context.Context, in *GaugeByIDRequest, opts ...grpc.CallOption) (*GaugeByIDResponse, error)
	// returns gauges both upcoming and active
	Gauges(ctx context.Context, in *GaugesRequest, opts ...grpc.CallOption) (*GaugesResponse, error)
	// returns active gauges
	ActiveGauges(ctx context.Context, in *ActiveGaugesRequest, opts ...grpc.CallOption) (*ActiveGaugesResponse, error)
	// returns scheduled gauges
	UpcomingGauges(ctx context.Context, in *UpcomingGaugesRequest, opts ...grpc.CallOption) (*UpcomingGaugesResponse, error)
	// RewardsEst returns an estimate of the rewards at a future specific time.
	// 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(ctx context.Context, in *QueryLockableDurationsRequest, opts ...grpc.CallOption) (*QueryLockableDurationsResponse, 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 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 {
	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 {
	// returns coins that is going to be distributed
	ModuleToDistributeCoins(context.Context, *ModuleToDistributeCoinsRequest) (*ModuleToDistributeCoinsResponse, error)
	// returns coins that are distributed by module so far
	ModuleDistributedCoins(context.Context, *ModuleDistributedCoinsRequest) (*ModuleDistributedCoinsResponse, error)
	// returns Gauge by id
	GaugeByID(context.Context, *GaugeByIDRequest) (*GaugeByIDResponse, error)
	// returns gauges both upcoming and active
	Gauges(context.Context, *GaugesRequest) (*GaugesResponse, error)
	// returns active gauges
	ActiveGauges(context.Context, *ActiveGaugesRequest) (*ActiveGaugesResponse, error)
	// returns scheduled gauges
	UpcomingGauges(context.Context, *UpcomingGaugesRequest) (*UpcomingGaugesResponse, error)
	// RewardsEst returns an estimate of the rewards at a future specific time.
	// 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(context.Context, *QueryLockableDurationsRequest) (*QueryLockableDurationsResponse, error)
}

QueryServer is the server API for Query service.

type RewardsEstRequest

type RewardsEstRequest struct {
	Owner    string   `protobuf:"bytes,1,opt,name=owner,proto3" json:"owner,omitempty" yaml:"owner"`
	LockIds  []uint64 `protobuf:"varint,2,rep,packed,name=lock_ids,json=lockIds,proto3" json:"lock_ids,omitempty"`
	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 {
	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 UnimplementedMsgServer

type UnimplementedMsgServer struct {
}

UnimplementedMsgServer can be embedded to have forward compatible implementations.

func (*UnimplementedMsgServer) AddToGauge

func (*UnimplementedMsgServer) CreateGauge

type UnimplementedQueryServer

type UnimplementedQueryServer struct {
}

UnimplementedQueryServer can be embedded to have forward compatible implementations.

func (*UnimplementedQueryServer) ActiveGauges

func (*UnimplementedQueryServer) GaugeByID

func (*UnimplementedQueryServer) Gauges

func (*UnimplementedQueryServer) LockableDurations

func (*UnimplementedQueryServer) ModuleDistributedCoins

func (*UnimplementedQueryServer) ModuleToDistributeCoins

func (*UnimplementedQueryServer) RewardsEst

func (*UnimplementedQueryServer) UpcomingGauges

type UpcomingGaugesRequest

type UpcomingGaugesRequest struct {
	// pagination defines an 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 {
	Data []Gauge `protobuf:"bytes,1,rep,name=data,proto3" json:"data"`
	// pagination defines an 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