Documentation ¶
Overview ¶
Package types is a reverse proxy.
It translates gRPC into RESTful JSON APIs.
Index ¶
- Constants
- Variables
- func GetShareDenom() string
- func KeyPrefix(p string) []byte
- func ParamKeyTable() paramtypes.KeyTable
- func PoolAddress() sdk.AccAddress
- func RegisterCodec(cdc *codec.LegacyAmino)
- func RegisterInterfaces(registry cdctypes.InterfaceRegistry)
- func RegisterMsgServer(s grpc1.Server, srv MsgServer)
- func RegisterQueryHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
- func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, client QueryClient) error
- func RegisterQueryHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, ...) (err error)
- func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, server QueryServer) error
- func RegisterQueryServer(s grpc1.Server, srv QueryServer)
- type AccountKeeper
- type AssetProfileKeeper
- type BalanceBorrowed
- func (*BalanceBorrowed) Descriptor() ([]byte, []int)
- func (m *BalanceBorrowed) Marshal() (dAtA []byte, err error)
- func (m *BalanceBorrowed) MarshalTo(dAtA []byte) (int, error)
- func (m *BalanceBorrowed) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*BalanceBorrowed) ProtoMessage()
- func (m *BalanceBorrowed) Reset()
- func (m *BalanceBorrowed) Size() (n int)
- func (m *BalanceBorrowed) String() string
- func (m *BalanceBorrowed) Unmarshal(dAtA []byte) error
- func (m *BalanceBorrowed) XXX_DiscardUnknown()
- func (m *BalanceBorrowed) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *BalanceBorrowed) XXX_Merge(src proto.Message)
- func (m *BalanceBorrowed) XXX_Size() int
- func (m *BalanceBorrowed) XXX_Unmarshal(b []byte) error
- type BankKeeper
- type Debt
- func (*Debt) Descriptor() ([]byte, []int)
- func (m *Debt) GetAddress() string
- func (m *Debt) GetBorrowTime() uint64
- func (m *Debt) GetLastInterestCalcTime() uint64
- func (m *Debt) Marshal() (dAtA []byte, err error)
- func (m *Debt) MarshalTo(dAtA []byte) (int, error)
- func (m *Debt) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*Debt) ProtoMessage()
- func (m *Debt) Reset()
- func (m *Debt) Size() (n int)
- func (m *Debt) String() string
- func (m *Debt) Unmarshal(dAtA []byte) error
- func (m *Debt) XXX_DiscardUnknown()
- func (m *Debt) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Debt) XXX_Merge(src proto.Message)
- func (m *Debt) XXX_Size() int
- func (m *Debt) XXX_Unmarshal(b []byte) error
- type GenesisState
- func (*GenesisState) Descriptor() ([]byte, []int)
- func (m *GenesisState) GetParams() Params
- func (m *GenesisState) Marshal() (dAtA []byte, err error)
- func (m *GenesisState) MarshalTo(dAtA []byte) (int, error)
- func (m *GenesisState) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*GenesisState) ProtoMessage()
- func (m *GenesisState) Reset()
- func (m *GenesisState) Size() (n int)
- func (m *GenesisState) String() string
- func (m *GenesisState) Unmarshal(dAtA []byte) error
- func (gs GenesisState) Validate() error
- func (m *GenesisState) XXX_DiscardUnknown()
- func (m *GenesisState) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *GenesisState) XXX_Merge(src proto.Message)
- func (m *GenesisState) XXX_Size() int
- func (m *GenesisState) XXX_Unmarshal(b []byte) error
- type MsgBond
- func (*MsgBond) Descriptor() ([]byte, []int)
- func (m *MsgBond) GetCreator() string
- func (msg *MsgBond) GetSignBytes() []byte
- func (msg *MsgBond) GetSigners() []sdk.AccAddress
- func (m *MsgBond) Marshal() (dAtA []byte, err error)
- func (m *MsgBond) MarshalTo(dAtA []byte) (int, error)
- func (m *MsgBond) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*MsgBond) ProtoMessage()
- func (m *MsgBond) Reset()
- func (msg *MsgBond) Route() string
- func (m *MsgBond) Size() (n int)
- func (m *MsgBond) String() string
- func (msg *MsgBond) Type() string
- func (m *MsgBond) Unmarshal(dAtA []byte) error
- func (msg *MsgBond) ValidateBasic() error
- func (m *MsgBond) XXX_DiscardUnknown()
- func (m *MsgBond) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *MsgBond) XXX_Merge(src proto.Message)
- func (m *MsgBond) XXX_Size() int
- func (m *MsgBond) XXX_Unmarshal(b []byte) error
- type MsgBondResponse
- func (*MsgBondResponse) Descriptor() ([]byte, []int)
- func (m *MsgBondResponse) Marshal() (dAtA []byte, err error)
- func (m *MsgBondResponse) MarshalTo(dAtA []byte) (int, error)
- func (m *MsgBondResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*MsgBondResponse) ProtoMessage()
- func (m *MsgBondResponse) Reset()
- func (m *MsgBondResponse) Size() (n int)
- func (m *MsgBondResponse) String() string
- func (m *MsgBondResponse) Unmarshal(dAtA []byte) error
- func (m *MsgBondResponse) XXX_DiscardUnknown()
- func (m *MsgBondResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *MsgBondResponse) XXX_Merge(src proto.Message)
- func (m *MsgBondResponse) XXX_Size() int
- func (m *MsgBondResponse) XXX_Unmarshal(b []byte) error
- type MsgClient
- type MsgServer
- type MsgUnbond
- func (*MsgUnbond) Descriptor() ([]byte, []int)
- func (m *MsgUnbond) GetCreator() string
- func (msg *MsgUnbond) GetSignBytes() []byte
- func (msg *MsgUnbond) GetSigners() []sdk.AccAddress
- func (m *MsgUnbond) Marshal() (dAtA []byte, err error)
- func (m *MsgUnbond) MarshalTo(dAtA []byte) (int, error)
- func (m *MsgUnbond) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*MsgUnbond) ProtoMessage()
- func (m *MsgUnbond) Reset()
- func (msg *MsgUnbond) Route() string
- func (m *MsgUnbond) Size() (n int)
- func (m *MsgUnbond) String() string
- func (msg *MsgUnbond) Type() string
- func (m *MsgUnbond) Unmarshal(dAtA []byte) error
- func (msg *MsgUnbond) ValidateBasic() error
- func (m *MsgUnbond) XXX_DiscardUnknown()
- func (m *MsgUnbond) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *MsgUnbond) XXX_Merge(src proto.Message)
- func (m *MsgUnbond) XXX_Size() int
- func (m *MsgUnbond) XXX_Unmarshal(b []byte) error
- type MsgUnbondResponse
- func (*MsgUnbondResponse) Descriptor() ([]byte, []int)
- func (m *MsgUnbondResponse) Marshal() (dAtA []byte, err error)
- func (m *MsgUnbondResponse) MarshalTo(dAtA []byte) (int, error)
- func (m *MsgUnbondResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*MsgUnbondResponse) ProtoMessage()
- func (m *MsgUnbondResponse) Reset()
- func (m *MsgUnbondResponse) Size() (n int)
- func (m *MsgUnbondResponse) String() string
- func (m *MsgUnbondResponse) Unmarshal(dAtA []byte) error
- func (m *MsgUnbondResponse) XXX_DiscardUnknown()
- func (m *MsgUnbondResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *MsgUnbondResponse) XXX_Merge(src proto.Message)
- func (m *MsgUnbondResponse) XXX_Size() int
- func (m *MsgUnbondResponse) XXX_Unmarshal(b []byte) error
- type OracleKeeper
- type Params
- func (*Params) Descriptor() ([]byte, []int)
- func (m *Params) GetDepositDenom() string
- func (m *Params) GetEpochLength() int64
- func (m *Params) Marshal() (dAtA []byte, err error)
- func (m *Params) MarshalTo(dAtA []byte) (int, error)
- func (m *Params) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (p *Params) ParamSetPairs() paramtypes.ParamSetPairs
- func (*Params) ProtoMessage()
- func (m *Params) Reset()
- func (m *Params) Size() (n int)
- func (p Params) String() string
- func (m *Params) Unmarshal(dAtA []byte) error
- func (p Params) Validate() error
- func (m *Params) XXX_DiscardUnknown()
- func (m *Params) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Params) XXX_Merge(src proto.Message)
- func (m *Params) XXX_Size() int
- func (m *Params) XXX_Unmarshal(b []byte) error
- type QueryBorrowRatioRequest
- func (*QueryBorrowRatioRequest) Descriptor() ([]byte, []int)
- func (m *QueryBorrowRatioRequest) Marshal() (dAtA []byte, err error)
- func (m *QueryBorrowRatioRequest) MarshalTo(dAtA []byte) (int, error)
- func (m *QueryBorrowRatioRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*QueryBorrowRatioRequest) ProtoMessage()
- func (m *QueryBorrowRatioRequest) Reset()
- func (m *QueryBorrowRatioRequest) Size() (n int)
- func (m *QueryBorrowRatioRequest) String() string
- func (m *QueryBorrowRatioRequest) Unmarshal(dAtA []byte) error
- func (m *QueryBorrowRatioRequest) XXX_DiscardUnknown()
- func (m *QueryBorrowRatioRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *QueryBorrowRatioRequest) XXX_Merge(src proto.Message)
- func (m *QueryBorrowRatioRequest) XXX_Size() int
- func (m *QueryBorrowRatioRequest) XXX_Unmarshal(b []byte) error
- type QueryBorrowRatioResponse
- func (*QueryBorrowRatioResponse) Descriptor() ([]byte, []int)
- func (m *QueryBorrowRatioResponse) Marshal() (dAtA []byte, err error)
- func (m *QueryBorrowRatioResponse) MarshalTo(dAtA []byte) (int, error)
- func (m *QueryBorrowRatioResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*QueryBorrowRatioResponse) ProtoMessage()
- func (m *QueryBorrowRatioResponse) Reset()
- func (m *QueryBorrowRatioResponse) Size() (n int)
- func (m *QueryBorrowRatioResponse) String() string
- func (m *QueryBorrowRatioResponse) Unmarshal(dAtA []byte) error
- func (m *QueryBorrowRatioResponse) XXX_DiscardUnknown()
- func (m *QueryBorrowRatioResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *QueryBorrowRatioResponse) XXX_Merge(src proto.Message)
- func (m *QueryBorrowRatioResponse) XXX_Size() int
- func (m *QueryBorrowRatioResponse) XXX_Unmarshal(b []byte) error
- type QueryClient
- type QueryParamsRequest
- func (*QueryParamsRequest) Descriptor() ([]byte, []int)
- func (m *QueryParamsRequest) Marshal() (dAtA []byte, err error)
- func (m *QueryParamsRequest) MarshalTo(dAtA []byte) (int, error)
- func (m *QueryParamsRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*QueryParamsRequest) ProtoMessage()
- func (m *QueryParamsRequest) Reset()
- func (m *QueryParamsRequest) Size() (n int)
- func (m *QueryParamsRequest) String() string
- func (m *QueryParamsRequest) Unmarshal(dAtA []byte) error
- func (m *QueryParamsRequest) XXX_DiscardUnknown()
- func (m *QueryParamsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *QueryParamsRequest) XXX_Merge(src proto.Message)
- func (m *QueryParamsRequest) XXX_Size() int
- func (m *QueryParamsRequest) XXX_Unmarshal(b []byte) error
- type QueryParamsResponse
- func (*QueryParamsResponse) Descriptor() ([]byte, []int)
- func (m *QueryParamsResponse) GetParams() Params
- func (m *QueryParamsResponse) Marshal() (dAtA []byte, err error)
- func (m *QueryParamsResponse) MarshalTo(dAtA []byte) (int, error)
- func (m *QueryParamsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*QueryParamsResponse) ProtoMessage()
- func (m *QueryParamsResponse) Reset()
- func (m *QueryParamsResponse) Size() (n int)
- func (m *QueryParamsResponse) String() string
- func (m *QueryParamsResponse) Unmarshal(dAtA []byte) error
- func (m *QueryParamsResponse) XXX_DiscardUnknown()
- func (m *QueryParamsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *QueryParamsResponse) XXX_Merge(src proto.Message)
- func (m *QueryParamsResponse) XXX_Size() int
- func (m *QueryParamsResponse) XXX_Unmarshal(b []byte) error
- type QueryServer
- type StableStakeHooks
- type UnimplementedMsgServer
- type UnimplementedQueryServer
Constants ¶
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" )
const DefaultIndex uint64 = 1
DefaultIndex is the default global index
const PoolId = math.MaxInt16
const TypeMsgBond = "stake"
const TypeMsgUnbond = "unbond"
Variables ¶
var ( Amino = codec.NewLegacyAmino() ModuleCdc = codec.NewProtoCodec(cdctypes.NewInterfaceRegistry()) )
var ( ErrInvalidLengthDebt = fmt.Errorf("proto: negative length found during unmarshaling") ErrIntOverflowDebt = fmt.Errorf("proto: integer overflow") ErrUnexpectedEndOfGroupDebt = fmt.Errorf("proto: unexpected end of group") )
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") ErrNegativeBorrowed = errorsmod.Register(ModuleName, 4, "negative borrowed amount") ErrMaxBorrowAmount = errorsmod.Register(ModuleName, 5, "cannot borrow more than 90% of total stablestake pool.") )
x/stablestake module sentinel errors
var ( ErrInvalidLengthGenesis = fmt.Errorf("proto: negative length found during unmarshaling") ErrIntOverflowGenesis = fmt.Errorf("proto: integer overflow") ErrUnexpectedEndOfGroupGenesis = fmt.Errorf("proto: unexpected end of group") )
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
var ( ErrInvalidLengthParams = fmt.Errorf("proto: negative length found during unmarshaling") ErrIntOverflowParams = fmt.Errorf("proto: integer overflow") ErrUnexpectedEndOfGroupParams = fmt.Errorf("proto: unexpected end of group") )
var ( ErrInvalidLengthQuery = fmt.Errorf("proto: negative length found during unmarshaling") ErrIntOverflowQuery = fmt.Errorf("proto: integer overflow") ErrUnexpectedEndOfGroupQuery = fmt.Errorf("proto: unexpected end of group") )
var ( ErrInvalidLengthTx = fmt.Errorf("proto: negative length found during unmarshaling") ErrIntOverflowTx = fmt.Errorf("proto: integer overflow") ErrUnexpectedEndOfGroupTx = fmt.Errorf("proto: unexpected end of group") )
var ( ErrInvalidLengthTypes = fmt.Errorf("proto: negative length found during unmarshaling") ErrIntOverflowTypes = fmt.Errorf("proto: integer overflow") ErrUnexpectedEndOfGroupTypes = fmt.Errorf("proto: unexpected end of group") )
var DebtPrefixKey = []byte{0x01}
Functions ¶
func GetShareDenom ¶
func GetShareDenom() string
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 RegisterQueryHandler ¶
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 ¶
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) GetAddress ¶
func (*Debt) GetBorrowTime ¶
func (*Debt) GetLastInterestCalcTime ¶
func (*Debt) ProtoMessage ¶
func (*Debt) ProtoMessage()
func (*Debt) XXX_DiscardUnknown ¶
func (m *Debt) XXX_DiscardUnknown()
func (*Debt) XXX_Unmarshal ¶
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) 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 (*MsgBond) Descriptor ¶
func (*MsgBond) GetCreator ¶
func (*MsgBond) GetSignBytes ¶
func (*MsgBond) GetSigners ¶
func (msg *MsgBond) GetSigners() []sdk.AccAddress
func (*MsgBond) MarshalToSizedBuffer ¶
func (*MsgBond) ProtoMessage ¶
func (*MsgBond) ProtoMessage()
func (*MsgBond) ValidateBasic ¶
func (*MsgBond) XXX_DiscardUnknown ¶
func (m *MsgBond) XXX_DiscardUnknown()
func (*MsgBond) XXX_Marshal ¶
func (*MsgBond) XXX_Unmarshal ¶
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) 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 (*MsgUnbond) Descriptor ¶
func (*MsgUnbond) GetCreator ¶
func (*MsgUnbond) GetSignBytes ¶
func (*MsgUnbond) GetSigners ¶
func (msg *MsgUnbond) GetSigners() []sdk.AccAddress
func (*MsgUnbond) MarshalToSizedBuffer ¶
func (*MsgUnbond) ProtoMessage ¶
func (*MsgUnbond) ProtoMessage()
func (*MsgUnbond) ValidateBasic ¶
func (*MsgUnbond) XXX_DiscardUnknown ¶
func (m *MsgUnbond) XXX_DiscardUnknown()
func (*MsgUnbond) XXX_Marshal ¶
func (*MsgUnbond) XXX_Unmarshal ¶
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 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) GetDepositDenom ¶
func (*Params) GetEpochLength ¶
func (*Params) MarshalToSizedBuffer ¶
func (*Params) ParamSetPairs ¶
func (p *Params) ParamSetPairs() paramtypes.ParamSetPairs
ParamSetPairs get the params.ParamSet
func (*Params) ProtoMessage ¶
func (*Params) ProtoMessage()
func (*Params) XXX_DiscardUnknown ¶
func (m *Params) XXX_DiscardUnknown()
func (*Params) XXX_Marshal ¶
func (*Params) XXX_Unmarshal ¶
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 AfterUpdateInterestStacked(ctx sdk.Context, address string, old math.Int, new 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) Bond(ctx context.Context, req *MsgBond) (*MsgBondResponse, error)
func (*UnimplementedMsgServer) Unbond ¶
func (*UnimplementedMsgServer) Unbond(ctx context.Context, req *MsgUnbond) (*MsgUnbondResponse, error)
type UnimplementedQueryServer ¶
type UnimplementedQueryServer struct { }
UnimplementedQueryServer can be embedded to have forward compatible implementations.
func (*UnimplementedQueryServer) BorrowRatio ¶ added in v0.15.0
func (*UnimplementedQueryServer) BorrowRatio(ctx context.Context, req *QueryBorrowRatioRequest) (*QueryBorrowRatioResponse, error)
func (*UnimplementedQueryServer) Params ¶
func (*UnimplementedQueryServer) Params(ctx context.Context, req *QueryParamsRequest) (*QueryParamsResponse, error)