types

package
v0.34.0 Latest Latest
Warning

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

Go to latest
Published: Jun 19, 2024 License: Apache-2.0 Imports: 33 Imported by: 1

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 = "stablestake"

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

	// RouterKey defines the module's message routing key
	RouterKey = ModuleName

	// MemStoreKey defines the in-memory store key
	MemStoreKey = "mem_stablestake"
)
View Source
const DefaultIndex uint64 = 1

DefaultIndex is the default global index

View Source
const PoolId = math.MaxInt16
View Source
const TypeMsgBond = "stake"
View Source
const TypeMsgUnbond = "unbond"

Variables

View Source
var (
	ErrInvalidLengthDebt        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowDebt          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupDebt = fmt.Errorf("proto: unexpected end of group")
)
View Source
var (
	ErrInvalidDepositDenom  = errorsmod.Register(ModuleName, 1, "invalid deposit denom")
	ErrInvalidBorrowDenom   = errorsmod.Register(ModuleName, 2, "invalid borrow denom")
	ErrRedemptionRateIsZero = errorsmod.Register(ModuleName, 3, "redemption rate is zero")
)

x/stablestake module sentinel errors

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 (
	KeyDepositDenom         = []byte("DepositDenom")
	KeyRedemptionRate       = []byte("RedemptionRate")
	KeyEpochLength          = []byte("EpochLength")
	KeyInterestRate         = []byte("InterestRate")
	KeyInterestRateMax      = []byte("InterestRateMax")
	KeyInterestRateMin      = []byte("InterestRateMin")
	KeyInterestRateIncrease = []byte("InterestRateIncrease")
	KeyInterestRateDecrease = []byte("InterestRateDecrease")
	KeyHealthGainFactor     = []byte("HealthGainFactor")
	KeyTotalValue           = []byte("TotalValue")
)

Parameter keys

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 (
	ErrInvalidLengthTypes        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowTypes          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupTypes = fmt.Errorf("proto: unexpected end of group")
)
View Source
var DebtPrefixKey = []byte{0x01}

Functions

func GetShareDenom

func GetShareDenom() string

func KeyPrefix

func KeyPrefix(p string) []byte

func ParamKeyTable

func ParamKeyTable() paramtypes.KeyTable

ParamKeyTable the param key table for launch module

func PoolAddress added in v0.17.0

func PoolAddress() sdk.AccAddress

func RegisterCodec

func RegisterCodec(cdc *codec.LegacyAmino)

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 {
	GetAccount(ctx sdk.Context, addr sdk.AccAddress) types.AccountI
}

AccountKeeper defines the expected account keeper used for simulations (noalias)

type AssetProfileKeeper added in v0.15.0

type AssetProfileKeeper interface {
	// SetEntry set a specific entry in the store from its index
	SetEntry(ctx sdk.Context, entry assetprofiletypes.Entry)
	// GetEntry returns a entry from its index
	GetEntry(ctx sdk.Context, baseDenom string) (val assetprofiletypes.Entry, found bool)
	// GetUsdcDenom returns USDC denom
	GetUsdcDenom(ctx sdk.Context) (string, bool)
}

AssetProfileKeeper defines the expected interfaces

type BalanceBorrowed added in v0.15.0

type BalanceBorrowed struct {
	UsdAmount  github_com_cosmos_cosmos_sdk_types.Dec `` /* 128-byte string literal not displayed */
	Percentage github_com_cosmos_cosmos_sdk_types.Dec `protobuf:"bytes,2,opt,name=percentage,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Dec" json:"percentage"`
}

func (*BalanceBorrowed) Descriptor added in v0.15.0

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

func (*BalanceBorrowed) Marshal added in v0.15.0

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

func (*BalanceBorrowed) MarshalTo added in v0.15.0

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

func (*BalanceBorrowed) MarshalToSizedBuffer added in v0.15.0

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

func (*BalanceBorrowed) ProtoMessage added in v0.15.0

func (*BalanceBorrowed) ProtoMessage()

func (*BalanceBorrowed) Reset added in v0.15.0

func (m *BalanceBorrowed) Reset()

func (*BalanceBorrowed) Size added in v0.15.0

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

func (*BalanceBorrowed) String added in v0.15.0

func (m *BalanceBorrowed) String() string

func (*BalanceBorrowed) Unmarshal added in v0.15.0

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

func (*BalanceBorrowed) XXX_DiscardUnknown added in v0.15.0

func (m *BalanceBorrowed) XXX_DiscardUnknown()

func (*BalanceBorrowed) XXX_Marshal added in v0.15.0

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

func (*BalanceBorrowed) XXX_Merge added in v0.15.0

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

func (*BalanceBorrowed) XXX_Size added in v0.15.0

func (m *BalanceBorrowed) XXX_Size() int

func (*BalanceBorrowed) XXX_Unmarshal added in v0.15.0

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

type BankKeeper

type BankKeeper interface {
	GetBalance(ctx sdk.Context, addr sdk.AccAddress, denom string) sdk.Coin
	MintCoins(ctx sdk.Context, moduleName string, amt sdk.Coins) error
	BurnCoins(ctx sdk.Context, name string, amt sdk.Coins) error
	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 Debt

type Debt struct {
	Address              string                                 `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"`
	Borrowed             github_com_cosmos_cosmos_sdk_types.Int `protobuf:"bytes,2,opt,name=borrowed,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"borrowed"`
	InterestPaid         github_com_cosmos_cosmos_sdk_types.Int `` /* 137-byte string literal not displayed */
	InterestStacked      github_com_cosmos_cosmos_sdk_types.Int `` /* 146-byte string literal not displayed */
	BorrowTime           uint64                                 `protobuf:"varint,5,opt,name=borrow_time,json=borrowTime,proto3" json:"borrow_time,omitempty"`
	LastInterestCalcTime uint64                                 `` /* 126-byte string literal not displayed */
}

func (*Debt) Descriptor

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

func (*Debt) GetAddress

func (m *Debt) GetAddress() string

func (*Debt) GetBorrowTime

func (m *Debt) GetBorrowTime() uint64

func (*Debt) GetLastInterestCalcTime

func (m *Debt) GetLastInterestCalcTime() uint64

func (*Debt) Marshal

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

func (*Debt) MarshalTo

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

func (*Debt) MarshalToSizedBuffer

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

func (*Debt) ProtoMessage

func (*Debt) ProtoMessage()

func (*Debt) Reset

func (m *Debt) Reset()

func (*Debt) Size

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

func (*Debt) String

func (m *Debt) String() string

func (*Debt) Unmarshal

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

func (*Debt) XXX_DiscardUnknown

func (m *Debt) XXX_DiscardUnknown()

func (*Debt) XXX_Marshal

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

func (*Debt) XXX_Merge

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

func (*Debt) XXX_Size

func (m *Debt) XXX_Size() int

func (*Debt) XXX_Unmarshal

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

type GenesisState

type GenesisState struct {
	Params Params `protobuf:"bytes,1,opt,name=params,proto3" json:"params"`
}

GenesisState defines the stablestake 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) 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 MsgBond

type MsgBond struct {
	Creator string                                 `protobuf:"bytes,1,opt,name=creator,proto3" json:"creator,omitempty"`
	Amount  github_com_cosmos_cosmos_sdk_types.Int `protobuf:"bytes,2,opt,name=amount,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"amount"`
}

func NewMsgBond

func NewMsgBond(creator string, amount math.Int) *MsgBond

func (*MsgBond) Descriptor

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

func (*MsgBond) GetCreator

func (m *MsgBond) GetCreator() string

func (*MsgBond) GetSignBytes

func (msg *MsgBond) GetSignBytes() []byte

func (*MsgBond) GetSigners

func (msg *MsgBond) GetSigners() []sdk.AccAddress

func (*MsgBond) Marshal

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

func (*MsgBond) MarshalTo

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

func (*MsgBond) MarshalToSizedBuffer

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

func (*MsgBond) ProtoMessage

func (*MsgBond) ProtoMessage()

func (*MsgBond) Reset

func (m *MsgBond) Reset()

func (*MsgBond) Route

func (msg *MsgBond) Route() string

func (*MsgBond) Size

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

func (*MsgBond) String

func (m *MsgBond) String() string

func (*MsgBond) Type

func (msg *MsgBond) Type() string

func (*MsgBond) Unmarshal

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

func (*MsgBond) ValidateBasic

func (msg *MsgBond) ValidateBasic() error

func (*MsgBond) XXX_DiscardUnknown

func (m *MsgBond) XXX_DiscardUnknown()

func (*MsgBond) XXX_Marshal

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

func (*MsgBond) XXX_Merge

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

func (*MsgBond) XXX_Size

func (m *MsgBond) XXX_Size() int

func (*MsgBond) XXX_Unmarshal

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

type MsgBondResponse

type MsgBondResponse struct {
}

func (*MsgBondResponse) Descriptor

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

func (*MsgBondResponse) Marshal

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

func (*MsgBondResponse) MarshalTo

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

func (*MsgBondResponse) MarshalToSizedBuffer

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

func (*MsgBondResponse) ProtoMessage

func (*MsgBondResponse) ProtoMessage()

func (*MsgBondResponse) Reset

func (m *MsgBondResponse) Reset()

func (*MsgBondResponse) Size

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

func (*MsgBondResponse) String

func (m *MsgBondResponse) String() string

func (*MsgBondResponse) Unmarshal

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

func (*MsgBondResponse) XXX_DiscardUnknown

func (m *MsgBondResponse) XXX_DiscardUnknown()

func (*MsgBondResponse) XXX_Marshal

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

func (*MsgBondResponse) XXX_Merge

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

func (*MsgBondResponse) XXX_Size

func (m *MsgBondResponse) XXX_Size() int

func (*MsgBondResponse) XXX_Unmarshal

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

type MsgClient

type MsgClient interface {
	Bond(ctx context.Context, in *MsgBond, opts ...grpc.CallOption) (*MsgBondResponse, error)
	Unbond(ctx context.Context, in *MsgUnbond, opts ...grpc.CallOption) (*MsgUnbondResponse, 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 {
	Bond(context.Context, *MsgBond) (*MsgBondResponse, error)
	Unbond(context.Context, *MsgUnbond) (*MsgUnbondResponse, error)
}

MsgServer is the server API for Msg service.

type MsgUnbond

type MsgUnbond struct {
	Creator string                                 `protobuf:"bytes,1,opt,name=creator,proto3" json:"creator,omitempty"`
	Amount  github_com_cosmos_cosmos_sdk_types.Int `protobuf:"bytes,2,opt,name=amount,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"amount"`
}

func NewMsgUnbond

func NewMsgUnbond(creator string, amount math.Int) *MsgUnbond

func (*MsgUnbond) Descriptor

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

func (*MsgUnbond) GetCreator

func (m *MsgUnbond) GetCreator() string

func (*MsgUnbond) GetSignBytes

func (msg *MsgUnbond) GetSignBytes() []byte

func (*MsgUnbond) GetSigners

func (msg *MsgUnbond) GetSigners() []sdk.AccAddress

func (*MsgUnbond) Marshal

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

func (*MsgUnbond) MarshalTo

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

func (*MsgUnbond) MarshalToSizedBuffer

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

func (*MsgUnbond) ProtoMessage

func (*MsgUnbond) ProtoMessage()

func (*MsgUnbond) Reset

func (m *MsgUnbond) Reset()

func (*MsgUnbond) Route

func (msg *MsgUnbond) Route() string

func (*MsgUnbond) Size

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

func (*MsgUnbond) String

func (m *MsgUnbond) String() string

func (*MsgUnbond) Type

func (msg *MsgUnbond) Type() string

func (*MsgUnbond) Unmarshal

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

func (*MsgUnbond) ValidateBasic

func (msg *MsgUnbond) ValidateBasic() error

func (*MsgUnbond) XXX_DiscardUnknown

func (m *MsgUnbond) XXX_DiscardUnknown()

func (*MsgUnbond) XXX_Marshal

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

func (*MsgUnbond) XXX_Merge

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

func (*MsgUnbond) XXX_Size

func (m *MsgUnbond) XXX_Size() int

func (*MsgUnbond) XXX_Unmarshal

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

type MsgUnbondResponse

type MsgUnbondResponse struct {
}

func (*MsgUnbondResponse) Descriptor

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

func (*MsgUnbondResponse) Marshal

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

func (*MsgUnbondResponse) MarshalTo

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

func (*MsgUnbondResponse) MarshalToSizedBuffer

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

func (*MsgUnbondResponse) ProtoMessage

func (*MsgUnbondResponse) ProtoMessage()

func (*MsgUnbondResponse) Reset

func (m *MsgUnbondResponse) Reset()

func (*MsgUnbondResponse) Size

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

func (*MsgUnbondResponse) String

func (m *MsgUnbondResponse) String() string

func (*MsgUnbondResponse) Unmarshal

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

func (*MsgUnbondResponse) XXX_DiscardUnknown

func (m *MsgUnbondResponse) XXX_DiscardUnknown()

func (*MsgUnbondResponse) XXX_Marshal

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

func (*MsgUnbondResponse) XXX_Merge

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

func (*MsgUnbondResponse) XXX_Size

func (m *MsgUnbondResponse) XXX_Size() int

func (*MsgUnbondResponse) XXX_Unmarshal

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

type OracleKeeper added in v0.29.23

type OracleKeeper interface {
	GetAssetPrice(ctx sdk.Context, asset string) (oracletypes.Price, bool)
	GetAssetPriceFromDenom(ctx sdk.Context, denom string) sdk.Dec
	GetPriceFeeder(ctx sdk.Context, feeder string) (val oracletypes.PriceFeeder, found bool)
}

OracleKeeper defines the expected interface needed to retrieve price info

type Params

type Params struct {
	DepositDenom         string                                 `protobuf:"bytes,1,opt,name=deposit_denom,json=depositDenom,proto3" json:"deposit_denom,omitempty"`
	RedemptionRate       github_com_cosmos_cosmos_sdk_types.Dec `` /* 143-byte string literal not displayed */
	EpochLength          int64                                  `protobuf:"varint,3,opt,name=epoch_length,json=epochLength,proto3" json:"epoch_length,omitempty"`
	InterestRate         github_com_cosmos_cosmos_sdk_types.Dec `` /* 137-byte string literal not displayed */
	InterestRateMax      github_com_cosmos_cosmos_sdk_types.Dec `` /* 148-byte string literal not displayed */
	InterestRateMin      github_com_cosmos_cosmos_sdk_types.Dec `` /* 148-byte string literal not displayed */
	InterestRateIncrease github_com_cosmos_cosmos_sdk_types.Dec `` /* 163-byte string literal not displayed */
	InterestRateDecrease github_com_cosmos_cosmos_sdk_types.Dec `` /* 163-byte string literal not displayed */
	HealthGainFactor     github_com_cosmos_cosmos_sdk_types.Dec `` /* 151-byte string literal not displayed */
	TotalValue           github_com_cosmos_cosmos_sdk_types.Int `` /* 132-byte string literal not displayed */
}

Params defines the parameters for the module.

func DefaultParams

func DefaultParams() Params

DefaultParams returns a default set of parameters

func NewParams

func NewParams(
	depositDenom string,
	redemptionRate sdk.Dec,
	epochLength int64,
	interestRate sdk.Dec,
	interestRateMax sdk.Dec,
	interestRateMin sdk.Dec,
	interestRateIncrease sdk.Dec,
	interestRateDecrease sdk.Dec,
	healthGainFactor sdk.Dec,
	totalValue math.Int,
) Params

NewParams creates a new Params instance

func (*Params) Descriptor

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

func (*Params) GetDepositDenom

func (m *Params) GetDepositDenom() string

func (*Params) GetEpochLength

func (m *Params) GetEpochLength() int64

func (*Params) Marshal

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

func (*Params) MarshalTo

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

func (*Params) MarshalToSizedBuffer

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

func (*Params) ParamSetPairs

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

ParamSetPairs get the 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 (p Params) String() string

String implements the Stringer interface.

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 QueryBorrowRatioRequest added in v0.15.0

type QueryBorrowRatioRequest struct {
}

QueryBorrowRatioRequest is request type for the Query/BorrowRatio RPC method.

func (*QueryBorrowRatioRequest) Descriptor added in v0.15.0

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

func (*QueryBorrowRatioRequest) Marshal added in v0.15.0

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

func (*QueryBorrowRatioRequest) MarshalTo added in v0.15.0

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

func (*QueryBorrowRatioRequest) MarshalToSizedBuffer added in v0.15.0

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

func (*QueryBorrowRatioRequest) ProtoMessage added in v0.15.0

func (*QueryBorrowRatioRequest) ProtoMessage()

func (*QueryBorrowRatioRequest) Reset added in v0.15.0

func (m *QueryBorrowRatioRequest) Reset()

func (*QueryBorrowRatioRequest) Size added in v0.15.0

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

func (*QueryBorrowRatioRequest) String added in v0.15.0

func (m *QueryBorrowRatioRequest) String() string

func (*QueryBorrowRatioRequest) Unmarshal added in v0.15.0

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

func (*QueryBorrowRatioRequest) XXX_DiscardUnknown added in v0.15.0

func (m *QueryBorrowRatioRequest) XXX_DiscardUnknown()

func (*QueryBorrowRatioRequest) XXX_Marshal added in v0.15.0

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

func (*QueryBorrowRatioRequest) XXX_Merge added in v0.15.0

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

func (*QueryBorrowRatioRequest) XXX_Size added in v0.15.0

func (m *QueryBorrowRatioRequest) XXX_Size() int

func (*QueryBorrowRatioRequest) XXX_Unmarshal added in v0.15.0

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

type QueryBorrowRatioResponse added in v0.15.0

type QueryBorrowRatioResponse struct {
	TotalDeposit github_com_cosmos_cosmos_sdk_types.Int `` /* 137-byte string literal not displayed */
	TotalBorrow  github_com_cosmos_cosmos_sdk_types.Int `` /* 134-byte string literal not displayed */
	BorrowRatio  github_com_cosmos_cosmos_sdk_types.Dec `` /* 134-byte string literal not displayed */
}

QueryBorrowRatioResponse is response type for the Query/BorrowRatio RPC method.

func (*QueryBorrowRatioResponse) Descriptor added in v0.15.0

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

func (*QueryBorrowRatioResponse) Marshal added in v0.15.0

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

func (*QueryBorrowRatioResponse) MarshalTo added in v0.15.0

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

func (*QueryBorrowRatioResponse) MarshalToSizedBuffer added in v0.15.0

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

func (*QueryBorrowRatioResponse) ProtoMessage added in v0.15.0

func (*QueryBorrowRatioResponse) ProtoMessage()

func (*QueryBorrowRatioResponse) Reset added in v0.15.0

func (m *QueryBorrowRatioResponse) Reset()

func (*QueryBorrowRatioResponse) Size added in v0.15.0

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

func (*QueryBorrowRatioResponse) String added in v0.15.0

func (m *QueryBorrowRatioResponse) String() string

func (*QueryBorrowRatioResponse) Unmarshal added in v0.15.0

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

func (*QueryBorrowRatioResponse) XXX_DiscardUnknown added in v0.15.0

func (m *QueryBorrowRatioResponse) XXX_DiscardUnknown()

func (*QueryBorrowRatioResponse) XXX_Marshal added in v0.15.0

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

func (*QueryBorrowRatioResponse) XXX_Merge added in v0.15.0

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

func (*QueryBorrowRatioResponse) XXX_Size added in v0.15.0

func (m *QueryBorrowRatioResponse) XXX_Size() int

func (*QueryBorrowRatioResponse) XXX_Unmarshal added in v0.15.0

func (m *QueryBorrowRatioResponse) 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)
	// BorrowRatio queries the borrow ratio compared to total deposit
	BorrowRatio(ctx context.Context, in *QueryBorrowRatioRequest, opts ...grpc.CallOption) (*QueryBorrowRatioResponse, 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 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)
	// BorrowRatio queries the borrow ratio compared to total deposit
	BorrowRatio(context.Context, *QueryBorrowRatioRequest) (*QueryBorrowRatioResponse, error)
}

QueryServer is the server API for Query service.

type StableStakeHooks added in v0.31.0

type StableStakeHooks interface {
	AfterBond(ctx sdk.Context, sender string, shareAmount math.Int) error
	AfterUnbond(ctx sdk.Context, sender string, shareAmount math.Int) error
}

StableStakeHooks event hooks for stablestake processing

type UnimplementedMsgServer

type UnimplementedMsgServer struct {
}

UnimplementedMsgServer can be embedded to have forward compatible implementations.

func (*UnimplementedMsgServer) Bond

func (*UnimplementedMsgServer) Unbond

type UnimplementedQueryServer

type UnimplementedQueryServer struct {
}

UnimplementedQueryServer can be embedded to have forward compatible implementations.

func (*UnimplementedQueryServer) BorrowRatio added in v0.15.0

func (*UnimplementedQueryServer) Params

Jump to

Keyboard shortcuts

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