Documentation ¶
Overview ¶
Package types is a reverse proxy.
It translates gRPC into RESTful JSON APIs.
Index ¶
- Constants
- Variables
- func GetDebtKey(owner sdk.AccAddress) []byte
- func GetLegacyDebtKey(owner string) []byte
- func GetShareDenom() string
- func KeyPrefix(p string) []byte
- func PoolAddress() sdk.AccAddress
- func RegisterInterfaces(registry cdctypes.InterfaceRegistry)
- func RegisterLegacyAminoCodec(cdc *codec.LegacyAmino)
- 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) GetLastInterestCalcBlock() uint64
- func (m *Debt) GetLastInterestCalcTime() uint64
- func (debt Debt) GetOwnerAccount() sdk.AccAddress
- func (debt Debt) GetTotalLiablities() sdkmath.Int
- 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) GetDebtList() []Debt
- func (m *GenesisState) GetInterestList() []InterestBlock
- 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 InterestBlock
- func (*InterestBlock) Descriptor() ([]byte, []int)
- func (m *InterestBlock) GetBlockHeight() uint64
- func (m *InterestBlock) GetBlockTime() int64
- func (m *InterestBlock) Marshal() (dAtA []byte, err error)
- func (m *InterestBlock) MarshalTo(dAtA []byte) (int, error)
- func (m *InterestBlock) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*InterestBlock) ProtoMessage()
- func (m *InterestBlock) Reset()
- func (m *InterestBlock) Size() (n int)
- func (m *InterestBlock) String() string
- func (m *InterestBlock) Unmarshal(dAtA []byte) error
- func (m *InterestBlock) XXX_DiscardUnknown()
- func (m *InterestBlock) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *InterestBlock) XXX_Merge(src proto.Message)
- func (m *InterestBlock) XXX_Size() int
- func (m *InterestBlock) XXX_Unmarshal(b []byte) error
- type LegacyInterestBlock
- func (*LegacyInterestBlock) Descriptor() ([]byte, []int)
- func (m *LegacyInterestBlock) GetBlockTime() int64
- func (m *LegacyInterestBlock) Marshal() (dAtA []byte, err error)
- func (m *LegacyInterestBlock) MarshalTo(dAtA []byte) (int, error)
- func (m *LegacyInterestBlock) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*LegacyInterestBlock) ProtoMessage()
- func (m *LegacyInterestBlock) Reset()
- func (m *LegacyInterestBlock) Size() (n int)
- func (m *LegacyInterestBlock) String() string
- func (m *LegacyInterestBlock) Unmarshal(dAtA []byte) error
- func (m *LegacyInterestBlock) XXX_DiscardUnknown()
- func (m *LegacyInterestBlock) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *LegacyInterestBlock) XXX_Merge(src proto.Message)
- func (m *LegacyInterestBlock) XXX_Size() int
- func (m *LegacyInterestBlock) XXX_Unmarshal(b []byte) error
- type LegacyParams
- func (*LegacyParams) Descriptor() ([]byte, []int)
- func (m *LegacyParams) GetDepositDenom() string
- func (m *LegacyParams) GetEpochLength() int64
- func (m *LegacyParams) Marshal() (dAtA []byte, err error)
- func (m *LegacyParams) MarshalTo(dAtA []byte) (int, error)
- func (m *LegacyParams) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*LegacyParams) ProtoMessage()
- func (m *LegacyParams) Reset()
- func (m *LegacyParams) Size() (n int)
- func (p LegacyParams) String() string
- func (m *LegacyParams) Unmarshal(dAtA []byte) error
- func (m *LegacyParams) XXX_DiscardUnknown()
- func (m *LegacyParams) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *LegacyParams) XXX_Merge(src proto.Message)
- func (m *LegacyParams) XXX_Size() int
- func (m *LegacyParams) XXX_Unmarshal(b []byte) error
- type MsgBond
- func (*MsgBond) Descriptor() ([]byte, []int)
- func (m *MsgBond) GetCreator() string
- 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 (m *MsgBond) Size() (n int)
- func (m *MsgBond) String() 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 (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 (m *MsgUnbond) Size() (n int)
- func (m *MsgUnbond) String() 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 MsgUpdateParams
- func (*MsgUpdateParams) Descriptor() ([]byte, []int)
- func (m *MsgUpdateParams) GetAuthority() string
- func (m *MsgUpdateParams) GetParams() *Params
- func (m *MsgUpdateParams) Marshal() (dAtA []byte, err error)
- func (m *MsgUpdateParams) MarshalTo(dAtA []byte) (int, error)
- func (m *MsgUpdateParams) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*MsgUpdateParams) ProtoMessage()
- func (m *MsgUpdateParams) Reset()
- func (m *MsgUpdateParams) Size() (n int)
- func (m *MsgUpdateParams) String() string
- func (m *MsgUpdateParams) Unmarshal(dAtA []byte) error
- func (msg *MsgUpdateParams) ValidateBasic() error
- func (m *MsgUpdateParams) XXX_DiscardUnknown()
- func (m *MsgUpdateParams) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *MsgUpdateParams) XXX_Merge(src proto.Message)
- func (m *MsgUpdateParams) XXX_Size() int
- func (m *MsgUpdateParams) XXX_Unmarshal(b []byte) error
- type MsgUpdateParamsResponse
- func (*MsgUpdateParamsResponse) Descriptor() ([]byte, []int)
- func (m *MsgUpdateParamsResponse) Marshal() (dAtA []byte, err error)
- func (m *MsgUpdateParamsResponse) MarshalTo(dAtA []byte) (int, error)
- func (m *MsgUpdateParamsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*MsgUpdateParamsResponse) ProtoMessage()
- func (m *MsgUpdateParamsResponse) Reset()
- func (m *MsgUpdateParamsResponse) Size() (n int)
- func (m *MsgUpdateParamsResponse) String() string
- func (m *MsgUpdateParamsResponse) Unmarshal(dAtA []byte) error
- func (m *MsgUpdateParamsResponse) XXX_DiscardUnknown()
- func (m *MsgUpdateParamsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *MsgUpdateParamsResponse) XXX_Merge(src proto.Message)
- func (m *MsgUpdateParamsResponse) XXX_Size() int
- func (m *MsgUpdateParamsResponse) 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 (*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
- func (*UnimplementedMsgServer) Bond(ctx context.Context, req *MsgBond) (*MsgBondResponse, error)
- func (*UnimplementedMsgServer) Unbond(ctx context.Context, req *MsgUnbond) (*MsgUnbondResponse, error)
- func (*UnimplementedMsgServer) UpdateParams(ctx context.Context, req *MsgUpdateParams) (*MsgUpdateParamsResponse, error)
- 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
Variables ¶
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.") ErrInvalidParams = errorsmod.Register(ModuleName, 6, "invalid params") )
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 ( DebtPrefixKey = []byte{0x01} InterestPrefixKey = []byte{0x02} ParamKeyPrefix = []byte{0x03} )
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") )
Functions ¶
func GetDebtKey ¶ added in v0.45.0
func GetDebtKey(owner sdk.AccAddress) []byte
func GetLegacyDebtKey ¶ added in v0.45.0
func GetShareDenom ¶
func GetShareDenom() string
func PoolAddress ¶ added in v0.17.0
func PoolAddress() sdk.AccAddress
func RegisterInterfaces ¶
func RegisterInterfaces(registry cdctypes.InterfaceRegistry)
func RegisterLegacyAminoCodec ¶ added in v0.50.0
func RegisterLegacyAminoCodec(cdc *codec.LegacyAmino)
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 cosmossdk_io_math.LegacyDec `protobuf:"bytes,1,opt,name=usd_amount,json=usdAmount,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"usd_amount"` Percentage cosmossdk_io_math.LegacyDec `protobuf:"bytes,2,opt,name=percentage,proto3,customtype=cosmossdk.io/math.LegacyDec" 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 context.Context, addr sdk.AccAddress, denom string) sdk.Coin GetSupply(ctx context.Context, denom string) sdk.Coin MintCoins(ctx context.Context, moduleName string, amt sdk.Coins) error BurnCoins(ctx context.Context, name string, amt sdk.Coins) error 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 Debt ¶
type Debt struct { Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"` Borrowed cosmossdk_io_math.Int `protobuf:"bytes,2,opt,name=borrowed,proto3,customtype=cosmossdk.io/math.Int" json:"borrowed"` InterestPaid cosmossdk_io_math.Int `protobuf:"bytes,3,opt,name=interest_paid,json=interestPaid,proto3,customtype=cosmossdk.io/math.Int" json:"interest_paid"` InterestStacked cosmossdk_io_math.Int `` /* 129-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 */ LastInterestCalcBlock uint64 `` /* 129-byte string literal not displayed */ }
func (*Debt) Descriptor ¶
func (*Debt) GetAddress ¶
func (*Debt) GetBorrowTime ¶
func (*Debt) GetLastInterestCalcBlock ¶ added in v0.42.0
func (*Debt) GetLastInterestCalcTime ¶
func (Debt) GetOwnerAccount ¶ added in v0.45.0
func (debt Debt) GetOwnerAccount() sdk.AccAddress
func (Debt) GetTotalLiablities ¶ added in v0.42.0
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"` DebtList []Debt `protobuf:"bytes,2,rep,name=debt_list,json=debtList,proto3" json:"debt_list"` InterestList []InterestBlock `protobuf:"bytes,3,rep,name=interest_list,json=interestList,proto3" json:"interest_list"` }
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) GetDebtList ¶ added in v0.45.0
func (m *GenesisState) GetDebtList() []Debt
func (*GenesisState) GetInterestList ¶ added in v0.45.0
func (m *GenesisState) GetInterestList() []InterestBlock
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 InterestBlock ¶ added in v0.42.0
type InterestBlock struct { InterestRate cosmossdk_io_math.LegacyDec `` /* 126-byte string literal not displayed */ BlockTime int64 `protobuf:"varint,2,opt,name=block_time,json=blockTime,proto3" json:"block_time,omitempty"` BlockHeight uint64 `protobuf:"varint,3,opt,name=block_height,json=blockHeight,proto3" json:"block_height,omitempty"` }
func (*InterestBlock) Descriptor ¶ added in v0.42.0
func (*InterestBlock) Descriptor() ([]byte, []int)
func (*InterestBlock) GetBlockHeight ¶ added in v0.45.0
func (m *InterestBlock) GetBlockHeight() uint64
func (*InterestBlock) GetBlockTime ¶ added in v0.42.0
func (m *InterestBlock) GetBlockTime() int64
func (*InterestBlock) Marshal ¶ added in v0.42.0
func (m *InterestBlock) Marshal() (dAtA []byte, err error)
func (*InterestBlock) MarshalTo ¶ added in v0.42.0
func (m *InterestBlock) MarshalTo(dAtA []byte) (int, error)
func (*InterestBlock) MarshalToSizedBuffer ¶ added in v0.42.0
func (m *InterestBlock) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*InterestBlock) ProtoMessage ¶ added in v0.42.0
func (*InterestBlock) ProtoMessage()
func (*InterestBlock) Reset ¶ added in v0.42.0
func (m *InterestBlock) Reset()
func (*InterestBlock) Size ¶ added in v0.42.0
func (m *InterestBlock) Size() (n int)
func (*InterestBlock) String ¶ added in v0.42.0
func (m *InterestBlock) String() string
func (*InterestBlock) Unmarshal ¶ added in v0.42.0
func (m *InterestBlock) Unmarshal(dAtA []byte) error
func (*InterestBlock) XXX_DiscardUnknown ¶ added in v0.42.0
func (m *InterestBlock) XXX_DiscardUnknown()
func (*InterestBlock) XXX_Marshal ¶ added in v0.42.0
func (m *InterestBlock) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*InterestBlock) XXX_Merge ¶ added in v0.42.0
func (m *InterestBlock) XXX_Merge(src proto.Message)
func (*InterestBlock) XXX_Size ¶ added in v0.42.0
func (m *InterestBlock) XXX_Size() int
func (*InterestBlock) XXX_Unmarshal ¶ added in v0.42.0
func (m *InterestBlock) XXX_Unmarshal(b []byte) error
type LegacyInterestBlock ¶ added in v0.45.0
type LegacyInterestBlock struct { InterestRate cosmossdk_io_math.LegacyDec `` /* 126-byte string literal not displayed */ BlockTime int64 `protobuf:"varint,2,opt,name=block_time,json=blockTime,proto3" json:"block_time,omitempty"` }
func (*LegacyInterestBlock) Descriptor ¶ added in v0.45.0
func (*LegacyInterestBlock) Descriptor() ([]byte, []int)
func (*LegacyInterestBlock) GetBlockTime ¶ added in v0.45.0
func (m *LegacyInterestBlock) GetBlockTime() int64
func (*LegacyInterestBlock) Marshal ¶ added in v0.45.0
func (m *LegacyInterestBlock) Marshal() (dAtA []byte, err error)
func (*LegacyInterestBlock) MarshalTo ¶ added in v0.45.0
func (m *LegacyInterestBlock) MarshalTo(dAtA []byte) (int, error)
func (*LegacyInterestBlock) MarshalToSizedBuffer ¶ added in v0.45.0
func (m *LegacyInterestBlock) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*LegacyInterestBlock) ProtoMessage ¶ added in v0.45.0
func (*LegacyInterestBlock) ProtoMessage()
func (*LegacyInterestBlock) Reset ¶ added in v0.45.0
func (m *LegacyInterestBlock) Reset()
func (*LegacyInterestBlock) Size ¶ added in v0.45.0
func (m *LegacyInterestBlock) Size() (n int)
func (*LegacyInterestBlock) String ¶ added in v0.45.0
func (m *LegacyInterestBlock) String() string
func (*LegacyInterestBlock) Unmarshal ¶ added in v0.45.0
func (m *LegacyInterestBlock) Unmarshal(dAtA []byte) error
func (*LegacyInterestBlock) XXX_DiscardUnknown ¶ added in v0.45.0
func (m *LegacyInterestBlock) XXX_DiscardUnknown()
func (*LegacyInterestBlock) XXX_Marshal ¶ added in v0.45.0
func (m *LegacyInterestBlock) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*LegacyInterestBlock) XXX_Merge ¶ added in v0.45.0
func (m *LegacyInterestBlock) XXX_Merge(src proto.Message)
func (*LegacyInterestBlock) XXX_Size ¶ added in v0.45.0
func (m *LegacyInterestBlock) XXX_Size() int
func (*LegacyInterestBlock) XXX_Unmarshal ¶ added in v0.45.0
func (m *LegacyInterestBlock) XXX_Unmarshal(b []byte) error
type LegacyParams ¶ added in v0.48.0
type LegacyParams struct { DepositDenom string `protobuf:"bytes,1,opt,name=deposit_denom,json=depositDenom,proto3" json:"deposit_denom,omitempty"` RedemptionRate cosmossdk_io_math.LegacyDec `` /* 132-byte string literal not displayed */ EpochLength int64 `protobuf:"varint,3,opt,name=epoch_length,json=epochLength,proto3" json:"epoch_length,omitempty"` InterestRate cosmossdk_io_math.LegacyDec `` /* 126-byte string literal not displayed */ InterestRateMax cosmossdk_io_math.LegacyDec `` /* 137-byte string literal not displayed */ InterestRateMin cosmossdk_io_math.LegacyDec `` /* 137-byte string literal not displayed */ InterestRateIncrease cosmossdk_io_math.LegacyDec `` /* 152-byte string literal not displayed */ InterestRateDecrease cosmossdk_io_math.LegacyDec `` /* 152-byte string literal not displayed */ HealthGainFactor cosmossdk_io_math.LegacyDec `` /* 140-byte string literal not displayed */ TotalValue cosmossdk_io_math.Int `protobuf:"bytes,10,opt,name=total_value,json=totalValue,proto3,customtype=cosmossdk.io/math.Int" json:"total_value"` }
func (*LegacyParams) Descriptor ¶ added in v0.48.0
func (*LegacyParams) Descriptor() ([]byte, []int)
func (*LegacyParams) GetDepositDenom ¶ added in v0.48.0
func (m *LegacyParams) GetDepositDenom() string
func (*LegacyParams) GetEpochLength ¶ added in v0.48.0
func (m *LegacyParams) GetEpochLength() int64
func (*LegacyParams) Marshal ¶ added in v0.48.0
func (m *LegacyParams) Marshal() (dAtA []byte, err error)
func (*LegacyParams) MarshalTo ¶ added in v0.48.0
func (m *LegacyParams) MarshalTo(dAtA []byte) (int, error)
func (*LegacyParams) MarshalToSizedBuffer ¶ added in v0.48.0
func (m *LegacyParams) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*LegacyParams) ProtoMessage ¶ added in v0.48.0
func (*LegacyParams) ProtoMessage()
func (*LegacyParams) Reset ¶ added in v0.48.0
func (m *LegacyParams) Reset()
func (*LegacyParams) Size ¶ added in v0.48.0
func (m *LegacyParams) Size() (n int)
func (LegacyParams) String ¶ added in v0.48.0
func (p LegacyParams) String() string
func (*LegacyParams) Unmarshal ¶ added in v0.48.0
func (m *LegacyParams) Unmarshal(dAtA []byte) error
func (*LegacyParams) XXX_DiscardUnknown ¶ added in v0.48.0
func (m *LegacyParams) XXX_DiscardUnknown()
func (*LegacyParams) XXX_Marshal ¶ added in v0.48.0
func (m *LegacyParams) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*LegacyParams) XXX_Merge ¶ added in v0.48.0
func (m *LegacyParams) XXX_Merge(src proto.Message)
func (*LegacyParams) XXX_Size ¶ added in v0.48.0
func (m *LegacyParams) XXX_Size() int
func (*LegacyParams) XXX_Unmarshal ¶ added in v0.48.0
func (m *LegacyParams) XXX_Unmarshal(b []byte) error
type MsgBond ¶
type MsgBond struct { Creator string `protobuf:"bytes,1,opt,name=creator,proto3" json:"creator,omitempty"` Amount cosmossdk_io_math.Int `protobuf:"bytes,2,opt,name=amount,proto3,customtype=cosmossdk.io/math.Int" json:"amount"` }
func (*MsgBond) Descriptor ¶
func (*MsgBond) GetCreator ¶
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) UpdateParams(ctx context.Context, in *MsgUpdateParams, opts ...grpc.CallOption) (*MsgUpdateParamsResponse, 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) UpdateParams(context.Context, *MsgUpdateParams) (*MsgUpdateParamsResponse, 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 cosmossdk_io_math.Int `protobuf:"bytes,2,opt,name=amount,proto3,customtype=cosmossdk.io/math.Int" json:"amount"` }
func (*MsgUnbond) Descriptor ¶
func (*MsgUnbond) GetCreator ¶
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 MsgUpdateParams ¶ added in v0.39.0
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,omitempty"` }
func NewMsgUpdateParams ¶ added in v0.39.0
func NewMsgUpdateParams(signer string, params *Params) *MsgUpdateParams
func (*MsgUpdateParams) Descriptor ¶ added in v0.39.0
func (*MsgUpdateParams) Descriptor() ([]byte, []int)
func (*MsgUpdateParams) GetAuthority ¶ added in v0.39.0
func (m *MsgUpdateParams) GetAuthority() string
func (*MsgUpdateParams) GetParams ¶ added in v0.39.0
func (m *MsgUpdateParams) GetParams() *Params
func (*MsgUpdateParams) Marshal ¶ added in v0.39.0
func (m *MsgUpdateParams) Marshal() (dAtA []byte, err error)
func (*MsgUpdateParams) MarshalTo ¶ added in v0.39.0
func (m *MsgUpdateParams) MarshalTo(dAtA []byte) (int, error)
func (*MsgUpdateParams) MarshalToSizedBuffer ¶ added in v0.39.0
func (m *MsgUpdateParams) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*MsgUpdateParams) ProtoMessage ¶ added in v0.39.0
func (*MsgUpdateParams) ProtoMessage()
func (*MsgUpdateParams) Reset ¶ added in v0.39.0
func (m *MsgUpdateParams) Reset()
func (*MsgUpdateParams) Size ¶ added in v0.39.0
func (m *MsgUpdateParams) Size() (n int)
func (*MsgUpdateParams) String ¶ added in v0.39.0
func (m *MsgUpdateParams) String() string
func (*MsgUpdateParams) Unmarshal ¶ added in v0.39.0
func (m *MsgUpdateParams) Unmarshal(dAtA []byte) error
func (*MsgUpdateParams) ValidateBasic ¶ added in v0.39.0
func (msg *MsgUpdateParams) ValidateBasic() error
func (*MsgUpdateParams) XXX_DiscardUnknown ¶ added in v0.39.0
func (m *MsgUpdateParams) XXX_DiscardUnknown()
func (*MsgUpdateParams) XXX_Marshal ¶ added in v0.39.0
func (m *MsgUpdateParams) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*MsgUpdateParams) XXX_Merge ¶ added in v0.39.0
func (m *MsgUpdateParams) XXX_Merge(src proto.Message)
func (*MsgUpdateParams) XXX_Size ¶ added in v0.39.0
func (m *MsgUpdateParams) XXX_Size() int
func (*MsgUpdateParams) XXX_Unmarshal ¶ added in v0.39.0
func (m *MsgUpdateParams) XXX_Unmarshal(b []byte) error
type MsgUpdateParamsResponse ¶ added in v0.39.0
type MsgUpdateParamsResponse struct { }
func (*MsgUpdateParamsResponse) Descriptor ¶ added in v0.39.0
func (*MsgUpdateParamsResponse) Descriptor() ([]byte, []int)
func (*MsgUpdateParamsResponse) Marshal ¶ added in v0.39.0
func (m *MsgUpdateParamsResponse) Marshal() (dAtA []byte, err error)
func (*MsgUpdateParamsResponse) MarshalTo ¶ added in v0.39.0
func (m *MsgUpdateParamsResponse) MarshalTo(dAtA []byte) (int, error)
func (*MsgUpdateParamsResponse) MarshalToSizedBuffer ¶ added in v0.39.0
func (m *MsgUpdateParamsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*MsgUpdateParamsResponse) ProtoMessage ¶ added in v0.39.0
func (*MsgUpdateParamsResponse) ProtoMessage()
func (*MsgUpdateParamsResponse) Reset ¶ added in v0.39.0
func (m *MsgUpdateParamsResponse) Reset()
func (*MsgUpdateParamsResponse) Size ¶ added in v0.39.0
func (m *MsgUpdateParamsResponse) Size() (n int)
func (*MsgUpdateParamsResponse) String ¶ added in v0.39.0
func (m *MsgUpdateParamsResponse) String() string
func (*MsgUpdateParamsResponse) Unmarshal ¶ added in v0.39.0
func (m *MsgUpdateParamsResponse) Unmarshal(dAtA []byte) error
func (*MsgUpdateParamsResponse) XXX_DiscardUnknown ¶ added in v0.39.0
func (m *MsgUpdateParamsResponse) XXX_DiscardUnknown()
func (*MsgUpdateParamsResponse) XXX_Marshal ¶ added in v0.39.0
func (m *MsgUpdateParamsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*MsgUpdateParamsResponse) XXX_Merge ¶ added in v0.39.0
func (m *MsgUpdateParamsResponse) XXX_Merge(src proto.Message)
func (*MsgUpdateParamsResponse) XXX_Size ¶ added in v0.39.0
func (m *MsgUpdateParamsResponse) XXX_Size() int
func (*MsgUpdateParamsResponse) XXX_Unmarshal ¶ added in v0.39.0
func (m *MsgUpdateParamsResponse) 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) sdkmath.LegacyDec GetPriceFeeder(ctx sdk.Context, feeder sdk.AccAddress) (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 cosmossdk_io_math.LegacyDec `` /* 132-byte string literal not displayed */ EpochLength int64 `protobuf:"varint,3,opt,name=epoch_length,json=epochLength,proto3" json:"epoch_length,omitempty"` InterestRate cosmossdk_io_math.LegacyDec `` /* 126-byte string literal not displayed */ InterestRateMax cosmossdk_io_math.LegacyDec `` /* 137-byte string literal not displayed */ InterestRateMin cosmossdk_io_math.LegacyDec `` /* 137-byte string literal not displayed */ InterestRateIncrease cosmossdk_io_math.LegacyDec `` /* 152-byte string literal not displayed */ InterestRateDecrease cosmossdk_io_math.LegacyDec `` /* 152-byte string literal not displayed */ HealthGainFactor cosmossdk_io_math.LegacyDec `` /* 140-byte string literal not displayed */ TotalValue cosmossdk_io_math.Int `protobuf:"bytes,10,opt,name=total_value,json=totalValue,proto3,customtype=cosmossdk.io/math.Int" json:"total_value"` MaxLeverageRatio cosmossdk_io_math.LegacyDec `` /* 141-byte string literal not displayed */ }
Params defines the parameters for the module.
func NewParams ¶
func NewParams( depositDenom string, redemptionRate math.LegacyDec, epochLength int64, interestRate math.LegacyDec, interestRateMax math.LegacyDec, interestRateMin math.LegacyDec, interestRateIncrease math.LegacyDec, interestRateDecrease math.LegacyDec, healthGainFactor math.LegacyDec, totalValue math.Int, MaxLeveragePercent math.LegacyDec, ) Params
NewParams creates a new Params instance
func (*Params) Descriptor ¶
func (*Params) GetDepositDenom ¶
func (*Params) GetEpochLength ¶
func (*Params) MarshalToSizedBuffer ¶
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 cosmossdk_io_math.Int `protobuf:"bytes,1,opt,name=total_deposit,json=totalDeposit,proto3,customtype=cosmossdk.io/math.Int" json:"total_deposit"` TotalBorrow cosmossdk_io_math.Int `protobuf:"bytes,2,opt,name=total_borrow,json=totalBorrow,proto3,customtype=cosmossdk.io/math.Int" json:"total_borrow"` BorrowRatio cosmossdk_io_math.LegacyDec `protobuf:"bytes,3,opt,name=borrow_ratio,json=borrowRatio,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"borrow_ratio"` }
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 sdk.AccAddress, shareAmount math.Int) error AfterUnbond(ctx sdk.Context, sender sdk.AccAddress, 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) Bond(ctx context.Context, req *MsgBond) (*MsgBondResponse, error)
func (*UnimplementedMsgServer) Unbond ¶
func (*UnimplementedMsgServer) Unbond(ctx context.Context, req *MsgUnbond) (*MsgUnbondResponse, error)
func (*UnimplementedMsgServer) UpdateParams ¶ added in v0.39.0
func (*UnimplementedMsgServer) UpdateParams(ctx context.Context, req *MsgUpdateParams) (*MsgUpdateParamsResponse, 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)