types

package
v0.0.0-...-49173f0 Latest Latest
Warning

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

Go to latest
Published: Nov 5, 2024 License: Apache-2.0 Imports: 30 Imported by: 0

Documentation

Overview

Package types is a reverse proxy.

It translates gRPC into RESTful JSON APIs.

Index

Constants

View Source
const (
	// ModuleName defines the module name
	ModuleName = "reward"

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

	// MemStoreKey defines the in-memory store key
	MemStoreKey = "mem_reward"
)

Variables

View Source
var (
	ErrInvalidSigner          = sdkerrors.Register(ModuleName, 1101, "expected gov account as only signer for proposal message")
	ErrInvalidRewardPoolCoins = sdkerrors.Register(ModuleName, 1102, "invalid coins for reward pool")
	ErrInvalidCoordinatorID   = sdkerrors.Register(ModuleName, 1103, "invalid coordinator id for reward pool")
	ErrRewardPoolNotFound     = sdkerrors.Register(ModuleName, 1104, "reward pool not found")
	ErrRewardPoolClosed       = sdkerrors.Register(ModuleName, 1105, "reward pool is closed")
	ErrInvalidSignatureCounts = sdkerrors.Register(ModuleName, 1106, "invalid signature counts")
	ErrInvalidLastBlockHeight = sdkerrors.Register(ModuleName, 1107, "invalid last block height")
	ErrInvalidRewardHeight    = sdkerrors.Register(ModuleName, 1108, "invalid reward height")
	ErrInsufficientFunds      = sdkerrors.Register(ModuleName, 1109, "insufficient funds")
)

x/reward module sentinel errors

View Source
var (
	ErrInvalidLengthEvents        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowEvents          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupEvents = 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 (
	// ParamsKey is the prefix to retrieve all Params
	ParamsKey = collections.NewPrefix("p_reward")

	// RewardPoolKey is the prefix to retrieve all RewardPool
	RewardPoolKey = collections.NewPrefix("RewardPool/value/")
)
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 (
	ErrInvalidLengthRewardPool        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowRewardPool          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupRewardPool = 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 Msg_serviceDesc = _Msg_serviceDesc
View Source
var Query_serviceDesc = _Query_serviceDesc

Functions

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 to stop working. Consider using RegisterQueryHandlerFromEndpoint instead.

func RegisterQueryServer

func RegisterQueryServer(s grpc1.Server, srv QueryServer)

Types

type AccountKeeper

type AccountKeeper interface {
	GetModuleAddress(name string) sdk.AccAddress
	GetAccount(ctx context.Context, addr sdk.AccAddress) sdk.AccountI
}

AccountKeeper defines the expected account keeper used for simulations

type BankKeeper

type BankKeeper interface {
	SpendableCoins(ctx context.Context, addr sdk.AccAddress) sdk.Coins
	GetBalance(ctx context.Context, addr sdk.AccAddress, denom string) sdk.Coin
	SendCoinsFromModuleToAccount(ctx context.Context, senderModule string, recipientAddr sdk.AccAddress, amt sdk.Coins) error
	SendCoinsFromAccountToModule(ctx context.Context, senderAddr sdk.AccAddress, recipientModule string, amt sdk.Coins) error
}

BankKeeper defines the expected interface needed to retrieve account balances.

type EventRewardPoolCreated

type EventRewardPoolCreated struct {
	LaunchId uint64 `protobuf:"varint,1,opt,name=launch_id,json=launchId,proto3" json:"launch_id,omitempty"`
	Provider string `protobuf:"bytes,2,opt,name=provider,proto3" json:"provider,omitempty"`
}

func (*EventRewardPoolCreated) Descriptor

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

func (*EventRewardPoolCreated) GetLaunchId

func (m *EventRewardPoolCreated) GetLaunchId() uint64

func (*EventRewardPoolCreated) GetProvider

func (m *EventRewardPoolCreated) GetProvider() string

func (*EventRewardPoolCreated) Marshal

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

func (*EventRewardPoolCreated) MarshalTo

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

func (*EventRewardPoolCreated) MarshalToSizedBuffer

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

func (*EventRewardPoolCreated) ProtoMessage

func (*EventRewardPoolCreated) ProtoMessage()

func (*EventRewardPoolCreated) Reset

func (m *EventRewardPoolCreated) Reset()

func (*EventRewardPoolCreated) Size

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

func (*EventRewardPoolCreated) String

func (m *EventRewardPoolCreated) String() string

func (*EventRewardPoolCreated) Unmarshal

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

func (*EventRewardPoolCreated) XXX_DiscardUnknown

func (m *EventRewardPoolCreated) XXX_DiscardUnknown()

func (*EventRewardPoolCreated) XXX_Marshal

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

func (*EventRewardPoolCreated) XXX_Merge

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

func (*EventRewardPoolCreated) XXX_Size

func (m *EventRewardPoolCreated) XXX_Size() int

func (*EventRewardPoolCreated) XXX_Unmarshal

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

type EventRewardPoolRemoved

type EventRewardPoolRemoved struct {
	LaunchId uint64 `protobuf:"varint,1,opt,name=launch_id,json=launchId,proto3" json:"launch_id,omitempty"`
}

func (*EventRewardPoolRemoved) Descriptor

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

func (*EventRewardPoolRemoved) GetLaunchId

func (m *EventRewardPoolRemoved) GetLaunchId() uint64

func (*EventRewardPoolRemoved) Marshal

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

func (*EventRewardPoolRemoved) MarshalTo

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

func (*EventRewardPoolRemoved) MarshalToSizedBuffer

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

func (*EventRewardPoolRemoved) ProtoMessage

func (*EventRewardPoolRemoved) ProtoMessage()

func (*EventRewardPoolRemoved) Reset

func (m *EventRewardPoolRemoved) Reset()

func (*EventRewardPoolRemoved) Size

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

func (*EventRewardPoolRemoved) String

func (m *EventRewardPoolRemoved) String() string

func (*EventRewardPoolRemoved) Unmarshal

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

func (*EventRewardPoolRemoved) XXX_DiscardUnknown

func (m *EventRewardPoolRemoved) XXX_DiscardUnknown()

func (*EventRewardPoolRemoved) XXX_Marshal

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

func (*EventRewardPoolRemoved) XXX_Merge

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

func (*EventRewardPoolRemoved) XXX_Size

func (m *EventRewardPoolRemoved) XXX_Size() int

func (*EventRewardPoolRemoved) XXX_Unmarshal

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

type EventRewardsDistributed

type EventRewardsDistributed struct {
	LaunchId uint64                                   `protobuf:"varint,1,opt,name=launch_id,json=launchId,proto3" json:"launch_id,omitempty"`
	Receiver string                                   `protobuf:"bytes,2,opt,name=receiver,proto3" json:"receiver,omitempty"`
	Rewards  github_com_cosmos_cosmos_sdk_types.Coins `` /* 160-byte string literal not displayed */
}

func (*EventRewardsDistributed) Descriptor

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

func (*EventRewardsDistributed) GetLaunchId

func (m *EventRewardsDistributed) GetLaunchId() uint64

func (*EventRewardsDistributed) GetReceiver

func (m *EventRewardsDistributed) GetReceiver() string

func (*EventRewardsDistributed) GetRewards

func (*EventRewardsDistributed) Marshal

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

func (*EventRewardsDistributed) MarshalTo

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

func (*EventRewardsDistributed) MarshalToSizedBuffer

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

func (*EventRewardsDistributed) ProtoMessage

func (*EventRewardsDistributed) ProtoMessage()

func (*EventRewardsDistributed) Reset

func (m *EventRewardsDistributed) Reset()

func (*EventRewardsDistributed) Size

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

func (*EventRewardsDistributed) String

func (m *EventRewardsDistributed) String() string

func (*EventRewardsDistributed) Unmarshal

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

func (*EventRewardsDistributed) XXX_DiscardUnknown

func (m *EventRewardsDistributed) XXX_DiscardUnknown()

func (*EventRewardsDistributed) XXX_Marshal

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

func (*EventRewardsDistributed) XXX_Merge

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

func (*EventRewardsDistributed) XXX_Size

func (m *EventRewardsDistributed) XXX_Size() int

func (*EventRewardsDistributed) XXX_Unmarshal

func (m *EventRewardsDistributed) 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"`
	RewardPoolList []RewardPool `protobuf:"bytes,2,rep,name=reward_pool_list,json=rewardPoolList,proto3" json:"reward_pool_list"`
}

GenesisState defines the reward module's genesis state.

func DefaultGenesis

func DefaultGenesis() *GenesisState

DefaultGenesis returns the default genesis state

func (*GenesisState) Descriptor

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

func (*GenesisState) GetParams

func (m *GenesisState) GetParams() Params

func (*GenesisState) GetRewardPoolList

func (m *GenesisState) GetRewardPoolList() []RewardPool

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 LaunchKeeper

type LaunchKeeper interface {
	GetChain(ctx context.Context, launchID uint64) (launchtypes.Chain, error)
	Chains(ctx context.Context) ([]launchtypes.Chain, error)
}

type MsgClient

type MsgClient interface {
	// UpdateParams defines a (governance) operation for updating the module
	// parameters. The authority defaults to the x/gov module account.
	UpdateParams(ctx context.Context, in *MsgUpdateParams, opts ...grpc.CallOption) (*MsgUpdateParamsResponse, error)
	SetRewards(ctx context.Context, in *MsgSetRewards, opts ...grpc.CallOption) (*MsgSetRewardsResponse, error)
}

MsgClient is the client API for Msg service.

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

func NewMsgClient

func NewMsgClient(cc grpc1.ClientConn) MsgClient

type MsgServer

type MsgServer interface {
	// UpdateParams defines a (governance) operation for updating the module
	// parameters. The authority defaults to the x/gov module account.
	UpdateParams(context.Context, *MsgUpdateParams) (*MsgUpdateParamsResponse, error)
	SetRewards(context.Context, *MsgSetRewards) (*MsgSetRewardsResponse, error)
}

MsgServer is the server API for Msg service.

type MsgSetRewards

type MsgSetRewards struct {
	Provider         string                                   `protobuf:"bytes,1,opt,name=provider,proto3" json:"provider,omitempty"`
	LaunchId         uint64                                   `protobuf:"varint,2,opt,name=launch_id,json=launchId,proto3" json:"launch_id,omitempty"`
	Coins            github_com_cosmos_cosmos_sdk_types.Coins `` /* 156-byte string literal not displayed */
	LastRewardHeight int64                                    `protobuf:"varint,4,opt,name=last_reward_height,json=lastRewardHeight,proto3" json:"last_reward_height,omitempty"`
}

func NewMsgSetRewards

func NewMsgSetRewards(provider string, launchID uint64, coins sdk.Coins, lastRewardHeight int64) *MsgSetRewards

func (*MsgSetRewards) Descriptor

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

func (*MsgSetRewards) GetCoins

func (*MsgSetRewards) GetLastRewardHeight

func (m *MsgSetRewards) GetLastRewardHeight() int64

func (*MsgSetRewards) GetLaunchId

func (m *MsgSetRewards) GetLaunchId() uint64

func (*MsgSetRewards) GetProvider

func (m *MsgSetRewards) GetProvider() string

func (*MsgSetRewards) Marshal

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

func (*MsgSetRewards) MarshalTo

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

func (*MsgSetRewards) MarshalToSizedBuffer

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

func (*MsgSetRewards) ProtoMessage

func (*MsgSetRewards) ProtoMessage()

func (*MsgSetRewards) Reset

func (m *MsgSetRewards) Reset()

func (*MsgSetRewards) Size

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

func (*MsgSetRewards) String

func (m *MsgSetRewards) String() string

func (MsgSetRewards) Type

func (msg MsgSetRewards) Type() string

func (*MsgSetRewards) Unmarshal

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

func (*MsgSetRewards) ValidateBasic

func (msg *MsgSetRewards) ValidateBasic() error

func (*MsgSetRewards) XXX_DiscardUnknown

func (m *MsgSetRewards) XXX_DiscardUnknown()

func (*MsgSetRewards) XXX_Marshal

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

func (*MsgSetRewards) XXX_Merge

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

func (*MsgSetRewards) XXX_Size

func (m *MsgSetRewards) XXX_Size() int

func (*MsgSetRewards) XXX_Unmarshal

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

type MsgSetRewardsResponse

type MsgSetRewardsResponse struct {
	PreviousCoins            github_com_cosmos_cosmos_sdk_types.Coins `` /* 193-byte string literal not displayed */
	PreviousLastRewardHeight int64                                    `` /* 138-byte string literal not displayed */
	NewCoins                 github_com_cosmos_cosmos_sdk_types.Coins `` /* 178-byte string literal not displayed */
	NewLastRewardHeight      int64                                    `protobuf:"varint,4,opt,name=new_last_reward_height,json=newLastRewardHeight,proto3" json:"new_last_reward_height,omitempty"`
}

func (*MsgSetRewardsResponse) Descriptor

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

func (*MsgSetRewardsResponse) GetNewCoins

func (*MsgSetRewardsResponse) GetNewLastRewardHeight

func (m *MsgSetRewardsResponse) GetNewLastRewardHeight() int64

func (*MsgSetRewardsResponse) GetPreviousCoins

func (*MsgSetRewardsResponse) GetPreviousLastRewardHeight

func (m *MsgSetRewardsResponse) GetPreviousLastRewardHeight() int64

func (*MsgSetRewardsResponse) Marshal

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

func (*MsgSetRewardsResponse) MarshalTo

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

func (*MsgSetRewardsResponse) MarshalToSizedBuffer

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

func (*MsgSetRewardsResponse) ProtoMessage

func (*MsgSetRewardsResponse) ProtoMessage()

func (*MsgSetRewardsResponse) Reset

func (m *MsgSetRewardsResponse) Reset()

func (*MsgSetRewardsResponse) Size

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

func (*MsgSetRewardsResponse) String

func (m *MsgSetRewardsResponse) String() string

func (*MsgSetRewardsResponse) Unmarshal

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

func (*MsgSetRewardsResponse) XXX_DiscardUnknown

func (m *MsgSetRewardsResponse) XXX_DiscardUnknown()

func (*MsgSetRewardsResponse) XXX_Marshal

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

func (*MsgSetRewardsResponse) XXX_Merge

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

func (*MsgSetRewardsResponse) XXX_Size

func (m *MsgSetRewardsResponse) XXX_Size() int

func (*MsgSetRewardsResponse) XXX_Unmarshal

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

type MsgUpdateParams

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

MsgUpdateParams is the Msg/UpdateParams request type.

func (*MsgUpdateParams) Descriptor

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

func (*MsgUpdateParams) GetAuthority

func (m *MsgUpdateParams) GetAuthority() string

func (*MsgUpdateParams) GetParams

func (m *MsgUpdateParams) GetParams() Params

func (*MsgUpdateParams) Marshal

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

func (*MsgUpdateParams) MarshalTo

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

func (*MsgUpdateParams) MarshalToSizedBuffer

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

func (*MsgUpdateParams) ProtoMessage

func (*MsgUpdateParams) ProtoMessage()

func (*MsgUpdateParams) Reset

func (m *MsgUpdateParams) Reset()

func (*MsgUpdateParams) Size

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

func (*MsgUpdateParams) String

func (m *MsgUpdateParams) String() string

func (*MsgUpdateParams) Unmarshal

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

func (*MsgUpdateParams) XXX_DiscardUnknown

func (m *MsgUpdateParams) XXX_DiscardUnknown()

func (*MsgUpdateParams) XXX_Marshal

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

func (*MsgUpdateParams) XXX_Merge

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

func (*MsgUpdateParams) XXX_Size

func (m *MsgUpdateParams) XXX_Size() int

func (*MsgUpdateParams) XXX_Unmarshal

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

type MsgUpdateParamsResponse

type MsgUpdateParamsResponse struct {
}

MsgUpdateParamsResponse defines the response structure for executing a MsgUpdateParams message.

func (*MsgUpdateParamsResponse) Descriptor

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

func (*MsgUpdateParamsResponse) Marshal

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

func (*MsgUpdateParamsResponse) MarshalTo

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

func (*MsgUpdateParamsResponse) MarshalToSizedBuffer

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

func (*MsgUpdateParamsResponse) ProtoMessage

func (*MsgUpdateParamsResponse) ProtoMessage()

func (*MsgUpdateParamsResponse) Reset

func (m *MsgUpdateParamsResponse) Reset()

func (*MsgUpdateParamsResponse) Size

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

func (*MsgUpdateParamsResponse) String

func (m *MsgUpdateParamsResponse) String() string

func (*MsgUpdateParamsResponse) Unmarshal

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

func (*MsgUpdateParamsResponse) XXX_DiscardUnknown

func (m *MsgUpdateParamsResponse) XXX_DiscardUnknown()

func (*MsgUpdateParamsResponse) XXX_Marshal

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

func (*MsgUpdateParamsResponse) XXX_Merge

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

func (*MsgUpdateParamsResponse) XXX_Size

func (m *MsgUpdateParamsResponse) XXX_Size() int

func (*MsgUpdateParamsResponse) XXX_Unmarshal

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

type ParamSubspace

type ParamSubspace interface {
	Get(context.Context, []byte, interface{})
	Set(context.Context, []byte, interface{})
}

ParamSubspace defines the expected Subspace interface for parameters.

type Params

type Params struct {
}

Params defines the parameters for the module.

func DefaultParams

func DefaultParams() Params

DefaultParams returns a default set of parameters.

func NewParams

func NewParams() Params

NewParams creates a new Params instance.

func (*Params) Descriptor

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

func (*Params) Equal

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

func (*Params) Marshal

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

func (*Params) MarshalTo

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

func (*Params) MarshalToSizedBuffer

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

func (*Params) ProtoMessage

func (*Params) ProtoMessage()

func (*Params) Reset

func (m *Params) Reset()

func (*Params) Size

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

func (*Params) String

func (m *Params) String() string

func (*Params) Unmarshal

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

func (Params) Validate

func (p Params) Validate() error

Validate validates the set of 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 ProfileKeeper

type ProfileKeeper interface {
	GetValidator(ctx context.Context, address string) (profiletypes.Validator, error)
	GetValidatorByOperatorAddress(ctx context.Context, operatorAddress string) (profiletypes.ValidatorByOperatorAddress, error)
	GetCoordinator(ctx context.Context, coordinatorID uint64) (profiletypes.Coordinator, error)
	CoordinatorIDFromAddress(ctx context.Context, address sdk.AccAddress) (uint64, error)
}

type QueryAllRewardPoolRequest

type QueryAllRewardPoolRequest struct {
	Pagination *query.PageRequest `protobuf:"bytes,1,opt,name=pagination,proto3" json:"pagination,omitempty"`
}

func (*QueryAllRewardPoolRequest) Descriptor

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

func (*QueryAllRewardPoolRequest) GetPagination

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

func (*QueryAllRewardPoolRequest) Marshal

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

func (*QueryAllRewardPoolRequest) MarshalTo

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

func (*QueryAllRewardPoolRequest) MarshalToSizedBuffer

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

func (*QueryAllRewardPoolRequest) ProtoMessage

func (*QueryAllRewardPoolRequest) ProtoMessage()

func (*QueryAllRewardPoolRequest) Reset

func (m *QueryAllRewardPoolRequest) Reset()

func (*QueryAllRewardPoolRequest) Size

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

func (*QueryAllRewardPoolRequest) String

func (m *QueryAllRewardPoolRequest) String() string

func (*QueryAllRewardPoolRequest) Unmarshal

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

func (*QueryAllRewardPoolRequest) XXX_DiscardUnknown

func (m *QueryAllRewardPoolRequest) XXX_DiscardUnknown()

func (*QueryAllRewardPoolRequest) XXX_Marshal

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

func (*QueryAllRewardPoolRequest) XXX_Merge

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

func (*QueryAllRewardPoolRequest) XXX_Size

func (m *QueryAllRewardPoolRequest) XXX_Size() int

func (*QueryAllRewardPoolRequest) XXX_Unmarshal

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

type QueryAllRewardPoolResponse

type QueryAllRewardPoolResponse struct {
	RewardPool []RewardPool        `protobuf:"bytes,1,rep,name=reward_pool,json=rewardPool,proto3" json:"reward_pool"`
	Pagination *query.PageResponse `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"`
}

func (*QueryAllRewardPoolResponse) Descriptor

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

func (*QueryAllRewardPoolResponse) GetPagination

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

func (*QueryAllRewardPoolResponse) GetRewardPool

func (m *QueryAllRewardPoolResponse) GetRewardPool() []RewardPool

func (*QueryAllRewardPoolResponse) Marshal

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

func (*QueryAllRewardPoolResponse) MarshalTo

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

func (*QueryAllRewardPoolResponse) MarshalToSizedBuffer

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

func (*QueryAllRewardPoolResponse) ProtoMessage

func (*QueryAllRewardPoolResponse) ProtoMessage()

func (*QueryAllRewardPoolResponse) Reset

func (m *QueryAllRewardPoolResponse) Reset()

func (*QueryAllRewardPoolResponse) Size

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

func (*QueryAllRewardPoolResponse) String

func (m *QueryAllRewardPoolResponse) String() string

func (*QueryAllRewardPoolResponse) Unmarshal

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

func (*QueryAllRewardPoolResponse) XXX_DiscardUnknown

func (m *QueryAllRewardPoolResponse) XXX_DiscardUnknown()

func (*QueryAllRewardPoolResponse) XXX_Marshal

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

func (*QueryAllRewardPoolResponse) XXX_Merge

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

func (*QueryAllRewardPoolResponse) XXX_Size

func (m *QueryAllRewardPoolResponse) XXX_Size() int

func (*QueryAllRewardPoolResponse) XXX_Unmarshal

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

type QueryClient

type QueryClient interface {
	// Parameters queries the parameters of the module.
	Params(ctx context.Context, in *QueryParamsRequest, opts ...grpc.CallOption) (*QueryParamsResponse, error)
	// Queries a list of RewardPool items.
	GetRewardPool(ctx context.Context, in *QueryGetRewardPoolRequest, opts ...grpc.CallOption) (*QueryGetRewardPoolResponse, error)
	ListRewardPool(ctx context.Context, in *QueryAllRewardPoolRequest, opts ...grpc.CallOption) (*QueryAllRewardPoolResponse, 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 QueryGetRewardPoolRequest

type QueryGetRewardPoolRequest struct {
	LaunchId uint64 `protobuf:"varint,1,opt,name=launch_id,json=launchId,proto3" json:"launch_id,omitempty"`
}

func (*QueryGetRewardPoolRequest) Descriptor

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

func (*QueryGetRewardPoolRequest) GetLaunchId

func (m *QueryGetRewardPoolRequest) GetLaunchId() uint64

func (*QueryGetRewardPoolRequest) Marshal

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

func (*QueryGetRewardPoolRequest) MarshalTo

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

func (*QueryGetRewardPoolRequest) MarshalToSizedBuffer

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

func (*QueryGetRewardPoolRequest) ProtoMessage

func (*QueryGetRewardPoolRequest) ProtoMessage()

func (*QueryGetRewardPoolRequest) Reset

func (m *QueryGetRewardPoolRequest) Reset()

func (*QueryGetRewardPoolRequest) Size

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

func (*QueryGetRewardPoolRequest) String

func (m *QueryGetRewardPoolRequest) String() string

func (*QueryGetRewardPoolRequest) Unmarshal

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

func (*QueryGetRewardPoolRequest) XXX_DiscardUnknown

func (m *QueryGetRewardPoolRequest) XXX_DiscardUnknown()

func (*QueryGetRewardPoolRequest) XXX_Marshal

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

func (*QueryGetRewardPoolRequest) XXX_Merge

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

func (*QueryGetRewardPoolRequest) XXX_Size

func (m *QueryGetRewardPoolRequest) XXX_Size() int

func (*QueryGetRewardPoolRequest) XXX_Unmarshal

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

type QueryGetRewardPoolResponse

type QueryGetRewardPoolResponse struct {
	RewardPool RewardPool `protobuf:"bytes,1,opt,name=reward_pool,json=rewardPool,proto3" json:"reward_pool"`
}

func (*QueryGetRewardPoolResponse) Descriptor

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

func (*QueryGetRewardPoolResponse) GetRewardPool

func (m *QueryGetRewardPoolResponse) GetRewardPool() RewardPool

func (*QueryGetRewardPoolResponse) Marshal

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

func (*QueryGetRewardPoolResponse) MarshalTo

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

func (*QueryGetRewardPoolResponse) MarshalToSizedBuffer

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

func (*QueryGetRewardPoolResponse) ProtoMessage

func (*QueryGetRewardPoolResponse) ProtoMessage()

func (*QueryGetRewardPoolResponse) Reset

func (m *QueryGetRewardPoolResponse) Reset()

func (*QueryGetRewardPoolResponse) Size

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

func (*QueryGetRewardPoolResponse) String

func (m *QueryGetRewardPoolResponse) String() string

func (*QueryGetRewardPoolResponse) Unmarshal

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

func (*QueryGetRewardPoolResponse) XXX_DiscardUnknown

func (m *QueryGetRewardPoolResponse) XXX_DiscardUnknown()

func (*QueryGetRewardPoolResponse) XXX_Marshal

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

func (*QueryGetRewardPoolResponse) XXX_Merge

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

func (*QueryGetRewardPoolResponse) XXX_Size

func (m *QueryGetRewardPoolResponse) XXX_Size() int

func (*QueryGetRewardPoolResponse) XXX_Unmarshal

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

type QueryParamsRequest

type QueryParamsRequest struct {
}

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

func (*QueryParamsRequest) Descriptor

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

func (*QueryParamsRequest) Marshal

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

func (*QueryParamsRequest) MarshalTo

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

func (*QueryParamsRequest) MarshalToSizedBuffer

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

func (*QueryParamsRequest) ProtoMessage

func (*QueryParamsRequest) ProtoMessage()

func (*QueryParamsRequest) Reset

func (m *QueryParamsRequest) Reset()

func (*QueryParamsRequest) Size

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

func (*QueryParamsRequest) String

func (m *QueryParamsRequest) String() string

func (*QueryParamsRequest) Unmarshal

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

func (*QueryParamsRequest) XXX_DiscardUnknown

func (m *QueryParamsRequest) XXX_DiscardUnknown()

func (*QueryParamsRequest) XXX_Marshal

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

func (*QueryParamsRequest) XXX_Merge

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

func (*QueryParamsRequest) XXX_Size

func (m *QueryParamsRequest) XXX_Size() int

func (*QueryParamsRequest) XXX_Unmarshal

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

type QueryParamsResponse

type QueryParamsResponse struct {
	// params holds all the parameters of this module.
	Params Params `protobuf:"bytes,1,opt,name=params,proto3" json:"params"`
}

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

func (*QueryParamsResponse) Descriptor

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

func (*QueryParamsResponse) GetParams

func (m *QueryParamsResponse) GetParams() Params

func (*QueryParamsResponse) Marshal

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

func (*QueryParamsResponse) MarshalTo

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

func (*QueryParamsResponse) MarshalToSizedBuffer

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

func (*QueryParamsResponse) ProtoMessage

func (*QueryParamsResponse) ProtoMessage()

func (*QueryParamsResponse) Reset

func (m *QueryParamsResponse) Reset()

func (*QueryParamsResponse) Size

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

func (*QueryParamsResponse) String

func (m *QueryParamsResponse) String() string

func (*QueryParamsResponse) Unmarshal

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

func (*QueryParamsResponse) XXX_DiscardUnknown

func (m *QueryParamsResponse) XXX_DiscardUnknown()

func (*QueryParamsResponse) XXX_Marshal

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

func (*QueryParamsResponse) XXX_Merge

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

func (*QueryParamsResponse) XXX_Size

func (m *QueryParamsResponse) XXX_Size() int

func (*QueryParamsResponse) XXX_Unmarshal

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

type QueryServer

type QueryServer interface {
	// Parameters queries the parameters of the module.
	Params(context.Context, *QueryParamsRequest) (*QueryParamsResponse, error)
	// Queries a list of RewardPool items.
	GetRewardPool(context.Context, *QueryGetRewardPoolRequest) (*QueryGetRewardPoolResponse, error)
	ListRewardPool(context.Context, *QueryAllRewardPoolRequest) (*QueryAllRewardPoolResponse, error)
}

QueryServer is the server API for Query service.

type RewardPool

type RewardPool struct {
	LaunchId            uint64                                   `protobuf:"varint,1,opt,name=launch_id,json=launchId,proto3" json:"launch_id,omitempty"`
	Provider            string                                   `protobuf:"bytes,2,opt,name=provider,proto3" json:"provider,omitempty"`
	InitialCoins        github_com_cosmos_cosmos_sdk_types.Coins `` /* 190-byte string literal not displayed */
	RemainingCoins      github_com_cosmos_cosmos_sdk_types.Coins `` /* 196-byte string literal not displayed */
	LastRewardHeight    int64                                    `protobuf:"varint,5,opt,name=last_reward_height,json=lastRewardHeight,proto3" json:"last_reward_height,omitempty"`
	CurrentRewardHeight int64                                    `protobuf:"varint,6,opt,name=current_reward_height,json=currentRewardHeight,proto3" json:"current_reward_height,omitempty"`
	Closed              bool                                     `protobuf:"varint,7,opt,name=closed,proto3" json:"closed,omitempty"`
}

func NewRewardPool

func NewRewardPool(launchID uint64, currentRewardHeight int64) RewardPool

NewRewardPool returns a new RewardPool object

func (*RewardPool) Descriptor

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

func (*RewardPool) GetClosed

func (m *RewardPool) GetClosed() bool

func (*RewardPool) GetCurrentRewardHeight

func (m *RewardPool) GetCurrentRewardHeight() int64

func (*RewardPool) GetInitialCoins

func (*RewardPool) GetLastRewardHeight

func (m *RewardPool) GetLastRewardHeight() int64

func (*RewardPool) GetLaunchId

func (m *RewardPool) GetLaunchId() uint64

func (*RewardPool) GetProvider

func (m *RewardPool) GetProvider() string

func (*RewardPool) GetRemainingCoins

func (m *RewardPool) GetRemainingCoins() github_com_cosmos_cosmos_sdk_types.Coins

func (*RewardPool) Marshal

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

func (*RewardPool) MarshalTo

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

func (*RewardPool) MarshalToSizedBuffer

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

func (*RewardPool) ProtoMessage

func (*RewardPool) ProtoMessage()

func (*RewardPool) Reset

func (m *RewardPool) Reset()

func (*RewardPool) Size

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

func (*RewardPool) String

func (m *RewardPool) String() string

func (*RewardPool) Unmarshal

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

func (RewardPool) Validate

func (m RewardPool) Validate() error

Validate check the RewardPool object

func (*RewardPool) XXX_DiscardUnknown

func (m *RewardPool) XXX_DiscardUnknown()

func (*RewardPool) XXX_Marshal

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

func (*RewardPool) XXX_Merge

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

func (*RewardPool) XXX_Size

func (m *RewardPool) XXX_Size() int

func (*RewardPool) XXX_Unmarshal

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

type UnimplementedMsgServer

type UnimplementedMsgServer struct {
}

UnimplementedMsgServer can be embedded to have forward compatible implementations.

func (*UnimplementedMsgServer) SetRewards

func (*UnimplementedMsgServer) UpdateParams

type UnimplementedQueryServer

type UnimplementedQueryServer struct {
}

UnimplementedQueryServer can be embedded to have forward compatible implementations.

func (*UnimplementedQueryServer) GetRewardPool

func (*UnimplementedQueryServer) ListRewardPool

func (*UnimplementedQueryServer) Params

Jump to

Keyboard shortcuts

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