types

package
v3.0.0-beta1 Latest Latest
Warning

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

Go to latest
Published: Sep 9, 2022 License: Apache-2.0 Imports: 34 Imported by: 0

Documentation

Overview

Package types is a reverse proxy.

It translates gRPC into RESTful JSON APIs.

Index

Constants

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

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

	// RouterKey is the message route for slashing
	RouterKey = ModuleName

	// QuerierRoute defines the module's query routing key
	QuerierRoute = ModuleName
)
View Source
const (
	// ProposalTypeUpdateRegistryProposal defines the type for a UpdateRegistryProposal
	// proposal type.
	ProposalTypeUpdateRegistryProposal = "UpdateRegistryProposal"
)
View Source
const SecondsPerYear = 31536000
View Source
const (
	// UTokenPrefix defines the uToken denomination prefix for all uToken types.
	UTokenPrefix = "u/"
)

Variables

View Source
var (
	// 1XX = General Validation
	ErrEmptyAddress = sdkerrors.Register(ModuleName, 100, "empty address")
	ErrNilAsset     = sdkerrors.Register(ModuleName, 101, "nil asset")
	ErrGetAmount    = sdkerrors.Register(ModuleName, 102, "retrieved invalid amount")
	ErrSetAmount    = sdkerrors.Register(ModuleName, 103, "cannot set invalid amount")

	// 2XX = Token Registry
	ErrNotRegisteredToken   = sdkerrors.Register(ModuleName, 200, "not a registered Token")
	ErrUToken               = sdkerrors.Register(ModuleName, 201, "denom should not be a uToken")
	ErrNotUToken            = sdkerrors.Register(ModuleName, 202, "denom should be a uToken")
	ErrSupplyNotAllowed     = sdkerrors.Register(ModuleName, 203, "supplying of Token disabled")
	ErrBorrowNotAllowed     = sdkerrors.Register(ModuleName, 204, "borrowing of Token disabled")
	ErrBlacklisted          = sdkerrors.Register(ModuleName, 205, "blacklisted Token")
	ErrCollateralWeightZero = sdkerrors.Register(ModuleName, 206, "collateral weight of Token is zero")

	// 3XX = User Positions
	ErrInsufficientBalance    = sdkerrors.Register(ModuleName, 300, "insufficient balance")
	ErrInsufficientCollateral = sdkerrors.Register(ModuleName, 301, "insufficient collateral")
	ErrDenomNotBorrowed       = sdkerrors.Register(ModuleName, 302, "denom not borrowed")
	ErrLiquidationRepayZero   = sdkerrors.Register(ModuleName, 303, "liquidation would repay zero tokens")

	// 4XX = Price Sensitive
	ErrBadValue              = sdkerrors.Register(ModuleName, 400, "bad USD value")
	ErrInvalidOraclePrice    = sdkerrors.Register(ModuleName, 401, "invalid oracle price")
	ErrUndercollaterized     = sdkerrors.Register(ModuleName, 402, "borrow positions are undercollaterized")
	ErrLiquidationIneligible = sdkerrors.Register(ModuleName, 403, "borrower not eligible for liquidation")

	// 5XX = Market Conditions
	ErrLendingPoolInsufficient = sdkerrors.Register(ModuleName, 500, "lending pool insufficient")
	ErrMaxSupplyUtilization    = sdkerrors.Register(ModuleName, 501, "market would exceed MaxSupplyUtilization")
	ErrMinCollateralLiquidity  = sdkerrors.Register(ModuleName, 502, "market would fall below MinCollateralLiquidity")
	ErrMaxCollateralShare      = sdkerrors.Register(ModuleName, 503, "market would exceed MaxCollateralShare")
	ErrMaxSupply               = sdkerrors.Register(ModuleName, 504, "market would exceed MaxSupply")

	// 6XX = Internal Failsafes
	ErrInvalidUtilization      = sdkerrors.Register(ModuleName, 600, "invalid token utilization")
	ErrNegativeTotalBorrowed   = sdkerrors.Register(ModuleName, 601, "total borrowed was negative")
	ErrNegativeAPY             = sdkerrors.Register(ModuleName, 602, "negative APY")
	ErrNegativeTimeElapsed     = sdkerrors.Register(ModuleName, 603, "negative time elapsed since last interest time")
	ErrInvalidExchangeRate     = sdkerrors.Register(ModuleName, 604, "exchange rate less than one")
	ErrInconsistentTotalBorrow = sdkerrors.Register(ModuleName, 605, "total adjusted borrow inconsistency")
	ErrExcessiveTimeElapsed    = sdkerrors.Register(ModuleName, 606, "excessive time elapsed since last interest time")
)
View Source
var (
	ErrInvalidLengthEvents        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowEvents          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupEvents = fmt.Errorf("proto: unexpected end of group")
)
View Source
var (
	ErrInvalidLengthGenesis        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowGenesis          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupGenesis = fmt.Errorf("proto: unexpected end of group")
)
View Source
var (
	ErrInvalidLengthGov        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowGov          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupGov = fmt.Errorf("proto: unexpected end of group")
)
View Source
var (
	KeyPrefixRegisteredToken     = []byte{0x01}
	KeyPrefixAdjustedBorrow      = []byte{0x02}
	KeyPrefixCollateralAmount    = []byte{0x04}
	KeyPrefixReserveAmount       = []byte{0x05}
	KeyPrefixLastInterestTime    = []byte{0x06}
	KeyPrefixBadDebt             = []byte{0x07}
	KeyPrefixInterestScalar      = []byte{0x08}
	KeyPrefixAdjustedTotalBorrow = []byte{0x09}
	KeyPrefixUtokenSupply        = []byte{0x0A}
)

KVStore key prefixes

View Source
var (
	ErrInvalidLengthLeverage        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowLeverage          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupLeverage = fmt.Errorf("proto: unexpected end of group")
)
View Source
var (
	KeyCompleteLiquidationThreshold = []byte("CompleteLiquidationThreshold")
	KeyMinimumCloseFactor           = []byte("MinimumCloseFactor")
	KeyOracleRewardFactor           = []byte("OracleRewardFactor")
	KeySmallLiquidationSize         = []byte("SmallLiquidationSize")
	KeyDirectLiquidationFee         = []byte("DirectLiquidationFee")
)
View Source
var (
	ErrInvalidLengthQuery        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowQuery          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupQuery = fmt.Errorf("proto: unexpected end of group")
)
View Source
var (
	ErrInvalidLengthTx        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowTx          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupTx = fmt.Errorf("proto: unexpected end of group")
)
View Source
var (

	// ModuleCdc references the global x/leverage module codec. Note, the codec
	// should ONLY be used in certain instances of tests and for JSON encoding as
	// Amino is still used for that purpose.
	ModuleCdc = codec.NewAminoCodec(amino)
)

Functions

func AddressFromKey

func AddressFromKey(key, prefix []byte) sdk.AccAddress

AddressFromKey extracts address from a key with the form prefix | lengthPrefixed(addr) | ...

func CreateAdjustedBorrowKey

func CreateAdjustedBorrowKey(borrowerAddr sdk.AccAddress, tokenDenom string) []byte

CreateAdjustedBorrowKey returns a KVStore key for getting and setting an adjusted borrow for a denom and borrower address.

func CreateAdjustedBorrowKeyNoDenom

func CreateAdjustedBorrowKeyNoDenom(borrowerAddr sdk.AccAddress) []byte

CreateAdjustedBorrowKeyNoDenom returns the common prefix used by all borrows associated with a given borrower address.

func CreateAdjustedTotalBorrowKey

func CreateAdjustedTotalBorrowKey(tokenDenom string) []byte

CreateAdjustedTotalBorrowKey returns a KVStore key for getting and setting the total ajdusted borrows for a given token.

func CreateBadDebtKey

func CreateBadDebtKey(denom string, borrowerAddr sdk.AccAddress) []byte

CreateBadDebtKey returns a KVStore key for tracking an address with unpaid bad debt

func CreateBadDebtKeyNoAddress

func CreateBadDebtKeyNoAddress() []byte

CreateBadDebtKeyNoAddress returns a safe copy of bad debt prefix

func CreateCollateralAmountKey

func CreateCollateralAmountKey(addr sdk.AccAddress, uTokenDenom string) []byte

CreateCollateralAmountKey returns a KVStore key for getting and setting the amount of collateral stored for a user in a given denom.

func CreateCollateralAmountKeyNoAddress

func CreateCollateralAmountKeyNoAddress() []byte

CreateCollateralAmountKeyNoAddress returns a safe copy of collateralPrefix

func CreateCollateralAmountKeyNoDenom

func CreateCollateralAmountKeyNoDenom(addr sdk.AccAddress) []byte

CreateCollateralAmountKeyNoDenom returns the common prefix used by all collateral associated with a given address.

func CreateInterestScalarKey

func CreateInterestScalarKey(tokenDenom string) []byte

CreateInterestScalarKey returns a KVStore key for getting and setting the interest scalar for a given token.

func CreateLastInterestTimeKey

func CreateLastInterestTimeKey() []byte

CreateLastInterestTimeKey returns a KVStore key for getting and setting the amount reserved of a a given token.

func CreateRegisteredTokenKey

func CreateRegisteredTokenKey(baseTokenDenom string) []byte

CreateRegisteredTokenKey returns a KVStore key for getting and setting a Token.

func CreateReserveAmountKey

func CreateReserveAmountKey(tokenDenom string) []byte

CreateReserveAmountKey returns a KVStore key for getting and setting the amount reserved of a a given token.

func CreateReserveAmountKeyNoDenom

func CreateReserveAmountKeyNoDenom() []byte

CreateReserveAmountKeyNoDenom returns a safe copy of reserveAmountPrefix

func CreateUTokenSupplyKey

func CreateUTokenSupplyKey(uTokenDenom string) []byte

CreateUTokenSupplyKey returns a KVStore key for getting and setting a utoken's total supply.

func DenomFromKey

func DenomFromKey(key, prefix []byte) string

DenomFromKey extracts denom from a key with the form prefix | denom | 0x00

func DenomFromKeyWithAddress

func DenomFromKeyWithAddress(key, prefix []byte) string

DenomFromKeyWithAddress extracts denom from a key with the form prefix | lengthPrefixed(addr) | denom | 0x00

func HasUTokenPrefix

func HasUTokenPrefix(denom string) bool

HasUTokenPrefix detects the uToken prefix on a denom.

func ParamKeyTable

func ParamKeyTable() paramtypes.KeyTable

ParamKeyTable returns the x/leverage module's parameter KeyTable expected by the x/params module.

func RegisterInterfaces

func RegisterInterfaces(registry cdctypes.InterfaceRegistry)

func RegisterLegacyAminoCodec

func RegisterLegacyAminoCodec(cdc *codec.LegacyAmino)

RegisterLegacyAminoCodec registers the necessary x/leverage interfaces and concrete types on the provided LegacyAmino codec. These types are used for Amino JSON serialization.

func RegisterMsgServer

func RegisterMsgServer(s grpc1.Server, srv MsgServer)

func RegisterQueryHandler

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

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

func RegisterQueryHandlerClient

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

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

func RegisterQueryHandlerFromEndpoint

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

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

func RegisterQueryHandlerServer

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

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

func RegisterQueryServer

func RegisterQueryServer(s grpc1.Server, srv QueryServer)

func ToTokenDenom

func ToTokenDenom(denom string) string

ToTokenDenom strips the uToken prefix from a denom, or returns an empty string if it was not present. Also returns an empty string if the prefix was repeated multiple times.

func ToUTokenDenom

func ToUTokenDenom(denom string) string

ToUTokenDenom adds the uToken prefix to a denom. Returns an empty string instead if the prefix was already present.

Types

type AccountKeeper

type AccountKeeper interface {
	GetAccount(ctx sdk.Context, addr sdk.AccAddress) authtypes.AccountI
}

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

type AdjustedBorrow

type AdjustedBorrow struct {
	Address string        `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"`
	Amount  types.DecCoin `protobuf:"bytes,2,opt,name=amount,proto3" json:"amount"`
}

AdjustedBorrow is a borrow struct used in the leverage module's genesis state.

func NewAdjustedBorrow

func NewAdjustedBorrow(addr string, amount sdk.DecCoin) AdjustedBorrow

NewAdjustedBorrow creates the Borrow struct used in GenesisState

func (*AdjustedBorrow) Descriptor

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

func (*AdjustedBorrow) Marshal

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

func (*AdjustedBorrow) MarshalTo

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

func (*AdjustedBorrow) MarshalToSizedBuffer

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

func (*AdjustedBorrow) ProtoMessage

func (*AdjustedBorrow) ProtoMessage()

func (*AdjustedBorrow) Reset

func (m *AdjustedBorrow) Reset()

func (*AdjustedBorrow) Size

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

func (*AdjustedBorrow) String

func (m *AdjustedBorrow) String() string

func (*AdjustedBorrow) Unmarshal

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

func (*AdjustedBorrow) XXX_DiscardUnknown

func (m *AdjustedBorrow) XXX_DiscardUnknown()

func (*AdjustedBorrow) XXX_Marshal

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

func (*AdjustedBorrow) XXX_Merge

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

func (*AdjustedBorrow) XXX_Size

func (m *AdjustedBorrow) XXX_Size() int

func (*AdjustedBorrow) XXX_Unmarshal

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

type BadDebt

type BadDebt struct {
	Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"`
	Denom   string `protobuf:"bytes,2,opt,name=denom,proto3" json:"denom,omitempty"`
}

BadDebt is a bad debt instance used in the leverage module's genesis state.

func NewBadDebt

func NewBadDebt(addr, denom string) BadDebt

NewBadDebt creates the BadDebt struct used in GenesisState

func (*BadDebt) Descriptor

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

func (*BadDebt) Marshal

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

func (*BadDebt) MarshalTo

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

func (*BadDebt) MarshalToSizedBuffer

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

func (*BadDebt) ProtoMessage

func (*BadDebt) ProtoMessage()

func (*BadDebt) Reset

func (m *BadDebt) Reset()

func (*BadDebt) Size

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

func (*BadDebt) String

func (m *BadDebt) String() string

func (*BadDebt) Unmarshal

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

func (*BadDebt) XXX_DiscardUnknown

func (m *BadDebt) XXX_DiscardUnknown()

func (*BadDebt) XXX_Marshal

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

func (*BadDebt) XXX_Merge

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

func (*BadDebt) XXX_Size

func (m *BadDebt) XXX_Size() int

func (*BadDebt) XXX_Unmarshal

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

type BankKeeper

type BankKeeper interface {
	MintCoins(ctx sdk.Context, moduleName string, amounts sdk.Coins) error
	BurnCoins(ctx sdk.Context, moduleName string, amounts 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
	SendCoinsFromModuleToModule(
		ctx sdk.Context, senderModule, recipientModule string, amt sdk.Coins,
	) error
	SendCoins(ctx sdk.Context, fromAddr, toAddr sdk.AccAddress, amt sdk.Coins) error
	GetBalance(ctx sdk.Context, addr sdk.AccAddress, denom string) sdk.Coin
	GetAllBalances(ctx sdk.Context, addr sdk.AccAddress) sdk.Coins
	SpendableCoins(ctx sdk.Context, addr sdk.AccAddress) sdk.Coins
}

BankKeeper defines the expected x/bank keeper interface.

type Collateral

type Collateral struct {
	Address string     `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"`
	Amount  types.Coin `protobuf:"bytes,2,opt,name=amount,proto3" json:"amount"`
}

Collateral is a collateral struct used in the leverage module's genesis state.

func NewCollateral

func NewCollateral(addr string, amount sdk.Coin) Collateral

NewCollateral creates the Collateral struct used in GenesisState

func (*Collateral) Descriptor

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

func (*Collateral) Marshal

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

func (*Collateral) MarshalTo

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

func (*Collateral) MarshalToSizedBuffer

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

func (*Collateral) ProtoMessage

func (*Collateral) ProtoMessage()

func (*Collateral) Reset

func (m *Collateral) Reset()

func (*Collateral) Size

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

func (*Collateral) String

func (m *Collateral) String() string

func (*Collateral) Unmarshal

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

func (*Collateral) XXX_DiscardUnknown

func (m *Collateral) XXX_DiscardUnknown()

func (*Collateral) XXX_Marshal

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

func (*Collateral) XXX_Merge

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

func (*Collateral) XXX_Size

func (m *Collateral) XXX_Size() int

func (*Collateral) XXX_Unmarshal

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

type EventBorrow

type EventBorrow struct {
	// Borrower bech32 address.
	Borrower string `protobuf:"bytes,1,opt,name=borrower,proto3" json:"borrower,omitempty"`
	// Asset borrowed.
	Asset types.Coin `protobuf:"bytes,2,opt,name=asset,proto3" json:"asset"`
}

EventBorrow is emitted on Msg/Borrow

func (*EventBorrow) Descriptor

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

func (*EventBorrow) Marshal

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

func (*EventBorrow) MarshalTo

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

func (*EventBorrow) MarshalToSizedBuffer

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

func (*EventBorrow) ProtoMessage

func (*EventBorrow) ProtoMessage()

func (*EventBorrow) Reset

func (m *EventBorrow) Reset()

func (*EventBorrow) Size

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

func (*EventBorrow) String

func (m *EventBorrow) String() string

func (*EventBorrow) Unmarshal

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

func (*EventBorrow) XXX_DiscardUnknown

func (m *EventBorrow) XXX_DiscardUnknown()

func (*EventBorrow) XXX_Marshal

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

func (*EventBorrow) XXX_Merge

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

func (*EventBorrow) XXX_Size

func (m *EventBorrow) XXX_Size() int

func (*EventBorrow) XXX_Unmarshal

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

type EventCollaterize

type EventCollaterize struct {
	// Borrower bech32 address.
	Borrower string `protobuf:"bytes,1,opt,name=borrower,proto3" json:"borrower,omitempty"`
	// uToken provided as a collateral.
	Utoken types.Coin `protobuf:"bytes,2,opt,name=utoken,proto3" json:"utoken"`
}

EventCollaterize is emitted on Msg/Collaterize

func (*EventCollaterize) Descriptor

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

func (*EventCollaterize) Marshal

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

func (*EventCollaterize) MarshalTo

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

func (*EventCollaterize) MarshalToSizedBuffer

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

func (*EventCollaterize) ProtoMessage

func (*EventCollaterize) ProtoMessage()

func (*EventCollaterize) Reset

func (m *EventCollaterize) Reset()

func (*EventCollaterize) Size

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

func (*EventCollaterize) String

func (m *EventCollaterize) String() string

func (*EventCollaterize) Unmarshal

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

func (*EventCollaterize) XXX_DiscardUnknown

func (m *EventCollaterize) XXX_DiscardUnknown()

func (*EventCollaterize) XXX_Marshal

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

func (*EventCollaterize) XXX_Merge

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

func (*EventCollaterize) XXX_Size

func (m *EventCollaterize) XXX_Size() int

func (*EventCollaterize) XXX_Unmarshal

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

type EventDecollaterize

type EventDecollaterize struct {
	// Borrower bech32 address.
	Borrower string `protobuf:"bytes,1,opt,name=borrower,proto3" json:"borrower,omitempty"`
	// utoken removed from collateral.
	Utoken types.Coin `protobuf:"bytes,2,opt,name=utoken,proto3" json:"utoken"`
}

EventDecollaterize is emitted on Msg/Decollateralize

func (*EventDecollaterize) Descriptor

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

func (*EventDecollaterize) Marshal

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

func (*EventDecollaterize) MarshalTo

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

func (*EventDecollaterize) MarshalToSizedBuffer

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

func (*EventDecollaterize) ProtoMessage

func (*EventDecollaterize) ProtoMessage()

func (*EventDecollaterize) Reset

func (m *EventDecollaterize) Reset()

func (*EventDecollaterize) Size

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

func (*EventDecollaterize) String

func (m *EventDecollaterize) String() string

func (*EventDecollaterize) Unmarshal

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

func (*EventDecollaterize) XXX_DiscardUnknown

func (m *EventDecollaterize) XXX_DiscardUnknown()

func (*EventDecollaterize) XXX_Marshal

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

func (*EventDecollaterize) XXX_Merge

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

func (*EventDecollaterize) XXX_Size

func (m *EventDecollaterize) XXX_Size() int

func (*EventDecollaterize) XXX_Unmarshal

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

type EventFundOracle

type EventFundOracle struct {
	// Assets sent to oracle module
	Assets []types.Coin `protobuf:"bytes,1,rep,name=assets,proto3" json:"assets"`
}

EventFundOracle is emitted when sending rewards to oracle module

func (*EventFundOracle) Descriptor

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

func (*EventFundOracle) Marshal

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

func (*EventFundOracle) MarshalTo

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

func (*EventFundOracle) MarshalToSizedBuffer

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

func (*EventFundOracle) ProtoMessage

func (*EventFundOracle) ProtoMessage()

func (*EventFundOracle) Reset

func (m *EventFundOracle) Reset()

func (*EventFundOracle) Size

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

func (*EventFundOracle) String

func (m *EventFundOracle) String() string

func (*EventFundOracle) Unmarshal

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

func (*EventFundOracle) XXX_DiscardUnknown

func (m *EventFundOracle) XXX_DiscardUnknown()

func (*EventFundOracle) XXX_Marshal

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

func (*EventFundOracle) XXX_Merge

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

func (*EventFundOracle) XXX_Size

func (m *EventFundOracle) XXX_Size() int

func (*EventFundOracle) XXX_Unmarshal

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

type EventInterestAccrual

type EventInterestAccrual struct {
	BlockHeight uint64 `protobuf:"varint,1,opt,name=block_height,json=blockHeight,proto3" json:"block_height,omitempty"`
	// Unix timestamp (in seconds)
	Timestamp     uint64       `protobuf:"varint,2,opt,name=timestamp,proto3" json:"timestamp,omitempty"`
	TotalInterest []types.Coin `protobuf:"bytes,3,rep,name=total_interest,json=totalInterest,proto3" json:"total_interest"`
	Reserved      []types.Coin `protobuf:"bytes,4,rep,name=reserved,proto3" json:"reserved"`
}

EventInterestAccrual is emitted when interest accrues in EndBlock

func (*EventInterestAccrual) Descriptor

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

func (*EventInterestAccrual) Marshal

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

func (*EventInterestAccrual) MarshalTo

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

func (*EventInterestAccrual) MarshalToSizedBuffer

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

func (*EventInterestAccrual) ProtoMessage

func (*EventInterestAccrual) ProtoMessage()

func (*EventInterestAccrual) Reset

func (m *EventInterestAccrual) Reset()

func (*EventInterestAccrual) Size

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

func (*EventInterestAccrual) String

func (m *EventInterestAccrual) String() string

func (*EventInterestAccrual) Unmarshal

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

func (*EventInterestAccrual) XXX_DiscardUnknown

func (m *EventInterestAccrual) XXX_DiscardUnknown()

func (*EventInterestAccrual) XXX_Marshal

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

func (*EventInterestAccrual) XXX_Merge

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

func (*EventInterestAccrual) XXX_Size

func (m *EventInterestAccrual) XXX_Size() int

func (*EventInterestAccrual) XXX_Unmarshal

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

type EventLiquidate

type EventLiquidate struct {
	// Liquidator bech32 address.
	Liquidator string `protobuf:"bytes,1,opt,name=liquidator,proto3" json:"liquidator,omitempty"`
	// Borrower bech32 address.
	Borrower string `protobuf:"bytes,2,opt,name=borrower,proto3" json:"borrower,omitempty"`
	// Assets liquidated from the borrower
	Liquidated types.Coin `protobuf:"bytes,3,opt,name=liquidated,proto3" json:"liquidated"`
}

EventLiquidate is emitted on Msg/Liquidate

func (*EventLiquidate) Descriptor

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

func (*EventLiquidate) Marshal

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

func (*EventLiquidate) MarshalTo

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

func (*EventLiquidate) MarshalToSizedBuffer

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

func (*EventLiquidate) ProtoMessage

func (*EventLiquidate) ProtoMessage()

func (*EventLiquidate) Reset

func (m *EventLiquidate) Reset()

func (*EventLiquidate) Size

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

func (*EventLiquidate) String

func (m *EventLiquidate) String() string

func (*EventLiquidate) Unmarshal

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

func (*EventLiquidate) XXX_DiscardUnknown

func (m *EventLiquidate) XXX_DiscardUnknown()

func (*EventLiquidate) XXX_Marshal

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

func (*EventLiquidate) XXX_Merge

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

func (*EventLiquidate) XXX_Size

func (m *EventLiquidate) XXX_Size() int

func (*EventLiquidate) XXX_Unmarshal

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

type EventRepay

type EventRepay struct {
	// Borrower bech32 address.
	Borrower string `protobuf:"bytes,1,opt,name=borrower,proto3" json:"borrower,omitempty"`
	// Asset repaid
	Repaid types.Coin `protobuf:"bytes,2,opt,name=repaid,proto3" json:"repaid"`
}

EventRepay is emitted on Msg/Repay

func (*EventRepay) Descriptor

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

func (*EventRepay) Marshal

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

func (*EventRepay) MarshalTo

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

func (*EventRepay) MarshalToSizedBuffer

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

func (*EventRepay) ProtoMessage

func (*EventRepay) ProtoMessage()

func (*EventRepay) Reset

func (m *EventRepay) Reset()

func (*EventRepay) Size

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

func (*EventRepay) String

func (m *EventRepay) String() string

func (*EventRepay) Unmarshal

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

func (*EventRepay) XXX_DiscardUnknown

func (m *EventRepay) XXX_DiscardUnknown()

func (*EventRepay) XXX_Marshal

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

func (*EventRepay) XXX_Merge

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

func (*EventRepay) XXX_Size

func (m *EventRepay) XXX_Size() int

func (*EventRepay) XXX_Unmarshal

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

type EventRepayBadDebt

type EventRepayBadDebt struct {
	// Borrower bech32 address.
	Borrower string `protobuf:"bytes,1,opt,name=borrower,proto3" json:"borrower,omitempty"`
	// Asset repaid
	Asset types.Coin `protobuf:"bytes,2,opt,name=asset,proto3" json:"asset"`
}

EventRepayBadDebt is emitted when bad debt is detected and repayed (potentially partially)

func (*EventRepayBadDebt) Descriptor

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

func (*EventRepayBadDebt) Marshal

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

func (*EventRepayBadDebt) MarshalTo

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

func (*EventRepayBadDebt) MarshalToSizedBuffer

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

func (*EventRepayBadDebt) ProtoMessage

func (*EventRepayBadDebt) ProtoMessage()

func (*EventRepayBadDebt) Reset

func (m *EventRepayBadDebt) Reset()

func (*EventRepayBadDebt) Size

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

func (*EventRepayBadDebt) String

func (m *EventRepayBadDebt) String() string

func (*EventRepayBadDebt) Unmarshal

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

func (*EventRepayBadDebt) XXX_DiscardUnknown

func (m *EventRepayBadDebt) XXX_DiscardUnknown()

func (*EventRepayBadDebt) XXX_Marshal

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

func (*EventRepayBadDebt) XXX_Merge

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

func (*EventRepayBadDebt) XXX_Size

func (m *EventRepayBadDebt) XXX_Size() int

func (*EventRepayBadDebt) XXX_Unmarshal

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

type EventReservesExhausted

type EventReservesExhausted struct {
	// Borrower bech32 address.
	Borrower string `protobuf:"bytes,1,opt,name=borrower,proto3" json:"borrower,omitempty"`
	// Outstanding bad debt
	OutstandingDebt types.Coin `protobuf:"bytes,2,opt,name=outstanding_debt,json=outstandingDebt,proto3" json:"outstanding_debt"`
	// Module balance remaining
	ModuleBalance types.Coin `protobuf:"bytes,3,opt,name=module_balance,json=moduleBalance,proto3" json:"module_balance"`
	// Reserves remaining
	Reserves types.Coin `protobuf:"bytes,4,opt,name=reserves,proto3" json:"reserves"`
}

EventReservesExhausted is emitted when the module reserves are exhausted by paying off bad debts.

func (*EventReservesExhausted) Descriptor

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

func (*EventReservesExhausted) Marshal

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

func (*EventReservesExhausted) MarshalTo

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

func (*EventReservesExhausted) MarshalToSizedBuffer

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

func (*EventReservesExhausted) ProtoMessage

func (*EventReservesExhausted) ProtoMessage()

func (*EventReservesExhausted) Reset

func (m *EventReservesExhausted) Reset()

func (*EventReservesExhausted) Size

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

func (*EventReservesExhausted) String

func (m *EventReservesExhausted) String() string

func (*EventReservesExhausted) Unmarshal

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

func (*EventReservesExhausted) XXX_DiscardUnknown

func (m *EventReservesExhausted) XXX_DiscardUnknown()

func (*EventReservesExhausted) XXX_Marshal

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

func (*EventReservesExhausted) XXX_Merge

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

func (*EventReservesExhausted) XXX_Size

func (m *EventReservesExhausted) XXX_Size() int

func (*EventReservesExhausted) XXX_Unmarshal

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

type EventSupply

type EventSupply struct {
	// Liquidity supplier bech32 address.
	Supplier string `protobuf:"bytes,1,opt,name=supplier,proto3" json:"supplier,omitempty"`
	// Liquidity provided to the module.
	Asset types.Coin `protobuf:"bytes,2,opt,name=asset,proto3" json:"asset"`
	// uToken received by the supplier in exchange for the provided liquidity.
	Utoken types.Coin `protobuf:"bytes,3,opt,name=utoken,proto3" json:"utoken"`
}

EventSupply is emitted on Msg/Supply

func (*EventSupply) Descriptor

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

func (*EventSupply) Marshal

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

func (*EventSupply) MarshalTo

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

func (*EventSupply) MarshalToSizedBuffer

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

func (*EventSupply) ProtoMessage

func (*EventSupply) ProtoMessage()

func (*EventSupply) Reset

func (m *EventSupply) Reset()

func (*EventSupply) Size

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

func (*EventSupply) String

func (m *EventSupply) String() string

func (*EventSupply) Unmarshal

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

func (*EventSupply) XXX_DiscardUnknown

func (m *EventSupply) XXX_DiscardUnknown()

func (*EventSupply) XXX_Marshal

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

func (*EventSupply) XXX_Merge

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

func (*EventSupply) XXX_Size

func (m *EventSupply) XXX_Size() int

func (*EventSupply) XXX_Unmarshal

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

type EventWithdraw

type EventWithdraw struct {
	// Liquidity supplier bech32 address.
	Supplier string `protobuf:"bytes,1,opt,name=supplier,proto3" json:"supplier,omitempty"`
	// uToken sent to the module in exchange for the underlying asset.
	Utoken types.Coin `protobuf:"bytes,2,opt,name=utoken,proto3" json:"utoken"`
	// Liquidity received by the supplier.
	Asset types.Coin `protobuf:"bytes,3,opt,name=asset,proto3" json:"asset"`
}

EventWithdraw is emitted on Msg/Withdraw

func (*EventWithdraw) Descriptor

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

func (*EventWithdraw) Marshal

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

func (*EventWithdraw) MarshalTo

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

func (*EventWithdraw) MarshalToSizedBuffer

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

func (*EventWithdraw) ProtoMessage

func (*EventWithdraw) ProtoMessage()

func (*EventWithdraw) Reset

func (m *EventWithdraw) Reset()

func (*EventWithdraw) Size

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

func (*EventWithdraw) String

func (m *EventWithdraw) String() string

func (*EventWithdraw) Unmarshal

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

func (*EventWithdraw) XXX_DiscardUnknown

func (m *EventWithdraw) XXX_DiscardUnknown()

func (*EventWithdraw) XXX_Marshal

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

func (*EventWithdraw) XXX_Merge

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

func (*EventWithdraw) XXX_Size

func (m *EventWithdraw) XXX_Size() int

func (*EventWithdraw) XXX_Unmarshal

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

type GenesisState

type GenesisState struct {
	Params           Params                                   `protobuf:"bytes,1,opt,name=params,proto3" json:"params"`
	Registry         []Token                                  `protobuf:"bytes,2,rep,name=registry,proto3" json:"registry"`
	AdjustedBorrows  []AdjustedBorrow                         `protobuf:"bytes,3,rep,name=adjusted_borrows,json=adjustedBorrows,proto3" json:"adjusted_borrows"`
	Collateral       []Collateral                             `protobuf:"bytes,4,rep,name=collateral,proto3" json:"collateral"`
	Reserves         github_com_cosmos_cosmos_sdk_types.Coins `protobuf:"bytes,5,rep,name=reserves,proto3,castrepeated=github.com/cosmos/cosmos-sdk/types.Coins" json:"reserves"`
	LastInterestTime int64                                    `protobuf:"varint,6,opt,name=last_interest_time,json=lastInterestTime,proto3" json:"last_interest_time,omitempty"`
	BadDebts         []BadDebt                                `protobuf:"bytes,7,rep,name=bad_debts,json=badDebts,proto3" json:"bad_debts"`
	InterestScalars  []InterestScalar                         `protobuf:"bytes,8,rep,name=interest_scalars,json=interestScalars,proto3" json:"interest_scalars"`
	UtokenSupply     github_com_cosmos_cosmos_sdk_types.Coins `` /* 141-byte string literal not displayed */
}

GenesisState defines the x/leverage module's genesis state.

func DefaultGenesis

func DefaultGenesis() *GenesisState

DefaultGenesis returns the default genesis state of the x/leverage module.

func GetGenesisStateFromAppState

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

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

func NewGenesisState

func NewGenesisState(
	params Params,
	tokens []Token,
	adjustedBorrows []AdjustedBorrow,
	collateral []Collateral,
	reserves sdk.Coins,
	lastInterestTime int64,
	badDebts []BadDebt,
	interestScalars []InterestScalar,
	uTokenSupply sdk.Coins,
) *GenesisState

NewGenesisState creates a new GenesisState object

func (*GenesisState) Descriptor

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

func (*GenesisState) Marshal

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

func (*GenesisState) MarshalTo

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

func (*GenesisState) MarshalToSizedBuffer

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

func (*GenesisState) ProtoMessage

func (*GenesisState) ProtoMessage()

func (*GenesisState) Reset

func (m *GenesisState) Reset()

func (*GenesisState) Size

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

func (*GenesisState) String

func (m *GenesisState) String() string

func (*GenesisState) Unmarshal

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

func (GenesisState) Validate

func (gs GenesisState) Validate() error

Validate performs basic genesis state validation returning an error upon any failure.

func (*GenesisState) XXX_DiscardUnknown

func (m *GenesisState) XXX_DiscardUnknown()

func (*GenesisState) XXX_Marshal

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

func (*GenesisState) XXX_Merge

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

func (*GenesisState) XXX_Size

func (m *GenesisState) XXX_Size() int

func (*GenesisState) XXX_Unmarshal

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

type Hooks

type Hooks interface {
	// AfterTokenRegistered defines a hook another keeper can execute after the
	// x/leverage registers a token.
	AfterTokenRegistered(ctx sdk.Context, token Token)

	// AfterRegisteredTokenRemoved defines a hook another keeper can execute after
	// the x/leverage module removes a registered token.
	AfterRegisteredTokenRemoved(ctx sdk.Context, token Token)
}

Hooks defines pre or post processing hooks for various actions the x/leverage module takes.

type InterestScalar

type InterestScalar struct {
	Denom  string                                 `protobuf:"bytes,1,opt,name=denom,proto3" json:"denom,omitempty"`
	Scalar github_com_cosmos_cosmos_sdk_types.Dec `protobuf:"bytes,2,opt,name=scalar,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Dec" json:"scalar"`
}

InterestScalar is an interest scalar used in the leverage module's genesis state.

func NewInterestScalar

func NewInterestScalar(denom string, scalar sdk.Dec) InterestScalar

NewInterestScalar creates the InterestScalar struct used in GenesisState

func (*InterestScalar) Descriptor

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

func (*InterestScalar) Marshal

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

func (*InterestScalar) MarshalTo

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

func (*InterestScalar) MarshalToSizedBuffer

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

func (*InterestScalar) ProtoMessage

func (*InterestScalar) ProtoMessage()

func (*InterestScalar) Reset

func (m *InterestScalar) Reset()

func (*InterestScalar) Size

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

func (*InterestScalar) String

func (m *InterestScalar) String() string

func (*InterestScalar) Unmarshal

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

func (*InterestScalar) XXX_DiscardUnknown

func (m *InterestScalar) XXX_DiscardUnknown()

func (*InterestScalar) XXX_Marshal

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

func (*InterestScalar) XXX_Merge

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

func (*InterestScalar) XXX_Size

func (m *InterestScalar) XXX_Size() int

func (*InterestScalar) XXX_Unmarshal

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

type MsgBorrow

type MsgBorrow struct {
	// Borrower is the account address taking a loan and the signer
	// of the message.
	Borrower string     `protobuf:"bytes,1,opt,name=borrower,proto3" json:"borrower,omitempty"`
	Asset    types.Coin `protobuf:"bytes,2,opt,name=asset,proto3" json:"asset"`
}

MsgBorrow represents a user's request to borrow a base asset type from the module.

func NewMsgBorrow

func NewMsgBorrow(borrower sdk.AccAddress, asset sdk.Coin) *MsgBorrow

func (*MsgBorrow) Descriptor

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

func (*MsgBorrow) GetSignBytes

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

GetSignBytes get the bytes for the message signer to sign on

func (*MsgBorrow) GetSigners

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

func (*MsgBorrow) Marshal

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

func (*MsgBorrow) MarshalTo

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

func (*MsgBorrow) MarshalToSizedBuffer

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

func (*MsgBorrow) ProtoMessage

func (*MsgBorrow) ProtoMessage()

func (*MsgBorrow) Reset

func (m *MsgBorrow) Reset()

func (MsgBorrow) Route

func (msg MsgBorrow) Route() string

func (*MsgBorrow) Size

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

func (*MsgBorrow) String

func (m *MsgBorrow) String() string

func (MsgBorrow) Type

func (msg MsgBorrow) Type() string

func (*MsgBorrow) Unmarshal

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

func (*MsgBorrow) ValidateBasic

func (msg *MsgBorrow) ValidateBasic() error

func (*MsgBorrow) XXX_DiscardUnknown

func (m *MsgBorrow) XXX_DiscardUnknown()

func (*MsgBorrow) XXX_Marshal

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

func (*MsgBorrow) XXX_Merge

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

func (*MsgBorrow) XXX_MessageName

func (*MsgBorrow) XXX_MessageName() string

func (*MsgBorrow) XXX_Size

func (m *MsgBorrow) XXX_Size() int

func (*MsgBorrow) XXX_Unmarshal

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

type MsgBorrowResponse

type MsgBorrowResponse struct {
}

MsgBorrowResponse defines the Msg/Borrow response type.

func (*MsgBorrowResponse) Descriptor

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

func (*MsgBorrowResponse) Marshal

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

func (*MsgBorrowResponse) MarshalTo

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

func (*MsgBorrowResponse) MarshalToSizedBuffer

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

func (*MsgBorrowResponse) ProtoMessage

func (*MsgBorrowResponse) ProtoMessage()

func (*MsgBorrowResponse) Reset

func (m *MsgBorrowResponse) Reset()

func (*MsgBorrowResponse) Size

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

func (*MsgBorrowResponse) String

func (m *MsgBorrowResponse) String() string

func (*MsgBorrowResponse) Unmarshal

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

func (*MsgBorrowResponse) XXX_DiscardUnknown

func (m *MsgBorrowResponse) XXX_DiscardUnknown()

func (*MsgBorrowResponse) XXX_Marshal

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

func (*MsgBorrowResponse) XXX_Merge

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

func (*MsgBorrowResponse) XXX_MessageName

func (*MsgBorrowResponse) XXX_MessageName() string

func (*MsgBorrowResponse) XXX_Size

func (m *MsgBorrowResponse) XXX_Size() int

func (*MsgBorrowResponse) XXX_Unmarshal

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

type MsgClient

type MsgClient interface {
	// Supply moves tokens from user balance to the module for lending or collateral.
	// The user receives uTokens in return.
	Supply(ctx context.Context, in *MsgSupply, opts ...grpc.CallOption) (*MsgSupplyResponse, error)
	// Withdraw moves previously supplied tokens from the module back to the user balance in
	// exchange for burning uTokens.
	Withdraw(ctx context.Context, in *MsgWithdraw, opts ...grpc.CallOption) (*MsgWithdrawResponse, error)
	// Collateralize enables selected uTokens as collateral, which moves them to the module.
	Collateralize(ctx context.Context, in *MsgCollateralize, opts ...grpc.CallOption) (*MsgCollateralizeResponse, error)
	// Decollateralize disables selected uTokens as collateral. They are returned to the user's
	// balance from the module.
	Decollateralize(ctx context.Context, in *MsgDecollateralize, opts ...grpc.CallOption) (*MsgDecollateralizeResponse, error)
	// Borrow allows a user to borrow tokens from the module if they have sufficient collateral.
	Borrow(ctx context.Context, in *MsgBorrow, opts ...grpc.CallOption) (*MsgBorrowResponse, error)
	// Repay allows a user to repay previously borrowed tokens and interest.
	Repay(ctx context.Context, in *MsgRepay, opts ...grpc.CallOption) (*MsgRepayResponse, error)
	// Liquidate allows a user to repay a different user's borrowed coins in exchange for some
	// of the target's collateral.
	Liquidate(ctx context.Context, in *MsgLiquidate, opts ...grpc.CallOption) (*MsgLiquidateResponse, 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 MsgCollateralize

type MsgCollateralize struct {
	// Borrower is the account address adding collateral and the signer of the message.
	Borrower string     `protobuf:"bytes,1,opt,name=borrower,proto3" json:"borrower,omitempty"`
	Asset    types.Coin `protobuf:"bytes,2,opt,name=asset,proto3" json:"asset"`
}

MsgCollateralize represents a user's request to enable selected uTokens as collateral.

func NewMsgCollateralize

func NewMsgCollateralize(borrower sdk.AccAddress, asset sdk.Coin) *MsgCollateralize

func (*MsgCollateralize) Descriptor

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

func (*MsgCollateralize) GetSignBytes

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

GetSignBytes get the bytes for the message signer to sign on

func (*MsgCollateralize) GetSigners

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

func (*MsgCollateralize) Marshal

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

func (*MsgCollateralize) MarshalTo

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

func (*MsgCollateralize) MarshalToSizedBuffer

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

func (*MsgCollateralize) ProtoMessage

func (*MsgCollateralize) ProtoMessage()

func (*MsgCollateralize) Reset

func (m *MsgCollateralize) Reset()

func (MsgCollateralize) Route

func (msg MsgCollateralize) Route() string

func (*MsgCollateralize) Size

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

func (*MsgCollateralize) String

func (m *MsgCollateralize) String() string

func (MsgCollateralize) Type

func (msg MsgCollateralize) Type() string

func (*MsgCollateralize) Unmarshal

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

func (*MsgCollateralize) ValidateBasic

func (msg *MsgCollateralize) ValidateBasic() error

func (*MsgCollateralize) XXX_DiscardUnknown

func (m *MsgCollateralize) XXX_DiscardUnknown()

func (*MsgCollateralize) XXX_Marshal

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

func (*MsgCollateralize) XXX_Merge

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

func (*MsgCollateralize) XXX_MessageName

func (*MsgCollateralize) XXX_MessageName() string

func (*MsgCollateralize) XXX_Size

func (m *MsgCollateralize) XXX_Size() int

func (*MsgCollateralize) XXX_Unmarshal

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

type MsgCollateralizeResponse

type MsgCollateralizeResponse struct {
}

MsgCollateralizeResponse defines the Msg/Collateralize response type.

func (*MsgCollateralizeResponse) Descriptor

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

func (*MsgCollateralizeResponse) Marshal

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

func (*MsgCollateralizeResponse) MarshalTo

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

func (*MsgCollateralizeResponse) MarshalToSizedBuffer

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

func (*MsgCollateralizeResponse) ProtoMessage

func (*MsgCollateralizeResponse) ProtoMessage()

func (*MsgCollateralizeResponse) Reset

func (m *MsgCollateralizeResponse) Reset()

func (*MsgCollateralizeResponse) Size

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

func (*MsgCollateralizeResponse) String

func (m *MsgCollateralizeResponse) String() string

func (*MsgCollateralizeResponse) Unmarshal

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

func (*MsgCollateralizeResponse) XXX_DiscardUnknown

func (m *MsgCollateralizeResponse) XXX_DiscardUnknown()

func (*MsgCollateralizeResponse) XXX_Marshal

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

func (*MsgCollateralizeResponse) XXX_Merge

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

func (*MsgCollateralizeResponse) XXX_MessageName

func (*MsgCollateralizeResponse) XXX_MessageName() string

func (*MsgCollateralizeResponse) XXX_Size

func (m *MsgCollateralizeResponse) XXX_Size() int

func (*MsgCollateralizeResponse) XXX_Unmarshal

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

type MsgDecollateralize

type MsgDecollateralize struct {
	// Borrower is the account address removing collateral and the signer of the message.
	Borrower string     `protobuf:"bytes,1,opt,name=borrower,proto3" json:"borrower,omitempty"`
	Asset    types.Coin `protobuf:"bytes,2,opt,name=asset,proto3" json:"asset"`
}

MsgDecollateralize represents a user's request to disable selected uTokens as collateral.

func NewMsgDecollateralize

func NewMsgDecollateralize(borrower sdk.AccAddress, asset sdk.Coin) *MsgDecollateralize

func (*MsgDecollateralize) Descriptor

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

func (*MsgDecollateralize) GetSignBytes

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

GetSignBytes get the bytes for the message signer to sign on

func (*MsgDecollateralize) GetSigners

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

func (*MsgDecollateralize) Marshal

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

func (*MsgDecollateralize) MarshalTo

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

func (*MsgDecollateralize) MarshalToSizedBuffer

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

func (*MsgDecollateralize) ProtoMessage

func (*MsgDecollateralize) ProtoMessage()

func (*MsgDecollateralize) Reset

func (m *MsgDecollateralize) Reset()

func (MsgDecollateralize) Route

func (msg MsgDecollateralize) Route() string

func (*MsgDecollateralize) Size

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

func (*MsgDecollateralize) String

func (m *MsgDecollateralize) String() string

func (MsgDecollateralize) Type

func (msg MsgDecollateralize) Type() string

func (*MsgDecollateralize) Unmarshal

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

func (*MsgDecollateralize) ValidateBasic

func (msg *MsgDecollateralize) ValidateBasic() error

func (*MsgDecollateralize) XXX_DiscardUnknown

func (m *MsgDecollateralize) XXX_DiscardUnknown()

func (*MsgDecollateralize) XXX_Marshal

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

func (*MsgDecollateralize) XXX_Merge

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

func (*MsgDecollateralize) XXX_MessageName

func (*MsgDecollateralize) XXX_MessageName() string

func (*MsgDecollateralize) XXX_Size

func (m *MsgDecollateralize) XXX_Size() int

func (*MsgDecollateralize) XXX_Unmarshal

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

type MsgDecollateralizeResponse

type MsgDecollateralizeResponse struct {
}

MsgDecollateralizeResponse defines the Msg/Decollateralize response type.

func (*MsgDecollateralizeResponse) Descriptor

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

func (*MsgDecollateralizeResponse) Marshal

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

func (*MsgDecollateralizeResponse) MarshalTo

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

func (*MsgDecollateralizeResponse) MarshalToSizedBuffer

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

func (*MsgDecollateralizeResponse) ProtoMessage

func (*MsgDecollateralizeResponse) ProtoMessage()

func (*MsgDecollateralizeResponse) Reset

func (m *MsgDecollateralizeResponse) Reset()

func (*MsgDecollateralizeResponse) Size

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

func (*MsgDecollateralizeResponse) String

func (m *MsgDecollateralizeResponse) String() string

func (*MsgDecollateralizeResponse) Unmarshal

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

func (*MsgDecollateralizeResponse) XXX_DiscardUnknown

func (m *MsgDecollateralizeResponse) XXX_DiscardUnknown()

func (*MsgDecollateralizeResponse) XXX_Marshal

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

func (*MsgDecollateralizeResponse) XXX_Merge

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

func (*MsgDecollateralizeResponse) XXX_MessageName

func (*MsgDecollateralizeResponse) XXX_MessageName() string

func (*MsgDecollateralizeResponse) XXX_Size

func (m *MsgDecollateralizeResponse) XXX_Size() int

func (*MsgDecollateralizeResponse) XXX_Unmarshal

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

type MsgLiquidate

type MsgLiquidate struct {
	// Liquidator is the account address performing a liquidation and the signer
	// of the message.
	Liquidator string `protobuf:"bytes,1,opt,name=liquidator,proto3" json:"liquidator,omitempty"`
	// Borrower is the account whose borrow is being repaid, and collateral consumed,
	// by the liquidation. It does not sign the message.
	Borrower string `protobuf:"bytes,2,opt,name=borrower,proto3" json:"borrower,omitempty"`
	// Repayment is the maximum amount of base tokens that the liquidator is willing
	// to repay.
	Repayment types.Coin `protobuf:"bytes,3,opt,name=repayment,proto3" json:"repayment"`
	// RewardDenom is the denom that the liquidator will receive as a liquidation reward.
	// If it is a uToken, the liquidator will receive uTokens from the borrower's
	// collateral. If it is a base token, the uTokens will be redeemed directly at
	// a reduced Liquidation Incentive, and the liquidator will receive base tokens.
	RewardDenom string `protobuf:"bytes,4,opt,name=reward_denom,json=rewardDenom,proto3" json:"reward_denom,omitempty"`
}

MsgLiquidate is the request structure for the Liquidate RPC.

func NewMsgLiquidate

func NewMsgLiquidate(liquidator, borrower sdk.AccAddress, repayment sdk.Coin, rewardDenom string) *MsgLiquidate

func (*MsgLiquidate) Descriptor

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

func (*MsgLiquidate) GetSignBytes

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

GetSignBytes get the bytes for the message signer to sign on

func (*MsgLiquidate) GetSigners

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

func (*MsgLiquidate) Marshal

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

func (*MsgLiquidate) MarshalTo

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

func (*MsgLiquidate) MarshalToSizedBuffer

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

func (*MsgLiquidate) ProtoMessage

func (*MsgLiquidate) ProtoMessage()

func (*MsgLiquidate) Reset

func (m *MsgLiquidate) Reset()

func (MsgLiquidate) Route

func (msg MsgLiquidate) Route() string

func (*MsgLiquidate) Size

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

func (*MsgLiquidate) String

func (m *MsgLiquidate) String() string

func (MsgLiquidate) Type

func (msg MsgLiquidate) Type() string

func (*MsgLiquidate) Unmarshal

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

func (*MsgLiquidate) ValidateBasic

func (msg *MsgLiquidate) ValidateBasic() error

func (*MsgLiquidate) XXX_DiscardUnknown

func (m *MsgLiquidate) XXX_DiscardUnknown()

func (*MsgLiquidate) XXX_Marshal

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

func (*MsgLiquidate) XXX_Merge

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

func (*MsgLiquidate) XXX_MessageName

func (*MsgLiquidate) XXX_MessageName() string

func (*MsgLiquidate) XXX_Size

func (m *MsgLiquidate) XXX_Size() int

func (*MsgLiquidate) XXX_Unmarshal

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

type MsgLiquidateResponse

type MsgLiquidateResponse struct {
	// Repaid is the amount of borrowed base tokens that the liquidator repaid
	// to the module on behalf of the borrower.
	Repaid types.Coin `protobuf:"bytes,1,opt,name=repaid,proto3" json:"repaid"`
	// Collateral is the amount of the borrower's uToken collateral that
	// was liquidated.
	Collateral types.Coin `protobuf:"bytes,2,opt,name=collateral,proto3" json:"collateral"`
	// Reward is the amount of base tokens that the liquidator received from
	// the module as reward for the liquidation.
	Reward types.Coin `protobuf:"bytes,3,opt,name=reward,proto3" json:"reward"`
}

MsgLiquidateResponse defines the Msg/Liquidate response type.

func (*MsgLiquidateResponse) Descriptor

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

func (*MsgLiquidateResponse) Marshal

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

func (*MsgLiquidateResponse) MarshalTo

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

func (*MsgLiquidateResponse) MarshalToSizedBuffer

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

func (*MsgLiquidateResponse) ProtoMessage

func (*MsgLiquidateResponse) ProtoMessage()

func (*MsgLiquidateResponse) Reset

func (m *MsgLiquidateResponse) Reset()

func (*MsgLiquidateResponse) Size

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

func (*MsgLiquidateResponse) String

func (m *MsgLiquidateResponse) String() string

func (*MsgLiquidateResponse) Unmarshal

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

func (*MsgLiquidateResponse) XXX_DiscardUnknown

func (m *MsgLiquidateResponse) XXX_DiscardUnknown()

func (*MsgLiquidateResponse) XXX_Marshal

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

func (*MsgLiquidateResponse) XXX_Merge

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

func (*MsgLiquidateResponse) XXX_MessageName

func (*MsgLiquidateResponse) XXX_MessageName() string

func (*MsgLiquidateResponse) XXX_Size

func (m *MsgLiquidateResponse) XXX_Size() int

func (*MsgLiquidateResponse) XXX_Unmarshal

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

type MsgRepay

type MsgRepay struct {
	// Borrower is the account address repaying a loan and the signer
	// of the message.
	Borrower string     `protobuf:"bytes,1,opt,name=borrower,proto3" json:"borrower,omitempty"`
	Asset    types.Coin `protobuf:"bytes,2,opt,name=asset,proto3" json:"asset"`
}

MsgRepay represents a user's request to repay a borrowed base asset type to the module.

func NewMsgRepay

func NewMsgRepay(borrower sdk.AccAddress, asset sdk.Coin) *MsgRepay

func (*MsgRepay) Descriptor

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

func (*MsgRepay) GetSignBytes

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

GetSignBytes get the bytes for the message signer to sign on

func (*MsgRepay) GetSigners

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

func (*MsgRepay) Marshal

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

func (*MsgRepay) MarshalTo

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

func (*MsgRepay) MarshalToSizedBuffer

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

func (*MsgRepay) ProtoMessage

func (*MsgRepay) ProtoMessage()

func (*MsgRepay) Reset

func (m *MsgRepay) Reset()

func (MsgRepay) Route

func (msg MsgRepay) Route() string

func (*MsgRepay) Size

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

func (*MsgRepay) String

func (m *MsgRepay) String() string

func (MsgRepay) Type

func (msg MsgRepay) Type() string

func (*MsgRepay) Unmarshal

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

func (*MsgRepay) ValidateBasic

func (msg *MsgRepay) ValidateBasic() error

func (*MsgRepay) XXX_DiscardUnknown

func (m *MsgRepay) XXX_DiscardUnknown()

func (*MsgRepay) XXX_Marshal

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

func (*MsgRepay) XXX_Merge

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

func (*MsgRepay) XXX_MessageName

func (*MsgRepay) XXX_MessageName() string

func (*MsgRepay) XXX_Size

func (m *MsgRepay) XXX_Size() int

func (*MsgRepay) XXX_Unmarshal

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

type MsgRepayResponse

type MsgRepayResponse struct {
	// Repaid is the amount of base tokens repaid to the module.
	Repaid types.Coin `protobuf:"bytes,1,opt,name=repaid,proto3" json:"repaid"`
}

MsgRepayResponse defines the Msg/Repay response type.

func (*MsgRepayResponse) Descriptor

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

func (*MsgRepayResponse) Marshal

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

func (*MsgRepayResponse) MarshalTo

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

func (*MsgRepayResponse) MarshalToSizedBuffer

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

func (*MsgRepayResponse) ProtoMessage

func (*MsgRepayResponse) ProtoMessage()

func (*MsgRepayResponse) Reset

func (m *MsgRepayResponse) Reset()

func (*MsgRepayResponse) Size

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

func (*MsgRepayResponse) String

func (m *MsgRepayResponse) String() string

func (*MsgRepayResponse) Unmarshal

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

func (*MsgRepayResponse) XXX_DiscardUnknown

func (m *MsgRepayResponse) XXX_DiscardUnknown()

func (*MsgRepayResponse) XXX_Marshal

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

func (*MsgRepayResponse) XXX_Merge

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

func (*MsgRepayResponse) XXX_MessageName

func (*MsgRepayResponse) XXX_MessageName() string

func (*MsgRepayResponse) XXX_Size

func (m *MsgRepayResponse) XXX_Size() int

func (*MsgRepayResponse) XXX_Unmarshal

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

type MsgServer

type MsgServer interface {
	// Supply moves tokens from user balance to the module for lending or collateral.
	// The user receives uTokens in return.
	Supply(context.Context, *MsgSupply) (*MsgSupplyResponse, error)
	// Withdraw moves previously supplied tokens from the module back to the user balance in
	// exchange for burning uTokens.
	Withdraw(context.Context, *MsgWithdraw) (*MsgWithdrawResponse, error)
	// Collateralize enables selected uTokens as collateral, which moves them to the module.
	Collateralize(context.Context, *MsgCollateralize) (*MsgCollateralizeResponse, error)
	// Decollateralize disables selected uTokens as collateral. They are returned to the user's
	// balance from the module.
	Decollateralize(context.Context, *MsgDecollateralize) (*MsgDecollateralizeResponse, error)
	// Borrow allows a user to borrow tokens from the module if they have sufficient collateral.
	Borrow(context.Context, *MsgBorrow) (*MsgBorrowResponse, error)
	// Repay allows a user to repay previously borrowed tokens and interest.
	Repay(context.Context, *MsgRepay) (*MsgRepayResponse, error)
	// Liquidate allows a user to repay a different user's borrowed coins in exchange for some
	// of the target's collateral.
	Liquidate(context.Context, *MsgLiquidate) (*MsgLiquidateResponse, error)
}

MsgServer is the server API for Msg service.

type MsgSupply

type MsgSupply struct {
	// Supplier is the account address supplying assets and the signer of the message.
	Supplier string     `protobuf:"bytes,1,opt,name=supplier,proto3" json:"supplier,omitempty"`
	Asset    types.Coin `protobuf:"bytes,2,opt,name=asset,proto3" json:"asset"`
}

MsgSupply represents a user's request to supply assets to the module.

func NewMsgSupply

func NewMsgSupply(supplier sdk.AccAddress, asset sdk.Coin) *MsgSupply

func (*MsgSupply) Descriptor

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

func (*MsgSupply) GetSignBytes

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

GetSignBytes get the bytes for the message signer to sign on

func (*MsgSupply) GetSigners

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

func (*MsgSupply) Marshal

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

func (*MsgSupply) MarshalTo

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

func (*MsgSupply) MarshalToSizedBuffer

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

func (*MsgSupply) ProtoMessage

func (*MsgSupply) ProtoMessage()

func (*MsgSupply) Reset

func (m *MsgSupply) Reset()

func (MsgSupply) Route

func (msg MsgSupply) Route() string

func (*MsgSupply) Size

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

func (*MsgSupply) String

func (m *MsgSupply) String() string

func (MsgSupply) Type

func (msg MsgSupply) Type() string

func (*MsgSupply) Unmarshal

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

func (*MsgSupply) ValidateBasic

func (msg *MsgSupply) ValidateBasic() error

func (*MsgSupply) XXX_DiscardUnknown

func (m *MsgSupply) XXX_DiscardUnknown()

func (*MsgSupply) XXX_Marshal

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

func (*MsgSupply) XXX_Merge

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

func (*MsgSupply) XXX_MessageName

func (*MsgSupply) XXX_MessageName() string

func (*MsgSupply) XXX_Size

func (m *MsgSupply) XXX_Size() int

func (*MsgSupply) XXX_Unmarshal

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

type MsgSupplyResponse

type MsgSupplyResponse struct {
	// Received is the amount of uTokens received.
	Received types.Coin `protobuf:"bytes,1,opt,name=received,proto3" json:"received"`
}

MsgSupplyResponse defines the Msg/Supply response type.

func (*MsgSupplyResponse) Descriptor

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

func (*MsgSupplyResponse) Marshal

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

func (*MsgSupplyResponse) MarshalTo

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

func (*MsgSupplyResponse) MarshalToSizedBuffer

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

func (*MsgSupplyResponse) ProtoMessage

func (*MsgSupplyResponse) ProtoMessage()

func (*MsgSupplyResponse) Reset

func (m *MsgSupplyResponse) Reset()

func (*MsgSupplyResponse) Size

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

func (*MsgSupplyResponse) String

func (m *MsgSupplyResponse) String() string

func (*MsgSupplyResponse) Unmarshal

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

func (*MsgSupplyResponse) XXX_DiscardUnknown

func (m *MsgSupplyResponse) XXX_DiscardUnknown()

func (*MsgSupplyResponse) XXX_Marshal

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

func (*MsgSupplyResponse) XXX_Merge

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

func (*MsgSupplyResponse) XXX_MessageName

func (*MsgSupplyResponse) XXX_MessageName() string

func (*MsgSupplyResponse) XXX_Size

func (m *MsgSupplyResponse) XXX_Size() int

func (*MsgSupplyResponse) XXX_Unmarshal

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

type MsgWithdraw

type MsgWithdraw struct {
	// Supplier is the account address withdrawing assets and the signer of the message.
	Supplier string     `protobuf:"bytes,1,opt,name=supplier,proto3" json:"supplier,omitempty"`
	Asset    types.Coin `protobuf:"bytes,2,opt,name=asset,proto3" json:"asset"`
}

MsgWithdraw represents a user's request to withdraw supplied assets. Asset must be a uToken.

func NewMsgWithdraw

func NewMsgWithdraw(supplier sdk.AccAddress, asset sdk.Coin) *MsgWithdraw

func (*MsgWithdraw) Descriptor

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

func (*MsgWithdraw) GetSignBytes

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

GetSignBytes get the bytes for the message signer to sign on

func (*MsgWithdraw) GetSigners

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

func (*MsgWithdraw) Marshal

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

func (*MsgWithdraw) MarshalTo

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

func (*MsgWithdraw) MarshalToSizedBuffer

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

func (*MsgWithdraw) ProtoMessage

func (*MsgWithdraw) ProtoMessage()

func (*MsgWithdraw) Reset

func (m *MsgWithdraw) Reset()

func (MsgWithdraw) Route

func (msg MsgWithdraw) Route() string

func (*MsgWithdraw) Size

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

func (*MsgWithdraw) String

func (m *MsgWithdraw) String() string

func (MsgWithdraw) Type

func (msg MsgWithdraw) Type() string

func (*MsgWithdraw) Unmarshal

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

func (*MsgWithdraw) ValidateBasic

func (msg *MsgWithdraw) ValidateBasic() error

func (*MsgWithdraw) XXX_DiscardUnknown

func (m *MsgWithdraw) XXX_DiscardUnknown()

func (*MsgWithdraw) XXX_Marshal

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

func (*MsgWithdraw) XXX_Merge

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

func (*MsgWithdraw) XXX_MessageName

func (*MsgWithdraw) XXX_MessageName() string

func (*MsgWithdraw) XXX_Size

func (m *MsgWithdraw) XXX_Size() int

func (*MsgWithdraw) XXX_Unmarshal

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

type MsgWithdrawResponse

type MsgWithdrawResponse struct {
	// Received is the amount of base tokens received.
	Received types.Coin `protobuf:"bytes,1,opt,name=received,proto3" json:"received"`
}

MsgWithdrawResponse defines the Msg/Withdraw response type.

func (*MsgWithdrawResponse) Descriptor

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

func (*MsgWithdrawResponse) Marshal

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

func (*MsgWithdrawResponse) MarshalTo

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

func (*MsgWithdrawResponse) MarshalToSizedBuffer

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

func (*MsgWithdrawResponse) ProtoMessage

func (*MsgWithdrawResponse) ProtoMessage()

func (*MsgWithdrawResponse) Reset

func (m *MsgWithdrawResponse) Reset()

func (*MsgWithdrawResponse) Size

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

func (*MsgWithdrawResponse) String

func (m *MsgWithdrawResponse) String() string

func (*MsgWithdrawResponse) Unmarshal

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

func (*MsgWithdrawResponse) XXX_DiscardUnknown

func (m *MsgWithdrawResponse) XXX_DiscardUnknown()

func (*MsgWithdrawResponse) XXX_Marshal

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

func (*MsgWithdrawResponse) XXX_Merge

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

func (*MsgWithdrawResponse) XXX_MessageName

func (*MsgWithdrawResponse) XXX_MessageName() string

func (*MsgWithdrawResponse) XXX_Size

func (m *MsgWithdrawResponse) XXX_Size() int

func (*MsgWithdrawResponse) XXX_Unmarshal

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

type MultiHooks

type MultiHooks []Hooks

MultiHooks defines a type alias for multiple hooks, i.e. for multiple keepers to execute x/leverage hooks.

func NewMultiHooks

func NewMultiHooks(hooks ...Hooks) MultiHooks

func (MultiHooks) AfterRegisteredTokenRemoved

func (mh MultiHooks) AfterRegisteredTokenRemoved(ctx sdk.Context, token Token)

func (MultiHooks) AfterTokenRegistered

func (mh MultiHooks) AfterTokenRegistered(ctx sdk.Context, token Token)

type OracleKeeper

type OracleKeeper interface {
	GetExchangeRate(ctx sdk.Context, denom string) (sdk.Dec, error)
	GetExchangeRateBase(ctx sdk.Context, denom string) (sdk.Dec, error)
}

OracleKeeper defines the expected x/oracle keeper interface.

type Params

type Params struct {
	// Complete Liquidation Threshold determines how far over their borrow
	// limit a borrower must be in order for their positions to be liquidated
	// fully in a single event.
	CompleteLiquidationThreshold github_com_cosmos_cosmos_sdk_types.Dec `` /* 225-byte string literal not displayed */
	// Minimum Close Factor determines the portion of a borrower's position
	// that can be liquidated in a single event, when the borrower is just barely
	// over their borrow limit.
	MinimumCloseFactor github_com_cosmos_cosmos_sdk_types.Dec `` /* 185-byte string literal not displayed */
	// Oracle Reward Factor determines the portion of interest accrued on
	// borrows that is sent to the oracle module to fund its reward pool.
	OracleRewardFactor github_com_cosmos_cosmos_sdk_types.Dec `` /* 185-byte string literal not displayed */
	// Small Liquidation Size determines the USD value at which a borrow is
	// considered small enough to be liquidated in a single transaction, bypassing
	// dynamic close factor.
	SmallLiquidationSize github_com_cosmos_cosmos_sdk_types.Dec `` /* 193-byte string literal not displayed */
	// Direct Liquidation Fee is a reduction factor in liquidation incentive
	// experienced by liquidators who choose to receive base assets instead of
	// uTokens as liquidation rewards.
	DirectLiquidationFee github_com_cosmos_cosmos_sdk_types.Dec `` /* 193-byte string literal not displayed */
}

Params defines the parameters for the leverage module.

func DefaultParams

func DefaultParams() Params

DefaultParams returns a default set of parameters.

func NewParams

func NewParams() Params

func (*Params) Descriptor

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

func (*Params) Marshal

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

func (*Params) MarshalTo

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

func (*Params) MarshalToSizedBuffer

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

func (*Params) ParamSetPairs

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

ParamSetPairs implements the ParamSet interface and returns all the key/value pairs pairs of x/leverage module's parameters.

func (*Params) ProtoMessage

func (*Params) ProtoMessage()

func (*Params) Reset

func (m *Params) Reset()

func (*Params) Size

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

func (Params) String

func (p Params) String() string

String implements the Stringer interface.

func (*Params) Unmarshal

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

func (Params) Validate

func (p Params) Validate() error

validate a set of params

func (*Params) XXX_DiscardUnknown

func (m *Params) XXX_DiscardUnknown()

func (*Params) XXX_Marshal

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

func (*Params) XXX_Merge

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

func (*Params) XXX_Size

func (m *Params) XXX_Size() int

func (*Params) XXX_Unmarshal

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

type QueryAccountBalances

type QueryAccountBalances struct {
	Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"`
}

QueryAccountBalances defines the request structure for the AccountBalances gRPC service handler.

func (*QueryAccountBalances) Descriptor

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

func (*QueryAccountBalances) Marshal

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

func (*QueryAccountBalances) MarshalTo

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

func (*QueryAccountBalances) MarshalToSizedBuffer

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

func (*QueryAccountBalances) ProtoMessage

func (*QueryAccountBalances) ProtoMessage()

func (*QueryAccountBalances) Reset

func (m *QueryAccountBalances) Reset()

func (*QueryAccountBalances) Size

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

func (*QueryAccountBalances) String

func (m *QueryAccountBalances) String() string

func (*QueryAccountBalances) Unmarshal

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

func (*QueryAccountBalances) XXX_DiscardUnknown

func (m *QueryAccountBalances) XXX_DiscardUnknown()

func (*QueryAccountBalances) XXX_Marshal

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

func (*QueryAccountBalances) XXX_Merge

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

func (*QueryAccountBalances) XXX_Size

func (m *QueryAccountBalances) XXX_Size() int

func (*QueryAccountBalances) XXX_Unmarshal

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

type QueryAccountBalancesResponse

type QueryAccountBalancesResponse struct {
	// Supplied contains all tokens the account has supplied, including interest earned. It is denominated in base tokens, so exponent from each coin's registered_tokens entry must be applied to convert to symbol denom.
	Supplied github_com_cosmos_cosmos_sdk_types.Coins `protobuf:"bytes,1,rep,name=supplied,proto3,castrepeated=github.com/cosmos/cosmos-sdk/types.Coins" json:"supplied"`
	// Collateral contains all uTokens the account has collateralized. It is denominated in uTokens, so both exponent and uToken exchange rate from each coin's market_summary must be applied to convert to base token symbol denom.
	Collateral github_com_cosmos_cosmos_sdk_types.Coins `protobuf:"bytes,2,rep,name=collateral,proto3,castrepeated=github.com/cosmos/cosmos-sdk/types.Coins" json:"collateral"`
	// Borrowed contains all tokens the account has borrowed, including interest owed. It is denominated in base tokens, so exponent from each coin's registered_tokens entry must be applied to convert to symbol denom.
	Borrowed github_com_cosmos_cosmos_sdk_types.Coins `protobuf:"bytes,3,rep,name=borrowed,proto3,castrepeated=github.com/cosmos/cosmos-sdk/types.Coins" json:"borrowed"`
}

QueryAccountBalancesResponse defines the response structure for the AccountBalances gRPC service handler.

func (*QueryAccountBalancesResponse) Descriptor

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

func (*QueryAccountBalancesResponse) Marshal

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

func (*QueryAccountBalancesResponse) MarshalTo

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

func (*QueryAccountBalancesResponse) MarshalToSizedBuffer

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

func (*QueryAccountBalancesResponse) ProtoMessage

func (*QueryAccountBalancesResponse) ProtoMessage()

func (*QueryAccountBalancesResponse) Reset

func (m *QueryAccountBalancesResponse) Reset()

func (*QueryAccountBalancesResponse) Size

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

func (*QueryAccountBalancesResponse) String

func (*QueryAccountBalancesResponse) Unmarshal

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

func (*QueryAccountBalancesResponse) XXX_DiscardUnknown

func (m *QueryAccountBalancesResponse) XXX_DiscardUnknown()

func (*QueryAccountBalancesResponse) XXX_Marshal

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

func (*QueryAccountBalancesResponse) XXX_Merge

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

func (*QueryAccountBalancesResponse) XXX_Size

func (m *QueryAccountBalancesResponse) XXX_Size() int

func (*QueryAccountBalancesResponse) XXX_Unmarshal

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

type QueryAccountSummary

type QueryAccountSummary struct {
	Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"`
}

QueryAccountSummary defines the request structure for the AccountSummary gRPC service handler.

func (*QueryAccountSummary) Descriptor

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

func (*QueryAccountSummary) Marshal

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

func (*QueryAccountSummary) MarshalTo

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

func (*QueryAccountSummary) MarshalToSizedBuffer

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

func (*QueryAccountSummary) ProtoMessage

func (*QueryAccountSummary) ProtoMessage()

func (*QueryAccountSummary) Reset

func (m *QueryAccountSummary) Reset()

func (*QueryAccountSummary) Size

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

func (*QueryAccountSummary) String

func (m *QueryAccountSummary) String() string

func (*QueryAccountSummary) Unmarshal

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

func (*QueryAccountSummary) XXX_DiscardUnknown

func (m *QueryAccountSummary) XXX_DiscardUnknown()

func (*QueryAccountSummary) XXX_Marshal

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

func (*QueryAccountSummary) XXX_Merge

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

func (*QueryAccountSummary) XXX_Size

func (m *QueryAccountSummary) XXX_Size() int

func (*QueryAccountSummary) XXX_Unmarshal

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

type QueryAccountSummaryResponse

type QueryAccountSummaryResponse struct {
	// Supplied Value is the sum of the USD value of all tokens the account has supplied, includng interest earned.
	SuppliedValue github_com_cosmos_cosmos_sdk_types.Dec `` /* 140-byte string literal not displayed */
	// Collateral Value is the sum of the USD value of all uTokens the account has collateralized.
	CollateralValue github_com_cosmos_cosmos_sdk_types.Dec `` /* 146-byte string literal not displayed */
	// Borrowed Value is the sum of the USD value of all tokens the account has borrowed, including interest owed.
	BorrowedValue github_com_cosmos_cosmos_sdk_types.Dec `` /* 140-byte string literal not displayed */
	// Borrow Limit is the maximum Borrowed Value the account is allowed to reach through direct borrowing.
	BorrowLimit github_com_cosmos_cosmos_sdk_types.Dec `` /* 134-byte string literal not displayed */
	// Liquidation Threshold is the Borrowed Value at which the account becomes eligible for liquidation.
	LiquidationThreshold github_com_cosmos_cosmos_sdk_types.Dec `` /* 161-byte string literal not displayed */
}

QueryAccountSummaryResponse defines the response structure for the AccountSummary gRPC service handler.

func (*QueryAccountSummaryResponse) Descriptor

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

func (*QueryAccountSummaryResponse) Marshal

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

func (*QueryAccountSummaryResponse) MarshalTo

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

func (*QueryAccountSummaryResponse) MarshalToSizedBuffer

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

func (*QueryAccountSummaryResponse) ProtoMessage

func (*QueryAccountSummaryResponse) ProtoMessage()

func (*QueryAccountSummaryResponse) Reset

func (m *QueryAccountSummaryResponse) Reset()

func (*QueryAccountSummaryResponse) Size

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

func (*QueryAccountSummaryResponse) String

func (m *QueryAccountSummaryResponse) String() string

func (*QueryAccountSummaryResponse) Unmarshal

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

func (*QueryAccountSummaryResponse) XXX_DiscardUnknown

func (m *QueryAccountSummaryResponse) XXX_DiscardUnknown()

func (*QueryAccountSummaryResponse) XXX_Marshal

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

func (*QueryAccountSummaryResponse) XXX_Merge

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

func (*QueryAccountSummaryResponse) XXX_Size

func (m *QueryAccountSummaryResponse) XXX_Size() int

func (*QueryAccountSummaryResponse) XXX_Unmarshal

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

type QueryBadDebts

type QueryBadDebts struct {
}

QueryBadDebts defines the request structure for the BedDebts gRPC service handler.

func (*QueryBadDebts) Descriptor

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

func (*QueryBadDebts) Marshal

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

func (*QueryBadDebts) MarshalTo

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

func (*QueryBadDebts) MarshalToSizedBuffer

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

func (*QueryBadDebts) ProtoMessage

func (*QueryBadDebts) ProtoMessage()

func (*QueryBadDebts) Reset

func (m *QueryBadDebts) Reset()

func (*QueryBadDebts) Size

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

func (*QueryBadDebts) String

func (m *QueryBadDebts) String() string

func (*QueryBadDebts) Unmarshal

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

func (*QueryBadDebts) XXX_DiscardUnknown

func (m *QueryBadDebts) XXX_DiscardUnknown()

func (*QueryBadDebts) XXX_Marshal

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

func (*QueryBadDebts) XXX_Merge

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

func (*QueryBadDebts) XXX_Size

func (m *QueryBadDebts) XXX_Size() int

func (*QueryBadDebts) XXX_Unmarshal

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

type QueryBadDebtsResponse

type QueryBadDebtsResponse struct {
	// Targets are borrow positions currently marked for bad debt repayment. Each contains an Address and a Denom.
	Targets []BadDebt `protobuf:"bytes,1,rep,name=targets,proto3" json:"targets"`
}

QueryBadDebtsResponse defines the response structure for the BedDebts gRPC service handler.

func (*QueryBadDebtsResponse) Descriptor

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

func (*QueryBadDebtsResponse) Marshal

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

func (*QueryBadDebtsResponse) MarshalTo

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

func (*QueryBadDebtsResponse) MarshalToSizedBuffer

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

func (*QueryBadDebtsResponse) ProtoMessage

func (*QueryBadDebtsResponse) ProtoMessage()

func (*QueryBadDebtsResponse) Reset

func (m *QueryBadDebtsResponse) Reset()

func (*QueryBadDebtsResponse) Size

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

func (*QueryBadDebtsResponse) String

func (m *QueryBadDebtsResponse) String() string

func (*QueryBadDebtsResponse) Unmarshal

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

func (*QueryBadDebtsResponse) XXX_DiscardUnknown

func (m *QueryBadDebtsResponse) XXX_DiscardUnknown()

func (*QueryBadDebtsResponse) XXX_Marshal

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

func (*QueryBadDebtsResponse) XXX_Merge

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

func (*QueryBadDebtsResponse) XXX_Size

func (m *QueryBadDebtsResponse) XXX_Size() int

func (*QueryBadDebtsResponse) XXX_Unmarshal

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

type QueryClient

type QueryClient interface {
	// Params queries the parameters of the x/leverage module.
	Params(ctx context.Context, in *QueryParams, opts ...grpc.CallOption) (*QueryParamsResponse, error)
	// RegisteredTokens queries for all the registered tokens.
	RegisteredTokens(ctx context.Context, in *QueryRegisteredTokens, opts ...grpc.CallOption) (*QueryRegisteredTokensResponse, error)
	// MarketSummary queries a base asset's current borrowing and supplying conditions.
	MarketSummary(ctx context.Context, in *QueryMarketSummary, opts ...grpc.CallOption) (*QueryMarketSummaryResponse, error)
	// AccountBalances queries an account's current supply, collateral, and borrow positions.
	AccountBalances(ctx context.Context, in *QueryAccountBalances, opts ...grpc.CallOption) (*QueryAccountBalancesResponse, error)
	// AccountSummary queries USD values representing an account's total positions and borrowing limits. It requires oracle prices to return successfully.
	AccountSummary(ctx context.Context, in *QueryAccountSummary, opts ...grpc.CallOption) (*QueryAccountSummaryResponse, error)
	// LiquidationTargets queries a list of all borrower account addresses eligible for liquidation.
	LiquidationTargets(ctx context.Context, in *QueryLiquidationTargets, opts ...grpc.CallOption) (*QueryLiquidationTargetsResponse, error)
	// BadDebts queries a list of borrow positions that have been marked for bad debt repayment.
	BadDebts(ctx context.Context, in *QueryBadDebts, opts ...grpc.CallOption) (*QueryBadDebtsResponse, 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 QueryLiquidationTargets

type QueryLiquidationTargets struct {
}

QueryLiquidationTargets defines the request structure for the LiquidationTargets gRPC service handler.

func (*QueryLiquidationTargets) Descriptor

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

func (*QueryLiquidationTargets) Marshal

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

func (*QueryLiquidationTargets) MarshalTo

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

func (*QueryLiquidationTargets) MarshalToSizedBuffer

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

func (*QueryLiquidationTargets) ProtoMessage

func (*QueryLiquidationTargets) ProtoMessage()

func (*QueryLiquidationTargets) Reset

func (m *QueryLiquidationTargets) Reset()

func (*QueryLiquidationTargets) Size

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

func (*QueryLiquidationTargets) String

func (m *QueryLiquidationTargets) String() string

func (*QueryLiquidationTargets) Unmarshal

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

func (*QueryLiquidationTargets) XXX_DiscardUnknown

func (m *QueryLiquidationTargets) XXX_DiscardUnknown()

func (*QueryLiquidationTargets) XXX_Marshal

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

func (*QueryLiquidationTargets) XXX_Merge

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

func (*QueryLiquidationTargets) XXX_Size

func (m *QueryLiquidationTargets) XXX_Size() int

func (*QueryLiquidationTargets) XXX_Unmarshal

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

type QueryLiquidationTargetsResponse

type QueryLiquidationTargetsResponse struct {
	// Targets are the addresses of borrowers eligible for liquidation.
	Targets []string `protobuf:"bytes,1,rep,name=targets,proto3" json:"targets,omitempty"`
}

QueryLiquidationTargetsResponse defines the response structure for the LiquidationTargets gRPC service handler.

func (*QueryLiquidationTargetsResponse) Descriptor

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

func (*QueryLiquidationTargetsResponse) Marshal

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

func (*QueryLiquidationTargetsResponse) MarshalTo

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

func (*QueryLiquidationTargetsResponse) MarshalToSizedBuffer

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

func (*QueryLiquidationTargetsResponse) ProtoMessage

func (*QueryLiquidationTargetsResponse) ProtoMessage()

func (*QueryLiquidationTargetsResponse) Reset

func (*QueryLiquidationTargetsResponse) Size

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

func (*QueryLiquidationTargetsResponse) String

func (*QueryLiquidationTargetsResponse) Unmarshal

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

func (*QueryLiquidationTargetsResponse) XXX_DiscardUnknown

func (m *QueryLiquidationTargetsResponse) XXX_DiscardUnknown()

func (*QueryLiquidationTargetsResponse) XXX_Marshal

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

func (*QueryLiquidationTargetsResponse) XXX_Merge

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

func (*QueryLiquidationTargetsResponse) XXX_Size

func (m *QueryLiquidationTargetsResponse) XXX_Size() int

func (*QueryLiquidationTargetsResponse) XXX_Unmarshal

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

type QueryMarketSummary

type QueryMarketSummary struct {
	Denom string `protobuf:"bytes,1,opt,name=denom,proto3" json:"denom,omitempty"`
}

QueryMarketSummary defines the request structure for the MarketSummary gRPC service handler.

func (*QueryMarketSummary) Descriptor

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

func (*QueryMarketSummary) Marshal

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

func (*QueryMarketSummary) MarshalTo

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

func (*QueryMarketSummary) MarshalToSizedBuffer

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

func (*QueryMarketSummary) ProtoMessage

func (*QueryMarketSummary) ProtoMessage()

func (*QueryMarketSummary) Reset

func (m *QueryMarketSummary) Reset()

func (*QueryMarketSummary) Size

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

func (*QueryMarketSummary) String

func (m *QueryMarketSummary) String() string

func (*QueryMarketSummary) Unmarshal

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

func (*QueryMarketSummary) XXX_DiscardUnknown

func (m *QueryMarketSummary) XXX_DiscardUnknown()

func (*QueryMarketSummary) XXX_Marshal

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

func (*QueryMarketSummary) XXX_Merge

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

func (*QueryMarketSummary) XXX_Size

func (m *QueryMarketSummary) XXX_Size() int

func (*QueryMarketSummary) XXX_Unmarshal

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

type QueryMarketSummaryResponse

type QueryMarketSummaryResponse struct {
	// Symbol Denom is the human-readable representation of a token denom, for example "UMEE" or "ATOM".
	SymbolDenom string `protobuf:"bytes,1,opt,name=symbol_denom,json=symbolDenom,proto3" json:"symbol_denom,omitempty"`
	// Exponent is the power of ten required to get from base denom to symbol denom. For example, an exponent of 6 means 10^6 uumee = 1 UMEE.
	Exponent uint32 `protobuf:"varint,2,opt,name=exponent,proto3" json:"exponent,omitempty"`
	// Oracle Price is the current USD value of a base token. Exponent must be applied to reach the price from symbol_denom. For example, a price of $0.000001 for 1 uumee is equivalent to $1.00 for 1 UMEE. Oracle price is nil when the oracle is down.
	OraclePrice *github_com_cosmos_cosmos_sdk_types.Dec `` /* 144-byte string literal not displayed */
	// uToken Exchange Rate is the amount of base tokens received when withdrawing 1 uToken. For example, a uToken exchange rate of 1.5 means a supplier receives 3 uumee for every 2 u/uumee they wish to withdraw. The same applies in reverse: supplying 3 uumee would award 2 u/uumee at that time.
	UTokenExchangeRate github_com_cosmos_cosmos_sdk_types.Dec `` /* 157-byte string literal not displayed */
	// Supply APY is the current interest rate suppliers are receiving for their deposits. For example, 0.11 would mean 11% APY. Supply APY is always less than borrow APY.
	Supply_APY github_com_cosmos_cosmos_sdk_types.Dec `` /* 128-byte string literal not displayed */
	// Borrow APY is the current interest rate borrowers are being charged on their loans. For example, 0.2 would mean 20% APY.
	Borrow_APY github_com_cosmos_cosmos_sdk_types.Dec `` /* 128-byte string literal not displayed */
	// Supplied is the total amount of tokens supplied to the the system by all suppliers, including any interest earned. This includes that tokens which have been borrowed out or enabled as collateral, but excludes reserves. Supplied is denominated in base tokens, so exponent must be applied to convert to symbol denom.
	Supplied github_com_cosmos_cosmos_sdk_types.Int `protobuf:"bytes,7,opt,name=supplied,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"supplied"`
	// Reserved is the total amount of tokens held in reserve by the module for emergencies. Reserves are always excluded from total supply, borrow, collateral, and liqduidity queries. Reserves are denominated in base tokens, so exponent must be applied to convert to symbol denom.
	Reserved github_com_cosmos_cosmos_sdk_types.Int `protobuf:"bytes,8,opt,name=reserved,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"reserved"`
	// Collateral is the total amount of uTokens collateralized by all borrowers. Collateral is denominated in uTokenso, so both uToken exchange rate and exponent must also be applied to convert to symbol denom. For example, if collateral is 4000000 u/uumee and uToken exhange rate is 1.2, then 5 UMEE have been collateralized.
	Collateral github_com_cosmos_cosmos_sdk_types.Int `protobuf:"bytes,9,opt,name=collateral,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"collateral"`
	// Borrowed is the total amount of debt in this token held across all borrowers. It is denominated in base tokens, so exponent must be applied to convert to symbol denom.
	Borrowed github_com_cosmos_cosmos_sdk_types.Int `protobuf:"bytes,10,opt,name=borrowed,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"borrowed"`
	// Liquidity is the amount of a token that has been supplied but not yet borrowed or reserved. It is denominated in base tokens, so exponent must be applied to convert to symbol denom.
	Liquidity github_com_cosmos_cosmos_sdk_types.Int `protobuf:"bytes,11,opt,name=liquidity,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"liquidity"`
	// Maximum Borrow is the amount of a token that is available for borrowing, including that which has already been borrowed out. This amount is less than total supply due to safety limits. It is denominated in base tokens, so exponent must be applied to convert to symbol denom. For example, if borrowed is 3000000 uumee and maximum borrow is 4000000 uumee, then 1 UMEE is currently available for borrowing.
	MaximumBorrow github_com_cosmos_cosmos_sdk_types.Int `` /* 141-byte string literal not displayed */
	// Maximum Collateral is the amount of a token that can be collateralized, including that which is already collateral. This amount is less than total supply due to safety limits. It is denominated in uTokens, so both uToken exchange rate and exponent must be applied to convert to symbol denom. For example, if collateral is 4000000 u/uumee, uToken exhange rate is 1.2, and maximum borrow is 7000000 uumee, then a maximum of 2 additional UMEE is permitted to be collateralized.
	MaximumCollateral github_com_cosmos_cosmos_sdk_types.Int `` /* 153-byte string literal not displayed */
	// Mimimum Liquidity is the minimum amount of liquidity in the module required by safety limits, based on the current collateral. It is denominated in base tokens, so exponent must be applied to convert to symbol denom. For example, if liquidity is 9000000 uumee and minimum liquidity is 8000000 uumee, then a maximum of 1 additional UMEE is currently available for borrowing or withdrawal.
	MinimumLiquidity github_com_cosmos_cosmos_sdk_types.Int `` /* 150-byte string literal not displayed */
	// uToken Supply is the total amount of a base token's associated uToken in circulation.
	UTokenSupply github_com_cosmos_cosmos_sdk_types.Int `` /* 138-byte string literal not displayed */
	// Available Borrow is the maximum additional amount of base tokens than can be borrowed based on current liquidity and system safety limits. It can also be calculated by MIN(maximum_borrow - borrowed, liquidity - minimum_liquidity). It is denominated in base tokens, so exponent must be applied to convert to symbol denom. A negative availability means safety limits have been exceeded and borrowing is temporarily unavailable.
	AvailableBorrow github_com_cosmos_cosmos_sdk_types.Int `` /* 147-byte string literal not displayed */
	// Available Withdraw is the maximum amount of uTokens than can currently be withdrawn based on liquidity and system safety limits. It can also be calculated by (liquidity - minimum_liquidity). It is denominated in uTokens, so both uToken exchange rate and exponent must be applied to convert to symbol denom. A negative availability means safety limits have been exceeded and withdrawal is temporarily unavailable.
	AvailableWithdraw github_com_cosmos_cosmos_sdk_types.Int `` /* 153-byte string literal not displayed */
	// Available Collateralize is the maximum additional amount of uTokens than can be collateralized based on current liquidity and system safety limits. It can also be calculated by (maximum_collateral, - collateral). It is denominated in uTokens, so both uToken exchange rate and exponent must be applied to convert to symbol denom. A negative availability means safety limits have been exceeded and additional collateral cannot be created until more liquidity is present.
	AvailableCollateralize github_com_cosmos_cosmos_sdk_types.Int `` /* 168-byte string literal not displayed */
}

QueryMarketSummaryResponse defines the response structure for the MarketSummary gRPC service handler.

func (*QueryMarketSummaryResponse) Descriptor

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

func (*QueryMarketSummaryResponse) Marshal

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

func (*QueryMarketSummaryResponse) MarshalTo

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

func (*QueryMarketSummaryResponse) MarshalToSizedBuffer

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

func (*QueryMarketSummaryResponse) ProtoMessage

func (*QueryMarketSummaryResponse) ProtoMessage()

func (*QueryMarketSummaryResponse) Reset

func (m *QueryMarketSummaryResponse) Reset()

func (*QueryMarketSummaryResponse) Size

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

func (*QueryMarketSummaryResponse) String

func (m *QueryMarketSummaryResponse) String() string

func (*QueryMarketSummaryResponse) Unmarshal

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

func (*QueryMarketSummaryResponse) XXX_DiscardUnknown

func (m *QueryMarketSummaryResponse) XXX_DiscardUnknown()

func (*QueryMarketSummaryResponse) XXX_Marshal

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

func (*QueryMarketSummaryResponse) XXX_Merge

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

func (*QueryMarketSummaryResponse) XXX_Size

func (m *QueryMarketSummaryResponse) XXX_Size() int

func (*QueryMarketSummaryResponse) XXX_Unmarshal

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

type QueryParams

type QueryParams struct {
}

QueryParams defines the request structure for the Params gRPC service handler.

func (*QueryParams) Descriptor

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

func (*QueryParams) Marshal

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

func (*QueryParams) MarshalTo

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

func (*QueryParams) MarshalToSizedBuffer

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

func (*QueryParams) ProtoMessage

func (*QueryParams) ProtoMessage()

func (*QueryParams) Reset

func (m *QueryParams) Reset()

func (*QueryParams) Size

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

func (*QueryParams) String

func (m *QueryParams) String() string

func (*QueryParams) Unmarshal

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

func (*QueryParams) XXX_DiscardUnknown

func (m *QueryParams) XXX_DiscardUnknown()

func (*QueryParams) XXX_Marshal

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

func (*QueryParams) XXX_Merge

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

func (*QueryParams) XXX_Size

func (m *QueryParams) XXX_Size() int

func (*QueryParams) XXX_Unmarshal

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

type QueryParamsResponse

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

QueryParamsResponse defines the response structure for the Params gRPC service handler.

func (*QueryParamsResponse) Descriptor

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

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 QueryRegisteredTokens

type QueryRegisteredTokens struct {
}

QueryRegisteredTokens defines the request structure for the RegisteredTokens gRPC service handler.

func (*QueryRegisteredTokens) Descriptor

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

func (*QueryRegisteredTokens) Marshal

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

func (*QueryRegisteredTokens) MarshalTo

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

func (*QueryRegisteredTokens) MarshalToSizedBuffer

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

func (*QueryRegisteredTokens) ProtoMessage

func (*QueryRegisteredTokens) ProtoMessage()

func (*QueryRegisteredTokens) Reset

func (m *QueryRegisteredTokens) Reset()

func (*QueryRegisteredTokens) Size

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

func (*QueryRegisteredTokens) String

func (m *QueryRegisteredTokens) String() string

func (*QueryRegisteredTokens) Unmarshal

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

func (*QueryRegisteredTokens) XXX_DiscardUnknown

func (m *QueryRegisteredTokens) XXX_DiscardUnknown()

func (*QueryRegisteredTokens) XXX_Marshal

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

func (*QueryRegisteredTokens) XXX_Merge

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

func (*QueryRegisteredTokens) XXX_Size

func (m *QueryRegisteredTokens) XXX_Size() int

func (*QueryRegisteredTokens) XXX_Unmarshal

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

type QueryRegisteredTokensResponse

type QueryRegisteredTokensResponse struct {
	Registry []Token `protobuf:"bytes,1,rep,name=registry,proto3" json:"registry"`
}

QueryRegisteredTokensResponse defines the response structure for the RegisteredTokens gRPC service handler.

func (*QueryRegisteredTokensResponse) Descriptor

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

func (*QueryRegisteredTokensResponse) Marshal

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

func (*QueryRegisteredTokensResponse) MarshalTo

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

func (*QueryRegisteredTokensResponse) MarshalToSizedBuffer

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

func (*QueryRegisteredTokensResponse) ProtoMessage

func (*QueryRegisteredTokensResponse) ProtoMessage()

func (*QueryRegisteredTokensResponse) Reset

func (m *QueryRegisteredTokensResponse) Reset()

func (*QueryRegisteredTokensResponse) Size

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

func (*QueryRegisteredTokensResponse) String

func (*QueryRegisteredTokensResponse) Unmarshal

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

func (*QueryRegisteredTokensResponse) XXX_DiscardUnknown

func (m *QueryRegisteredTokensResponse) XXX_DiscardUnknown()

func (*QueryRegisteredTokensResponse) XXX_Marshal

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

func (*QueryRegisteredTokensResponse) XXX_Merge

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

func (*QueryRegisteredTokensResponse) XXX_Size

func (m *QueryRegisteredTokensResponse) XXX_Size() int

func (*QueryRegisteredTokensResponse) XXX_Unmarshal

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

type QueryServer

type QueryServer interface {
	// Params queries the parameters of the x/leverage module.
	Params(context.Context, *QueryParams) (*QueryParamsResponse, error)
	// RegisteredTokens queries for all the registered tokens.
	RegisteredTokens(context.Context, *QueryRegisteredTokens) (*QueryRegisteredTokensResponse, error)
	// MarketSummary queries a base asset's current borrowing and supplying conditions.
	MarketSummary(context.Context, *QueryMarketSummary) (*QueryMarketSummaryResponse, error)
	// AccountBalances queries an account's current supply, collateral, and borrow positions.
	AccountBalances(context.Context, *QueryAccountBalances) (*QueryAccountBalancesResponse, error)
	// AccountSummary queries USD values representing an account's total positions and borrowing limits. It requires oracle prices to return successfully.
	AccountSummary(context.Context, *QueryAccountSummary) (*QueryAccountSummaryResponse, error)
	// LiquidationTargets queries a list of all borrower account addresses eligible for liquidation.
	LiquidationTargets(context.Context, *QueryLiquidationTargets) (*QueryLiquidationTargetsResponse, error)
	// BadDebts queries a list of borrow positions that have been marked for bad debt repayment.
	BadDebts(context.Context, *QueryBadDebts) (*QueryBadDebtsResponse, error)
}

QueryServer is the server API for Query service.

type Token

type Token struct {
	// Base Denom is the denomination of the underlying base token.
	BaseDenom string `protobuf:"bytes,1,opt,name=base_denom,json=baseDenom,proto3" json:"base_denom,omitempty" yaml:"base_denom"`
	// Reserve Factor defines what portion of accrued interest goes to reserves
	// when this token is borrowed.
	ReserveFactor github_com_cosmos_cosmos_sdk_types.Dec `` /* 162-byte string literal not displayed */
	// Collateral Weight defines what portion of the total value of the asset
	// can contribute to a users borrowing power. If the collateral weight is
	// zero, using this asset as collateral against borrowing will be disabled.
	CollateralWeight github_com_cosmos_cosmos_sdk_types.Dec `` /* 174-byte string literal not displayed */
	// Liquidation Threshold defines what amount of the total value of the
	// asset can contribute to a user's liquidation threshold (above which they
	// become eligible for liquidation).
	LiquidationThreshold github_com_cosmos_cosmos_sdk_types.Dec `` /* 190-byte string literal not displayed */
	// Base Borrow Rate defines the minimum interest rate for borrowing this
	// asset.
	BaseBorrowRate github_com_cosmos_cosmos_sdk_types.Dec `` /* 169-byte string literal not displayed */
	// Kink Borrow Rate defines the interest rate for borrowing this
	// asset when supply utilization is equal to 'kink_utilization'.
	KinkBorrowRate github_com_cosmos_cosmos_sdk_types.Dec `` /* 169-byte string literal not displayed */
	// Max Borrow Rate defines the interest rate for borrowing this
	// asset when supply utilization is at its maximum.
	MaxBorrowRate github_com_cosmos_cosmos_sdk_types.Dec `` /* 165-byte string literal not displayed */
	// Kink Utilization defines the supply utilization value where
	// the kink in the borrow interest rate function occurs.
	KinkUtilization github_com_cosmos_cosmos_sdk_types.Dec `` /* 170-byte string literal not displayed */
	// Liquidation Incentive determines the portion of bonus collateral of
	// a token type liquidators receive as a liquidation reward.
	LiquidationIncentive github_com_cosmos_cosmos_sdk_types.Dec `` /* 190-byte string literal not displayed */
	// Symbol Denom is the human readable denomination of this token.
	SymbolDenom string `protobuf:"bytes,10,opt,name=symbol_denom,json=symbolDenom,proto3" json:"symbol_denom,omitempty" yaml:"symbol_denom"`
	// Exponent is the power of ten by which to multiply, in order to convert
	// an amount of the token denoted in its symbol denom to the actual amount
	// of its base denom.
	Exponent uint32 `protobuf:"varint,11,opt,name=exponent,proto3" json:"exponent,omitempty" yaml:"exponent"`
	// Enable Msg Supply allows supplying for lending or collateral using this
	// token. `false` means that a token can no longer be supplied.
	// Note that withdrawing is always enabled. Disabling supply would
	// be one step in phasing out an asset type.
	EnableMsgSupply bool `` /* 135-byte string literal not displayed */
	// Enable Msg Borrow allows borrowing of this token. Note that repaying is
	// always enabled. Disabling borrowing would be one step in phasing out an
	// asset type, but could also be used from the start for asset types meant
	// to be collateral only, like meTokens.
	EnableMsgBorrow bool `` /* 135-byte string literal not displayed */
	// Blacklist should only be used to eliminate an asset completely. A blacklisted
	// asset is treated as though its oracle price is zero, and thus ignored by
	// calculations such as collateral value and borrow limit. Can still be repaid
	// or withdrawn, but not liquidated. A blacklisted token must have enable_msg_supply
	// and enable_msg_borrow set to false. Such tokens can be safely removed from the
	// oracle and price feeder as well.
	Blacklist bool `protobuf:"varint,14,opt,name=blacklist,proto3" json:"blacklist,omitempty"`
	// Max Collateral Share specifies how much of the system's overall collateral
	// can be provided by a given token. 1.0 means that the token has no restriction.
	// 0.1 means maximum 10% of system's total collateral value can be provided by this token.
	// Valid values: 0-1.
	MaxCollateralShare github_com_cosmos_cosmos_sdk_types.Dec `` /* 186-byte string literal not displayed */
	// Max Supply Utilization specifies the maximum supply utilization a token is
	// allowed to reach as a direct result of user borrowing. New borrows are not allowed when
	// the supply utilization is above `max_supply_utilization`.
	// Valid values: 0-1.
	MaxSupplyUtilization github_com_cosmos_cosmos_sdk_types.Dec `` /* 194-byte string literal not displayed */
	// Min Collateral Liquidity specifies the minimum collateral liquidity a token is
	// allowed to reach as a direct result of users borrowing, collateralizing, or
	// withdrawing assets. Liquidity can only drop below this value due to interest
	// or liquidations.
	MinCollateralLiquidity github_com_cosmos_cosmos_sdk_types.Dec `` /* 202-byte string literal not displayed */
	// Max Supply is the maximum amount of tokens the protocol can hold.
	// Adding more supply of the given token to the protocol will return an error.
	// Must be a non negative value. 0 means that there is no limit.
	// To mark a token as not valid for supply, `msg_supply` must be set to false.
	MaxSupply github_com_cosmos_cosmos_sdk_types.Int `` /* 147-byte string literal not displayed */
}

Token defines a token, along with its metadata and parameters, in the Umee capital facility that can be supplied and borrowed.

func (Token) AssertBorrowEnabled

func (t Token) AssertBorrowEnabled() error

AssertBorrowEnabled returns an error if a Token cannot be borrowed.

func (Token) AssertNotBlacklisted

func (t Token) AssertNotBlacklisted() error

AssertNotBlacklisted returns an error if a Token is blacklisted.

func (Token) AssertSupplyEnabled

func (t Token) AssertSupplyEnabled() error

AssertSupplyEnabled returns an error if a Token cannot be supplied.

func (*Token) Descriptor

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

func (*Token) Equal

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

func (*Token) Marshal

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

func (*Token) MarshalTo

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

func (*Token) MarshalToSizedBuffer

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

func (*Token) ProtoMessage

func (*Token) ProtoMessage()

func (*Token) Reset

func (m *Token) Reset()

func (*Token) Size

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

func (*Token) String

func (m *Token) String() string

func (*Token) Unmarshal

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

func (Token) Validate

func (t Token) Validate() error

Validate performs validation on an Token type returning an error if the Token is invalid.

func (*Token) XXX_DiscardUnknown

func (m *Token) XXX_DiscardUnknown()

func (*Token) XXX_Marshal

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

func (*Token) XXX_Merge

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

func (*Token) XXX_Size

func (m *Token) XXX_Size() int

func (*Token) XXX_Unmarshal

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

type UnimplementedMsgServer

type UnimplementedMsgServer struct {
}

UnimplementedMsgServer can be embedded to have forward compatible implementations.

func (*UnimplementedMsgServer) Borrow

func (*UnimplementedMsgServer) Collateralize

func (*UnimplementedMsgServer) Decollateralize

func (*UnimplementedMsgServer) Liquidate

func (*UnimplementedMsgServer) Repay

func (*UnimplementedMsgServer) Supply

func (*UnimplementedMsgServer) Withdraw

type UnimplementedQueryServer

type UnimplementedQueryServer struct {
}

UnimplementedQueryServer can be embedded to have forward compatible implementations.

func (*UnimplementedQueryServer) AccountBalances

func (*UnimplementedQueryServer) AccountSummary

func (*UnimplementedQueryServer) BadDebts

func (*UnimplementedQueryServer) LiquidationTargets

func (*UnimplementedQueryServer) MarketSummary

func (*UnimplementedQueryServer) Params

func (*UnimplementedQueryServer) RegisteredTokens

type UpdateRegistryProposal

type UpdateRegistryProposal struct {
	Title       string  `protobuf:"bytes,1,opt,name=title,proto3" json:"title,omitempty"`
	Description string  `protobuf:"bytes,2,opt,name=description,proto3" json:"description,omitempty"`
	Registry    []Token `protobuf:"bytes,3,rep,name=registry,proto3" json:"registry"`
}

UpdateRegistryProposal defines a governance proposal type where the token registry can be updated in the Umee capital facility. Note, the registry defined in the proposal replaces the current registry in its entirety.

func NewUpdateRegistryProposal

func NewUpdateRegistryProposal(title, description string, tokens []Token) *UpdateRegistryProposal

func (*UpdateRegistryProposal) Descriptor

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

func (*UpdateRegistryProposal) Equal

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

func (*UpdateRegistryProposal) GetDescription

func (p *UpdateRegistryProposal) GetDescription() string

GetDescription returns the description of the proposal.

func (*UpdateRegistryProposal) GetTitle

func (p *UpdateRegistryProposal) GetTitle() string

GetTitle returns the title of the proposal.

func (*UpdateRegistryProposal) Marshal

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

func (*UpdateRegistryProposal) MarshalTo

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

func (*UpdateRegistryProposal) MarshalToSizedBuffer

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

func (*UpdateRegistryProposal) ProposalRoute

func (p *UpdateRegistryProposal) ProposalRoute() string

ProposalRoute returns the x/gov routing key of the proposal.

func (*UpdateRegistryProposal) ProposalType

func (p *UpdateRegistryProposal) ProposalType() string

ProposalType returns the x/gov type of the proposal.

func (*UpdateRegistryProposal) ProtoMessage

func (*UpdateRegistryProposal) ProtoMessage()

func (*UpdateRegistryProposal) Reset

func (m *UpdateRegistryProposal) Reset()

func (*UpdateRegistryProposal) Size

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

func (UpdateRegistryProposal) String

func (p UpdateRegistryProposal) String() string

String implements the Stringer interface.

func (*UpdateRegistryProposal) Unmarshal

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

func (*UpdateRegistryProposal) ValidateBasic

func (p *UpdateRegistryProposal) ValidateBasic() error

ValidateBasic validates the proposal returning an error if invalid.

func (*UpdateRegistryProposal) XXX_DiscardUnknown

func (m *UpdateRegistryProposal) XXX_DiscardUnknown()

func (*UpdateRegistryProposal) XXX_Marshal

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

func (*UpdateRegistryProposal) XXX_Merge

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

func (*UpdateRegistryProposal) XXX_Size

func (m *UpdateRegistryProposal) XXX_Size() int

func (*UpdateRegistryProposal) XXX_Unmarshal

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

Jump to

Keyboard shortcuts

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