Documentation ¶
Index ¶
- Constants
- Variables
- func CreateCollateralSettingKey(borrowerAddr sdk.AccAddress, uTokenDenom string) []byte
- func CreateLoanKey(borrowerAddr sdk.AccAddress, tokenDenom string) []byte
- func CreateLoanKeyNoDenom(borrowerAddr sdk.AccAddress) []byte
- func CreateRegisteredTokenKey(baseTokenDenom string) []byte
- func CreateTokenDenomKey(tokenDenom string) []byte
- func CreateUTokenDenomKey(uTokenDenom string) []byte
- func ParamKeyTable() paramtypes.KeyTable
- func RegisterInterfaces(registry cdctypes.InterfaceRegistry)
- func RegisterLegacyAminoCodec(cdc *codec.LegacyAmino)
- func RegisterMsgServer(s grpc1.Server, srv MsgServer)
- func RegisterQueryServer(s grpc1.Server, srv QueryServer)
- func UTokenFromTokenDenom(tokenDenom string) string
- type BankKeeper
- type GenesisState
- func (*GenesisState) Descriptor() ([]byte, []int)
- func (m *GenesisState) GetParams() Params
- func (m *GenesisState) GetRegistry() []Token
- func (m *GenesisState) Marshal() (dAtA []byte, err error)
- func (m *GenesisState) MarshalTo(dAtA []byte) (int, error)
- func (m *GenesisState) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*GenesisState) ProtoMessage()
- func (m *GenesisState) Reset()
- func (m *GenesisState) Size() (n int)
- func (m *GenesisState) String() string
- func (m *GenesisState) Unmarshal(dAtA []byte) error
- func (gs GenesisState) Validate() error
- func (m *GenesisState) XXX_DiscardUnknown()
- func (m *GenesisState) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *GenesisState) XXX_Merge(src proto.Message)
- func (m *GenesisState) XXX_Size() int
- func (m *GenesisState) XXX_Unmarshal(b []byte) error
- type MsgBorrowAsset
- func (*MsgBorrowAsset) Descriptor() ([]byte, []int)
- func (m *MsgBorrowAsset) GetAmount() types.Coin
- func (m *MsgBorrowAsset) GetBorrower() string
- func (msg *MsgBorrowAsset) GetSigners() []sdk.AccAddress
- func (m *MsgBorrowAsset) Marshal() (dAtA []byte, err error)
- func (m *MsgBorrowAsset) MarshalTo(dAtA []byte) (int, error)
- func (m *MsgBorrowAsset) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*MsgBorrowAsset) ProtoMessage()
- func (m *MsgBorrowAsset) Reset()
- func (m *MsgBorrowAsset) Size() (n int)
- func (m *MsgBorrowAsset) String() string
- func (m *MsgBorrowAsset) Unmarshal(dAtA []byte) error
- func (msg *MsgBorrowAsset) ValidateBasic() error
- func (m *MsgBorrowAsset) XXX_DiscardUnknown()
- func (m *MsgBorrowAsset) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *MsgBorrowAsset) XXX_Merge(src proto.Message)
- func (m *MsgBorrowAsset) XXX_Size() int
- func (m *MsgBorrowAsset) XXX_Unmarshal(b []byte) error
- type MsgBorrowAssetResponse
- func (*MsgBorrowAssetResponse) Descriptor() ([]byte, []int)
- func (m *MsgBorrowAssetResponse) Marshal() (dAtA []byte, err error)
- func (m *MsgBorrowAssetResponse) MarshalTo(dAtA []byte) (int, error)
- func (m *MsgBorrowAssetResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*MsgBorrowAssetResponse) ProtoMessage()
- func (m *MsgBorrowAssetResponse) Reset()
- func (m *MsgBorrowAssetResponse) Size() (n int)
- func (m *MsgBorrowAssetResponse) String() string
- func (m *MsgBorrowAssetResponse) Unmarshal(dAtA []byte) error
- func (m *MsgBorrowAssetResponse) XXX_DiscardUnknown()
- func (m *MsgBorrowAssetResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *MsgBorrowAssetResponse) XXX_Merge(src proto.Message)
- func (m *MsgBorrowAssetResponse) XXX_Size() int
- func (m *MsgBorrowAssetResponse) XXX_Unmarshal(b []byte) error
- type MsgClient
- type MsgLendAsset
- func (*MsgLendAsset) Descriptor() ([]byte, []int)
- func (m *MsgLendAsset) GetAmount() types.Coin
- func (m *MsgLendAsset) GetLender() string
- func (msg *MsgLendAsset) GetSigners() []sdk.AccAddress
- func (m *MsgLendAsset) Marshal() (dAtA []byte, err error)
- func (m *MsgLendAsset) MarshalTo(dAtA []byte) (int, error)
- func (m *MsgLendAsset) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*MsgLendAsset) ProtoMessage()
- func (m *MsgLendAsset) Reset()
- func (m *MsgLendAsset) Size() (n int)
- func (m *MsgLendAsset) String() string
- func (m *MsgLendAsset) Unmarshal(dAtA []byte) error
- func (msg *MsgLendAsset) ValidateBasic() error
- func (m *MsgLendAsset) XXX_DiscardUnknown()
- func (m *MsgLendAsset) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *MsgLendAsset) XXX_Merge(src proto.Message)
- func (m *MsgLendAsset) XXX_Size() int
- func (m *MsgLendAsset) XXX_Unmarshal(b []byte) error
- type MsgLendAssetResponse
- func (*MsgLendAssetResponse) Descriptor() ([]byte, []int)
- func (m *MsgLendAssetResponse) Marshal() (dAtA []byte, err error)
- func (m *MsgLendAssetResponse) MarshalTo(dAtA []byte) (int, error)
- func (m *MsgLendAssetResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*MsgLendAssetResponse) ProtoMessage()
- func (m *MsgLendAssetResponse) Reset()
- func (m *MsgLendAssetResponse) Size() (n int)
- func (m *MsgLendAssetResponse) String() string
- func (m *MsgLendAssetResponse) Unmarshal(dAtA []byte) error
- func (m *MsgLendAssetResponse) XXX_DiscardUnknown()
- func (m *MsgLendAssetResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *MsgLendAssetResponse) XXX_Merge(src proto.Message)
- func (m *MsgLendAssetResponse) XXX_Size() int
- func (m *MsgLendAssetResponse) XXX_Unmarshal(b []byte) error
- type MsgRepayAsset
- func (*MsgRepayAsset) Descriptor() ([]byte, []int)
- func (m *MsgRepayAsset) GetAmount() types.Coin
- func (m *MsgRepayAsset) GetBorrower() string
- func (msg *MsgRepayAsset) GetSigners() []sdk.AccAddress
- func (m *MsgRepayAsset) Marshal() (dAtA []byte, err error)
- func (m *MsgRepayAsset) MarshalTo(dAtA []byte) (int, error)
- func (m *MsgRepayAsset) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*MsgRepayAsset) ProtoMessage()
- func (m *MsgRepayAsset) Reset()
- func (m *MsgRepayAsset) Size() (n int)
- func (m *MsgRepayAsset) String() string
- func (m *MsgRepayAsset) Unmarshal(dAtA []byte) error
- func (msg *MsgRepayAsset) ValidateBasic() error
- func (m *MsgRepayAsset) XXX_DiscardUnknown()
- func (m *MsgRepayAsset) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *MsgRepayAsset) XXX_Merge(src proto.Message)
- func (m *MsgRepayAsset) XXX_Size() int
- func (m *MsgRepayAsset) XXX_Unmarshal(b []byte) error
- type MsgRepayAssetResponse
- func (*MsgRepayAssetResponse) Descriptor() ([]byte, []int)
- func (m *MsgRepayAssetResponse) Marshal() (dAtA []byte, err error)
- func (m *MsgRepayAssetResponse) MarshalTo(dAtA []byte) (int, error)
- func (m *MsgRepayAssetResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*MsgRepayAssetResponse) ProtoMessage()
- func (m *MsgRepayAssetResponse) Reset()
- func (m *MsgRepayAssetResponse) Size() (n int)
- func (m *MsgRepayAssetResponse) String() string
- func (m *MsgRepayAssetResponse) Unmarshal(dAtA []byte) error
- func (m *MsgRepayAssetResponse) XXX_DiscardUnknown()
- func (m *MsgRepayAssetResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *MsgRepayAssetResponse) XXX_Merge(src proto.Message)
- func (m *MsgRepayAssetResponse) XXX_Size() int
- func (m *MsgRepayAssetResponse) XXX_Unmarshal(b []byte) error
- type MsgServer
- type MsgSetCollateral
- func (*MsgSetCollateral) Descriptor() ([]byte, []int)
- func (m *MsgSetCollateral) GetBorrower() string
- func (m *MsgSetCollateral) GetDenom() string
- func (m *MsgSetCollateral) GetEnable() bool
- func (msg *MsgSetCollateral) GetSigners() []sdk.AccAddress
- func (m *MsgSetCollateral) Marshal() (dAtA []byte, err error)
- func (m *MsgSetCollateral) MarshalTo(dAtA []byte) (int, error)
- func (m *MsgSetCollateral) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*MsgSetCollateral) ProtoMessage()
- func (m *MsgSetCollateral) Reset()
- func (m *MsgSetCollateral) Size() (n int)
- func (m *MsgSetCollateral) String() string
- func (m *MsgSetCollateral) Unmarshal(dAtA []byte) error
- func (msg *MsgSetCollateral) ValidateBasic() error
- func (m *MsgSetCollateral) XXX_DiscardUnknown()
- func (m *MsgSetCollateral) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *MsgSetCollateral) XXX_Merge(src proto.Message)
- func (m *MsgSetCollateral) XXX_Size() int
- func (m *MsgSetCollateral) XXX_Unmarshal(b []byte) error
- type MsgSetCollateralResponse
- func (*MsgSetCollateralResponse) Descriptor() ([]byte, []int)
- func (m *MsgSetCollateralResponse) Marshal() (dAtA []byte, err error)
- func (m *MsgSetCollateralResponse) MarshalTo(dAtA []byte) (int, error)
- func (m *MsgSetCollateralResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*MsgSetCollateralResponse) ProtoMessage()
- func (m *MsgSetCollateralResponse) Reset()
- func (m *MsgSetCollateralResponse) Size() (n int)
- func (m *MsgSetCollateralResponse) String() string
- func (m *MsgSetCollateralResponse) Unmarshal(dAtA []byte) error
- func (m *MsgSetCollateralResponse) XXX_DiscardUnknown()
- func (m *MsgSetCollateralResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *MsgSetCollateralResponse) XXX_Merge(src proto.Message)
- func (m *MsgSetCollateralResponse) XXX_Size() int
- func (m *MsgSetCollateralResponse) XXX_Unmarshal(b []byte) error
- type MsgWithdrawAsset
- func (*MsgWithdrawAsset) Descriptor() ([]byte, []int)
- func (m *MsgWithdrawAsset) GetAmount() types.Coin
- func (m *MsgWithdrawAsset) GetLender() string
- func (msg *MsgWithdrawAsset) GetSigners() []sdk.AccAddress
- func (m *MsgWithdrawAsset) Marshal() (dAtA []byte, err error)
- func (m *MsgWithdrawAsset) MarshalTo(dAtA []byte) (int, error)
- func (m *MsgWithdrawAsset) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*MsgWithdrawAsset) ProtoMessage()
- func (m *MsgWithdrawAsset) Reset()
- func (m *MsgWithdrawAsset) Size() (n int)
- func (m *MsgWithdrawAsset) String() string
- func (m *MsgWithdrawAsset) Unmarshal(dAtA []byte) error
- func (msg *MsgWithdrawAsset) ValidateBasic() error
- func (m *MsgWithdrawAsset) XXX_DiscardUnknown()
- func (m *MsgWithdrawAsset) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *MsgWithdrawAsset) XXX_Merge(src proto.Message)
- func (m *MsgWithdrawAsset) XXX_Size() int
- func (m *MsgWithdrawAsset) XXX_Unmarshal(b []byte) error
- type MsgWithdrawAssetResponse
- func (*MsgWithdrawAssetResponse) Descriptor() ([]byte, []int)
- func (m *MsgWithdrawAssetResponse) Marshal() (dAtA []byte, err error)
- func (m *MsgWithdrawAssetResponse) MarshalTo(dAtA []byte) (int, error)
- func (m *MsgWithdrawAssetResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*MsgWithdrawAssetResponse) ProtoMessage()
- func (m *MsgWithdrawAssetResponse) Reset()
- func (m *MsgWithdrawAssetResponse) Size() (n int)
- func (m *MsgWithdrawAssetResponse) String() string
- func (m *MsgWithdrawAssetResponse) Unmarshal(dAtA []byte) error
- func (m *MsgWithdrawAssetResponse) XXX_DiscardUnknown()
- func (m *MsgWithdrawAssetResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *MsgWithdrawAssetResponse) XXX_Merge(src proto.Message)
- func (m *MsgWithdrawAssetResponse) XXX_Size() int
- func (m *MsgWithdrawAssetResponse) XXX_Unmarshal(b []byte) error
- type Params
- func (*Params) Descriptor() ([]byte, []int)
- func (m *Params) Marshal() (dAtA []byte, err error)
- func (m *Params) MarshalTo(dAtA []byte) (int, error)
- func (m *Params) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (p *Params) ParamSetPairs() paramtypes.ParamSetPairs
- func (*Params) ProtoMessage()
- func (m *Params) Reset()
- func (m *Params) Size() (n int)
- func (p Params) String() string
- func (m *Params) Unmarshal(dAtA []byte) error
- func (m *Params) XXX_DiscardUnknown()
- func (m *Params) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Params) XXX_Merge(src proto.Message)
- func (m *Params) XXX_Size() int
- func (m *Params) XXX_Unmarshal(b []byte) error
- type QueryClient
- type QueryServer
- type Token
- func (*Token) Descriptor() ([]byte, []int)
- func (this *Token) Equal(that interface{}) bool
- func (m *Token) GetBaseDenom() string
- func (m *Token) Marshal() (dAtA []byte, err error)
- func (m *Token) MarshalTo(dAtA []byte) (int, error)
- func (m *Token) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*Token) ProtoMessage()
- func (m *Token) Reset()
- func (m *Token) Size() (n int)
- func (m *Token) String() string
- func (m *Token) Unmarshal(dAtA []byte) error
- func (t Token) Validate() error
- func (m *Token) XXX_DiscardUnknown()
- func (m *Token) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Token) XXX_Merge(src proto.Message)
- func (m *Token) XXX_Size() int
- func (m *Token) XXX_Unmarshal(b []byte) error
- type UnimplementedMsgServer
- func (*UnimplementedMsgServer) BorrowAsset(ctx context.Context, req *MsgBorrowAsset) (*MsgBorrowAssetResponse, error)
- func (*UnimplementedMsgServer) LendAsset(ctx context.Context, req *MsgLendAsset) (*MsgLendAssetResponse, error)
- func (*UnimplementedMsgServer) RepayAsset(ctx context.Context, req *MsgRepayAsset) (*MsgRepayAssetResponse, error)
- func (*UnimplementedMsgServer) SetCollateral(ctx context.Context, req *MsgSetCollateral) (*MsgSetCollateralResponse, error)
- func (*UnimplementedMsgServer) WithdrawAsset(ctx context.Context, req *MsgWithdrawAsset) (*MsgWithdrawAssetResponse, error)
- type UnimplementedQueryServer
- type UpdateRegistryProposal
- func (*UpdateRegistryProposal) Descriptor() ([]byte, []int)
- func (this *UpdateRegistryProposal) Equal(that interface{}) bool
- func (p *UpdateRegistryProposal) GetDescription() string
- func (p *UpdateRegistryProposal) GetTitle() string
- func (m *UpdateRegistryProposal) Marshal() (dAtA []byte, err error)
- func (m *UpdateRegistryProposal) MarshalTo(dAtA []byte) (int, error)
- func (m *UpdateRegistryProposal) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (p *UpdateRegistryProposal) ProposalRoute() string
- func (p *UpdateRegistryProposal) ProposalType() string
- func (*UpdateRegistryProposal) ProtoMessage()
- func (m *UpdateRegistryProposal) Reset()
- func (m *UpdateRegistryProposal) Size() (n int)
- func (p UpdateRegistryProposal) String() string
- func (m *UpdateRegistryProposal) Unmarshal(dAtA []byte) error
- func (p *UpdateRegistryProposal) ValidateBasic() error
- func (m *UpdateRegistryProposal) XXX_DiscardUnknown()
- func (m *UpdateRegistryProposal) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *UpdateRegistryProposal) XXX_Merge(src proto.Message)
- func (m *UpdateRegistryProposal) XXX_Size() int
- func (m *UpdateRegistryProposal) XXX_Unmarshal(b []byte) error
Constants ¶
const ( EventTypeLoanAsset = "loan_asset" EventTypeWithdrawLoanedAsset = "withdraw_loaned_asset" EventTypeSetCollateralSetting = "set_collateral_setting" EventTypeBorrowAsset = "borrow_asset" EventTypeRepayBorrowedAsset = "repay_borrowed_asset" EventAttrModule = ModuleName EventAttrLender = "lender" EventAttrBorrower = "borrower" EventAttrDenom = "denom" EventAttrEnable = "enabled" )
Event types and attributes for the leverage module
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 )
const ( // UTokenPrefix defines the uToken denomination prefix for all uToken types. UTokenPrefix = "u/" // ProposalTypeUpdateRegistryProposal defines the type for a UpdateRegistryProposal // proposal type. ProposalTypeUpdateRegistryProposal = "UpdateRegistryProposal" )
const (
// ProposalTypeChange defines the type for a UpdateAssetsProposal
ProposalTypeUpdateAssetsProposal = "UpdateAssetsProposal"
)
Variables ¶
var ( ErrInvalidAsset = sdkerrors.Register(ModuleName, 1100, "invalid asset") ErrInsufficientBalance = sdkerrors.Register(ModuleName, 1101, "insufficient balance") ErrBorrowLimitLow = sdkerrors.Register(ModuleName, 1102, "borrow limit too low") ErrLendingPoolInsufficient = sdkerrors.Register(ModuleName, 1103, "lending pool insufficient") ErrInvalidRepayment = sdkerrors.Register(ModuleName, 1104, "invalid repayment") ErrInvalidAddress = sdkerrors.Register(ModuleName, 1105, "invalid address") )
var ( ErrInvalidLengthGenesis = fmt.Errorf("proto: negative length found during unmarshaling") ErrIntOverflowGenesis = fmt.Errorf("proto: integer overflow") ErrUnexpectedEndOfGroupGenesis = fmt.Errorf("proto: unexpected end of group") )
var ( ErrInvalidLengthGov = fmt.Errorf("proto: negative length found during unmarshaling") ErrIntOverflowGov = fmt.Errorf("proto: integer overflow") ErrUnexpectedEndOfGroupGov = fmt.Errorf("proto: unexpected end of group") )
var ( KeyPrefixTokenDenom = []byte{0x01} KeyPrefixUTokenDenom = []byte{0x02} KeyPrefixRegisteredToken = []byte{0x03} KeyPrefixLoanToken = []byte{0x04} KeyPrefixCollateralSetting = []byte{0x05} )
KVStore key prefixes
var ( ErrInvalidLengthLeverage = fmt.Errorf("proto: negative length found during unmarshaling") ErrIntOverflowLeverage = fmt.Errorf("proto: integer overflow") ErrUnexpectedEndOfGroupLeverage = fmt.Errorf("proto: unexpected end of group") )
var ( ErrInvalidLengthTx = fmt.Errorf("proto: negative length found during unmarshaling") ErrIntOverflowTx = fmt.Errorf("proto: integer overflow") ErrUnexpectedEndOfGroupTx = fmt.Errorf("proto: unexpected end of group") )
var ( // 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 CreateCollateralSettingKey ¶
func CreateCollateralSettingKey(borrowerAddr sdk.AccAddress, uTokenDenom string) []byte
CreateCollateralSettingKey returns a KVStore key for getting and setting a borrower's collateral setting for a single uToken
func CreateLoanKey ¶
func CreateLoanKey(borrowerAddr sdk.AccAddress, tokenDenom string) []byte
CreateLoanKey returns a KVStore key for getting and setting a Loan for a denom and borrower address.
func CreateLoanKeyNoDenom ¶
func CreateLoanKeyNoDenom(borrowerAddr sdk.AccAddress) []byte
CreateLoanKeyNoDenom returns the common prefix used by all loans associated with a given borrower address.
func CreateRegisteredTokenKey ¶
CreateRegisteredTokenKey returns a KVStore key for getting and setting a Token.
func CreateTokenDenomKey ¶
CreateTokenDenomKey returns a KVStore key for getting and storing a token's associated uToken denomination.
func CreateUTokenDenomKey ¶
CreateUTokenDenomKey returns a KVStore key for getting and storing a uToken's associated token denomination.
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 RegisterQueryServer ¶
func RegisterQueryServer(s grpc1.Server, srv QueryServer)
func UTokenFromTokenDenom ¶
UTokenFromTokenDenom returns the uToken denom given a token denom.
Types ¶
type BankKeeper ¶
type BankKeeper interface { GetDenomMetaData(ctx sdk.Context, denom string) (banktypes.Metadata, bool) SetDenomMetaData(ctx sdk.Context, denomMetaData banktypes.Metadata) IterateAllDenomMetaData(ctx sdk.Context, cb func(banktypes.Metadata) bool) GetSupply(ctx sdk.Context, denom string) sdk.Coin // Note: The following will panic until we have a module account // See auth/types/ModuleAccount 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 // Question: Do we need the following (commented out)? // SendCoins(ctx sdk.Context, fromAddr sdk.AccAddress, toAddr sdk.AccAddress, amt sdk.Coins) error // BlockedAddr(addr sdk.AccAddress) bool HasBalance(ctx sdk.Context, addr sdk.AccAddress, amt sdk.Coin) bool }
BankKeeper defines the expected x/bank keeper interface.
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"` }
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 (*GenesisState) Descriptor ¶
func (*GenesisState) Descriptor() ([]byte, []int)
func (*GenesisState) GetParams ¶
func (m *GenesisState) GetParams() Params
func (*GenesisState) GetRegistry ¶
func (m *GenesisState) GetRegistry() []Token
func (*GenesisState) Marshal ¶
func (m *GenesisState) Marshal() (dAtA []byte, err error)
func (*GenesisState) MarshalToSizedBuffer ¶
func (m *GenesisState) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*GenesisState) ProtoMessage ¶
func (*GenesisState) ProtoMessage()
func (*GenesisState) Reset ¶
func (m *GenesisState) Reset()
func (*GenesisState) Size ¶
func (m *GenesisState) Size() (n int)
func (*GenesisState) String ¶
func (m *GenesisState) String() string
func (*GenesisState) Unmarshal ¶
func (m *GenesisState) Unmarshal(dAtA []byte) error
func (GenesisState) Validate ¶
func (gs GenesisState) Validate() error
Validate performs basic genesis state validation returning an error upon any failure.
func (*GenesisState) XXX_DiscardUnknown ¶
func (m *GenesisState) XXX_DiscardUnknown()
func (*GenesisState) XXX_Marshal ¶
func (m *GenesisState) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*GenesisState) XXX_Merge ¶
func (m *GenesisState) XXX_Merge(src proto.Message)
func (*GenesisState) XXX_Size ¶
func (m *GenesisState) XXX_Size() int
func (*GenesisState) XXX_Unmarshal ¶
func (m *GenesisState) XXX_Unmarshal(b []byte) error
type MsgBorrowAsset ¶
type MsgBorrowAsset struct { Borrower string `protobuf:"bytes,1,opt,name=borrower,proto3" json:"borrower,omitempty"` Amount types.Coin `protobuf:"bytes,2,opt,name=amount,proto3" json:"amount"` }
MsgBorrowAsset represents a lender's request to borrow a base asset type from the module.
func (*MsgBorrowAsset) Descriptor ¶
func (*MsgBorrowAsset) Descriptor() ([]byte, []int)
func (*MsgBorrowAsset) GetAmount ¶
func (m *MsgBorrowAsset) GetAmount() types.Coin
func (*MsgBorrowAsset) GetBorrower ¶
func (m *MsgBorrowAsset) GetBorrower() string
func (*MsgBorrowAsset) GetSigners ¶
func (msg *MsgBorrowAsset) GetSigners() []sdk.AccAddress
func (*MsgBorrowAsset) Marshal ¶
func (m *MsgBorrowAsset) Marshal() (dAtA []byte, err error)
func (*MsgBorrowAsset) MarshalToSizedBuffer ¶
func (m *MsgBorrowAsset) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*MsgBorrowAsset) ProtoMessage ¶
func (*MsgBorrowAsset) ProtoMessage()
func (*MsgBorrowAsset) Reset ¶
func (m *MsgBorrowAsset) Reset()
func (*MsgBorrowAsset) Size ¶
func (m *MsgBorrowAsset) Size() (n int)
func (*MsgBorrowAsset) String ¶
func (m *MsgBorrowAsset) String() string
func (*MsgBorrowAsset) Unmarshal ¶
func (m *MsgBorrowAsset) Unmarshal(dAtA []byte) error
func (*MsgBorrowAsset) ValidateBasic ¶
func (msg *MsgBorrowAsset) ValidateBasic() error
func (*MsgBorrowAsset) XXX_DiscardUnknown ¶
func (m *MsgBorrowAsset) XXX_DiscardUnknown()
func (*MsgBorrowAsset) XXX_Marshal ¶
func (m *MsgBorrowAsset) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*MsgBorrowAsset) XXX_Merge ¶
func (m *MsgBorrowAsset) XXX_Merge(src proto.Message)
func (*MsgBorrowAsset) XXX_Size ¶
func (m *MsgBorrowAsset) XXX_Size() int
func (*MsgBorrowAsset) XXX_Unmarshal ¶
func (m *MsgBorrowAsset) XXX_Unmarshal(b []byte) error
type MsgBorrowAssetResponse ¶
type MsgBorrowAssetResponse struct { }
MsgBorrowAssetResponse defines the Msg/BorrowAsset response type.
func (*MsgBorrowAssetResponse) Descriptor ¶
func (*MsgBorrowAssetResponse) Descriptor() ([]byte, []int)
func (*MsgBorrowAssetResponse) Marshal ¶
func (m *MsgBorrowAssetResponse) Marshal() (dAtA []byte, err error)
func (*MsgBorrowAssetResponse) MarshalTo ¶
func (m *MsgBorrowAssetResponse) MarshalTo(dAtA []byte) (int, error)
func (*MsgBorrowAssetResponse) MarshalToSizedBuffer ¶
func (m *MsgBorrowAssetResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*MsgBorrowAssetResponse) ProtoMessage ¶
func (*MsgBorrowAssetResponse) ProtoMessage()
func (*MsgBorrowAssetResponse) Reset ¶
func (m *MsgBorrowAssetResponse) Reset()
func (*MsgBorrowAssetResponse) Size ¶
func (m *MsgBorrowAssetResponse) Size() (n int)
func (*MsgBorrowAssetResponse) String ¶
func (m *MsgBorrowAssetResponse) String() string
func (*MsgBorrowAssetResponse) Unmarshal ¶
func (m *MsgBorrowAssetResponse) Unmarshal(dAtA []byte) error
func (*MsgBorrowAssetResponse) XXX_DiscardUnknown ¶
func (m *MsgBorrowAssetResponse) XXX_DiscardUnknown()
func (*MsgBorrowAssetResponse) XXX_Marshal ¶
func (m *MsgBorrowAssetResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*MsgBorrowAssetResponse) XXX_Merge ¶
func (m *MsgBorrowAssetResponse) XXX_Merge(src proto.Message)
func (*MsgBorrowAssetResponse) XXX_Size ¶
func (m *MsgBorrowAssetResponse) XXX_Size() int
func (*MsgBorrowAssetResponse) XXX_Unmarshal ¶
func (m *MsgBorrowAssetResponse) XXX_Unmarshal(b []byte) error
type MsgClient ¶
type MsgClient interface { // LendAsset defines a method for lending coins to the capital facility. LendAsset(ctx context.Context, in *MsgLendAsset, opts ...grpc.CallOption) (*MsgLendAssetResponse, error) // WithdrawAsset defines a method for withdrawing previously lent coins from // the capital facility. WithdrawAsset(ctx context.Context, in *MsgWithdrawAsset, opts ...grpc.CallOption) (*MsgWithdrawAssetResponse, error) // SetCollateral defines a method for users to enable or disable a uToken // denomination in their wallet for use as collateral. SetCollateral(ctx context.Context, in *MsgSetCollateral, opts ...grpc.CallOption) (*MsgSetCollateralResponse, error) // BorrowAsset defines a method for borrowing coins from the capital facility. BorrowAsset(ctx context.Context, in *MsgBorrowAsset, opts ...grpc.CallOption) (*MsgBorrowAssetResponse, error) // RepayAsset defines a method for repaying borrowed coins to the capital facility. RepayAsset(ctx context.Context, in *MsgRepayAsset, opts ...grpc.CallOption) (*MsgRepayAssetResponse, 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 MsgLendAsset ¶
type MsgLendAsset struct { Lender string `protobuf:"bytes,1,opt,name=lender,proto3" json:"lender,omitempty"` Amount types.Coin `protobuf:"bytes,2,opt,name=amount,proto3" json:"amount"` }
MsgLendAsset represents a lender's request to lend a base asset type to the module
func (*MsgLendAsset) Descriptor ¶
func (*MsgLendAsset) Descriptor() ([]byte, []int)
func (*MsgLendAsset) GetAmount ¶
func (m *MsgLendAsset) GetAmount() types.Coin
func (*MsgLendAsset) GetLender ¶
func (m *MsgLendAsset) GetLender() string
func (*MsgLendAsset) GetSigners ¶
func (msg *MsgLendAsset) GetSigners() []sdk.AccAddress
func (*MsgLendAsset) Marshal ¶
func (m *MsgLendAsset) Marshal() (dAtA []byte, err error)
func (*MsgLendAsset) MarshalToSizedBuffer ¶
func (m *MsgLendAsset) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*MsgLendAsset) ProtoMessage ¶
func (*MsgLendAsset) ProtoMessage()
func (*MsgLendAsset) Reset ¶
func (m *MsgLendAsset) Reset()
func (*MsgLendAsset) Size ¶
func (m *MsgLendAsset) Size() (n int)
func (*MsgLendAsset) String ¶
func (m *MsgLendAsset) String() string
func (*MsgLendAsset) Unmarshal ¶
func (m *MsgLendAsset) Unmarshal(dAtA []byte) error
func (*MsgLendAsset) ValidateBasic ¶
func (msg *MsgLendAsset) ValidateBasic() error
func (*MsgLendAsset) XXX_DiscardUnknown ¶
func (m *MsgLendAsset) XXX_DiscardUnknown()
func (*MsgLendAsset) XXX_Marshal ¶
func (m *MsgLendAsset) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*MsgLendAsset) XXX_Merge ¶
func (m *MsgLendAsset) XXX_Merge(src proto.Message)
func (*MsgLendAsset) XXX_Size ¶
func (m *MsgLendAsset) XXX_Size() int
func (*MsgLendAsset) XXX_Unmarshal ¶
func (m *MsgLendAsset) XXX_Unmarshal(b []byte) error
type MsgLendAssetResponse ¶
type MsgLendAssetResponse struct { }
MsgLendAssetResponse defines the Msg/LendAsset response type.
func (*MsgLendAssetResponse) Descriptor ¶
func (*MsgLendAssetResponse) Descriptor() ([]byte, []int)
func (*MsgLendAssetResponse) Marshal ¶
func (m *MsgLendAssetResponse) Marshal() (dAtA []byte, err error)
func (*MsgLendAssetResponse) MarshalTo ¶
func (m *MsgLendAssetResponse) MarshalTo(dAtA []byte) (int, error)
func (*MsgLendAssetResponse) MarshalToSizedBuffer ¶
func (m *MsgLendAssetResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*MsgLendAssetResponse) ProtoMessage ¶
func (*MsgLendAssetResponse) ProtoMessage()
func (*MsgLendAssetResponse) Reset ¶
func (m *MsgLendAssetResponse) Reset()
func (*MsgLendAssetResponse) Size ¶
func (m *MsgLendAssetResponse) Size() (n int)
func (*MsgLendAssetResponse) String ¶
func (m *MsgLendAssetResponse) String() string
func (*MsgLendAssetResponse) Unmarshal ¶
func (m *MsgLendAssetResponse) Unmarshal(dAtA []byte) error
func (*MsgLendAssetResponse) XXX_DiscardUnknown ¶
func (m *MsgLendAssetResponse) XXX_DiscardUnknown()
func (*MsgLendAssetResponse) XXX_Marshal ¶
func (m *MsgLendAssetResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*MsgLendAssetResponse) XXX_Merge ¶
func (m *MsgLendAssetResponse) XXX_Merge(src proto.Message)
func (*MsgLendAssetResponse) XXX_Size ¶
func (m *MsgLendAssetResponse) XXX_Size() int
func (*MsgLendAssetResponse) XXX_Unmarshal ¶
func (m *MsgLendAssetResponse) XXX_Unmarshal(b []byte) error
type MsgRepayAsset ¶
type MsgRepayAsset struct { Borrower string `protobuf:"bytes,1,opt,name=borrower,proto3" json:"borrower,omitempty"` Amount types.Coin `protobuf:"bytes,2,opt,name=amount,proto3" json:"amount"` }
MsgRepayAsset represents a lender's request to repay a borrowed base asset type to the module.
func (*MsgRepayAsset) Descriptor ¶
func (*MsgRepayAsset) Descriptor() ([]byte, []int)
func (*MsgRepayAsset) GetAmount ¶
func (m *MsgRepayAsset) GetAmount() types.Coin
func (*MsgRepayAsset) GetBorrower ¶
func (m *MsgRepayAsset) GetBorrower() string
func (*MsgRepayAsset) GetSigners ¶
func (msg *MsgRepayAsset) GetSigners() []sdk.AccAddress
func (*MsgRepayAsset) Marshal ¶
func (m *MsgRepayAsset) Marshal() (dAtA []byte, err error)
func (*MsgRepayAsset) MarshalToSizedBuffer ¶
func (m *MsgRepayAsset) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*MsgRepayAsset) ProtoMessage ¶
func (*MsgRepayAsset) ProtoMessage()
func (*MsgRepayAsset) Reset ¶
func (m *MsgRepayAsset) Reset()
func (*MsgRepayAsset) Size ¶
func (m *MsgRepayAsset) Size() (n int)
func (*MsgRepayAsset) String ¶
func (m *MsgRepayAsset) String() string
func (*MsgRepayAsset) Unmarshal ¶
func (m *MsgRepayAsset) Unmarshal(dAtA []byte) error
func (*MsgRepayAsset) ValidateBasic ¶
func (msg *MsgRepayAsset) ValidateBasic() error
func (*MsgRepayAsset) XXX_DiscardUnknown ¶
func (m *MsgRepayAsset) XXX_DiscardUnknown()
func (*MsgRepayAsset) XXX_Marshal ¶
func (m *MsgRepayAsset) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*MsgRepayAsset) XXX_Merge ¶
func (m *MsgRepayAsset) XXX_Merge(src proto.Message)
func (*MsgRepayAsset) XXX_Size ¶
func (m *MsgRepayAsset) XXX_Size() int
func (*MsgRepayAsset) XXX_Unmarshal ¶
func (m *MsgRepayAsset) XXX_Unmarshal(b []byte) error
type MsgRepayAssetResponse ¶
type MsgRepayAssetResponse struct { }
MsgRepayAssetResponse defines the Msg/RepayAsset response type.
func (*MsgRepayAssetResponse) Descriptor ¶
func (*MsgRepayAssetResponse) Descriptor() ([]byte, []int)
func (*MsgRepayAssetResponse) Marshal ¶
func (m *MsgRepayAssetResponse) Marshal() (dAtA []byte, err error)
func (*MsgRepayAssetResponse) MarshalTo ¶
func (m *MsgRepayAssetResponse) MarshalTo(dAtA []byte) (int, error)
func (*MsgRepayAssetResponse) MarshalToSizedBuffer ¶
func (m *MsgRepayAssetResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*MsgRepayAssetResponse) ProtoMessage ¶
func (*MsgRepayAssetResponse) ProtoMessage()
func (*MsgRepayAssetResponse) Reset ¶
func (m *MsgRepayAssetResponse) Reset()
func (*MsgRepayAssetResponse) Size ¶
func (m *MsgRepayAssetResponse) Size() (n int)
func (*MsgRepayAssetResponse) String ¶
func (m *MsgRepayAssetResponse) String() string
func (*MsgRepayAssetResponse) Unmarshal ¶
func (m *MsgRepayAssetResponse) Unmarshal(dAtA []byte) error
func (*MsgRepayAssetResponse) XXX_DiscardUnknown ¶
func (m *MsgRepayAssetResponse) XXX_DiscardUnknown()
func (*MsgRepayAssetResponse) XXX_Marshal ¶
func (m *MsgRepayAssetResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*MsgRepayAssetResponse) XXX_Merge ¶
func (m *MsgRepayAssetResponse) XXX_Merge(src proto.Message)
func (*MsgRepayAssetResponse) XXX_Size ¶
func (m *MsgRepayAssetResponse) XXX_Size() int
func (*MsgRepayAssetResponse) XXX_Unmarshal ¶
func (m *MsgRepayAssetResponse) XXX_Unmarshal(b []byte) error
type MsgServer ¶
type MsgServer interface { // LendAsset defines a method for lending coins to the capital facility. LendAsset(context.Context, *MsgLendAsset) (*MsgLendAssetResponse, error) // WithdrawAsset defines a method for withdrawing previously lent coins from // the capital facility. WithdrawAsset(context.Context, *MsgWithdrawAsset) (*MsgWithdrawAssetResponse, error) // SetCollateral defines a method for users to enable or disable a uToken // denomination in their wallet for use as collateral. SetCollateral(context.Context, *MsgSetCollateral) (*MsgSetCollateralResponse, error) // BorrowAsset defines a method for borrowing coins from the capital facility. BorrowAsset(context.Context, *MsgBorrowAsset) (*MsgBorrowAssetResponse, error) // RepayAsset defines a method for repaying borrowed coins to the capital facility. RepayAsset(context.Context, *MsgRepayAsset) (*MsgRepayAssetResponse, error) }
MsgServer is the server API for Msg service.
type MsgSetCollateral ¶
type MsgSetCollateral struct { Borrower string `protobuf:"bytes,1,opt,name=borrower,proto3" json:"borrower,omitempty"` Denom string `protobuf:"bytes,2,opt,name=denom,proto3" json:"denom,omitempty"` Enable bool `protobuf:"varint,3,opt,name=enable,proto3" json:"enable,omitempty"` }
MsgSetCollateral represents a lender's request to enable or disable a uToken type in their possession as collateral.
func (*MsgSetCollateral) Descriptor ¶
func (*MsgSetCollateral) Descriptor() ([]byte, []int)
func (*MsgSetCollateral) GetBorrower ¶
func (m *MsgSetCollateral) GetBorrower() string
func (*MsgSetCollateral) GetDenom ¶
func (m *MsgSetCollateral) GetDenom() string
func (*MsgSetCollateral) GetEnable ¶
func (m *MsgSetCollateral) GetEnable() bool
func (*MsgSetCollateral) GetSigners ¶
func (msg *MsgSetCollateral) GetSigners() []sdk.AccAddress
func (*MsgSetCollateral) Marshal ¶
func (m *MsgSetCollateral) Marshal() (dAtA []byte, err error)
func (*MsgSetCollateral) MarshalToSizedBuffer ¶
func (m *MsgSetCollateral) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*MsgSetCollateral) ProtoMessage ¶
func (*MsgSetCollateral) ProtoMessage()
func (*MsgSetCollateral) Reset ¶
func (m *MsgSetCollateral) Reset()
func (*MsgSetCollateral) Size ¶
func (m *MsgSetCollateral) Size() (n int)
func (*MsgSetCollateral) String ¶
func (m *MsgSetCollateral) String() string
func (*MsgSetCollateral) Unmarshal ¶
func (m *MsgSetCollateral) Unmarshal(dAtA []byte) error
func (*MsgSetCollateral) ValidateBasic ¶
func (msg *MsgSetCollateral) ValidateBasic() error
func (*MsgSetCollateral) XXX_DiscardUnknown ¶
func (m *MsgSetCollateral) XXX_DiscardUnknown()
func (*MsgSetCollateral) XXX_Marshal ¶
func (m *MsgSetCollateral) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*MsgSetCollateral) XXX_Merge ¶
func (m *MsgSetCollateral) XXX_Merge(src proto.Message)
func (*MsgSetCollateral) XXX_Size ¶
func (m *MsgSetCollateral) XXX_Size() int
func (*MsgSetCollateral) XXX_Unmarshal ¶
func (m *MsgSetCollateral) XXX_Unmarshal(b []byte) error
type MsgSetCollateralResponse ¶
type MsgSetCollateralResponse struct { }
MsgSetCollateralResponse defines the Msg/SetCollateral response type.
func (*MsgSetCollateralResponse) Descriptor ¶
func (*MsgSetCollateralResponse) Descriptor() ([]byte, []int)
func (*MsgSetCollateralResponse) Marshal ¶
func (m *MsgSetCollateralResponse) Marshal() (dAtA []byte, err error)
func (*MsgSetCollateralResponse) MarshalTo ¶
func (m *MsgSetCollateralResponse) MarshalTo(dAtA []byte) (int, error)
func (*MsgSetCollateralResponse) MarshalToSizedBuffer ¶
func (m *MsgSetCollateralResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*MsgSetCollateralResponse) ProtoMessage ¶
func (*MsgSetCollateralResponse) ProtoMessage()
func (*MsgSetCollateralResponse) Reset ¶
func (m *MsgSetCollateralResponse) Reset()
func (*MsgSetCollateralResponse) Size ¶
func (m *MsgSetCollateralResponse) Size() (n int)
func (*MsgSetCollateralResponse) String ¶
func (m *MsgSetCollateralResponse) String() string
func (*MsgSetCollateralResponse) Unmarshal ¶
func (m *MsgSetCollateralResponse) Unmarshal(dAtA []byte) error
func (*MsgSetCollateralResponse) XXX_DiscardUnknown ¶
func (m *MsgSetCollateralResponse) XXX_DiscardUnknown()
func (*MsgSetCollateralResponse) XXX_Marshal ¶
func (m *MsgSetCollateralResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*MsgSetCollateralResponse) XXX_Merge ¶
func (m *MsgSetCollateralResponse) XXX_Merge(src proto.Message)
func (*MsgSetCollateralResponse) XXX_Size ¶
func (m *MsgSetCollateralResponse) XXX_Size() int
func (*MsgSetCollateralResponse) XXX_Unmarshal ¶
func (m *MsgSetCollateralResponse) XXX_Unmarshal(b []byte) error
type MsgWithdrawAsset ¶
type MsgWithdrawAsset struct { Lender string `protobuf:"bytes,1,opt,name=lender,proto3" json:"lender,omitempty"` Amount types.Coin `protobuf:"bytes,2,opt,name=amount,proto3" json:"amount"` }
MsgWithdrawAsset represents a lender's request to withdraw a previously lent base asset type from the module
func (*MsgWithdrawAsset) Descriptor ¶
func (*MsgWithdrawAsset) Descriptor() ([]byte, []int)
func (*MsgWithdrawAsset) GetAmount ¶
func (m *MsgWithdrawAsset) GetAmount() types.Coin
func (*MsgWithdrawAsset) GetLender ¶
func (m *MsgWithdrawAsset) GetLender() string
func (*MsgWithdrawAsset) GetSigners ¶
func (msg *MsgWithdrawAsset) GetSigners() []sdk.AccAddress
func (*MsgWithdrawAsset) Marshal ¶
func (m *MsgWithdrawAsset) Marshal() (dAtA []byte, err error)
func (*MsgWithdrawAsset) MarshalToSizedBuffer ¶
func (m *MsgWithdrawAsset) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*MsgWithdrawAsset) ProtoMessage ¶
func (*MsgWithdrawAsset) ProtoMessage()
func (*MsgWithdrawAsset) Reset ¶
func (m *MsgWithdrawAsset) Reset()
func (*MsgWithdrawAsset) Size ¶
func (m *MsgWithdrawAsset) Size() (n int)
func (*MsgWithdrawAsset) String ¶
func (m *MsgWithdrawAsset) String() string
func (*MsgWithdrawAsset) Unmarshal ¶
func (m *MsgWithdrawAsset) Unmarshal(dAtA []byte) error
func (*MsgWithdrawAsset) ValidateBasic ¶
func (msg *MsgWithdrawAsset) ValidateBasic() error
func (*MsgWithdrawAsset) XXX_DiscardUnknown ¶
func (m *MsgWithdrawAsset) XXX_DiscardUnknown()
func (*MsgWithdrawAsset) XXX_Marshal ¶
func (m *MsgWithdrawAsset) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*MsgWithdrawAsset) XXX_Merge ¶
func (m *MsgWithdrawAsset) XXX_Merge(src proto.Message)
func (*MsgWithdrawAsset) XXX_Size ¶
func (m *MsgWithdrawAsset) XXX_Size() int
func (*MsgWithdrawAsset) XXX_Unmarshal ¶
func (m *MsgWithdrawAsset) XXX_Unmarshal(b []byte) error
type MsgWithdrawAssetResponse ¶
type MsgWithdrawAssetResponse struct { }
MsgWithdrawAssetResponse defines the Msg/WithdrawAsset response type.
func (*MsgWithdrawAssetResponse) Descriptor ¶
func (*MsgWithdrawAssetResponse) Descriptor() ([]byte, []int)
func (*MsgWithdrawAssetResponse) Marshal ¶
func (m *MsgWithdrawAssetResponse) Marshal() (dAtA []byte, err error)
func (*MsgWithdrawAssetResponse) MarshalTo ¶
func (m *MsgWithdrawAssetResponse) MarshalTo(dAtA []byte) (int, error)
func (*MsgWithdrawAssetResponse) MarshalToSizedBuffer ¶
func (m *MsgWithdrawAssetResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*MsgWithdrawAssetResponse) ProtoMessage ¶
func (*MsgWithdrawAssetResponse) ProtoMessage()
func (*MsgWithdrawAssetResponse) Reset ¶
func (m *MsgWithdrawAssetResponse) Reset()
func (*MsgWithdrawAssetResponse) Size ¶
func (m *MsgWithdrawAssetResponse) Size() (n int)
func (*MsgWithdrawAssetResponse) String ¶
func (m *MsgWithdrawAssetResponse) String() string
func (*MsgWithdrawAssetResponse) Unmarshal ¶
func (m *MsgWithdrawAssetResponse) Unmarshal(dAtA []byte) error
func (*MsgWithdrawAssetResponse) XXX_DiscardUnknown ¶
func (m *MsgWithdrawAssetResponse) XXX_DiscardUnknown()
func (*MsgWithdrawAssetResponse) XXX_Marshal ¶
func (m *MsgWithdrawAssetResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*MsgWithdrawAssetResponse) XXX_Merge ¶
func (m *MsgWithdrawAssetResponse) XXX_Merge(src proto.Message)
func (*MsgWithdrawAssetResponse) XXX_Size ¶
func (m *MsgWithdrawAssetResponse) XXX_Size() int
func (*MsgWithdrawAssetResponse) XXX_Unmarshal ¶
func (m *MsgWithdrawAssetResponse) XXX_Unmarshal(b []byte) error
type Params ¶
type Params struct { }
Params defines the parameters for the leverage module.
func (*Params) Descriptor ¶
func (*Params) MarshalToSizedBuffer ¶
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) XXX_DiscardUnknown ¶
func (m *Params) XXX_DiscardUnknown()
func (*Params) XXX_Marshal ¶
func (*Params) XXX_Unmarshal ¶
type QueryClient ¶
type QueryClient interface { }
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 Token ¶
type Token struct { // The base_denom defines 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"` // The exchange_rate rate defines the rate which this asset can be exchanged // for the asset's uToken. ExchangeRate github_com_cosmos_cosmos_sdk_types.Dec `` /* 158-byte string literal not displayed */ // The collateral_weight defines what amount of the total value of the asset // can contribute to a users bowering 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 */ // The base_borrow_rate defines the base interest rate for borrowing this // asset. BaseBorrowRate github_com_cosmos_cosmos_sdk_types.Dec `` /* 169-byte string literal not displayed */ }
Token defines a token, along with its capital metadata, in the Hilo capital facility that can be loaned and borrowed.
TODO: Determine what additional parameters might be needed.
func (*Token) Descriptor ¶
func (*Token) GetBaseDenom ¶
func (*Token) ProtoMessage ¶
func (*Token) ProtoMessage()
func (Token) Validate ¶
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 (*Token) XXX_Unmarshal ¶
type UnimplementedMsgServer ¶
type UnimplementedMsgServer struct { }
UnimplementedMsgServer can be embedded to have forward compatible implementations.
func (*UnimplementedMsgServer) BorrowAsset ¶
func (*UnimplementedMsgServer) BorrowAsset(ctx context.Context, req *MsgBorrowAsset) (*MsgBorrowAssetResponse, error)
func (*UnimplementedMsgServer) LendAsset ¶
func (*UnimplementedMsgServer) LendAsset(ctx context.Context, req *MsgLendAsset) (*MsgLendAssetResponse, error)
func (*UnimplementedMsgServer) RepayAsset ¶
func (*UnimplementedMsgServer) RepayAsset(ctx context.Context, req *MsgRepayAsset) (*MsgRepayAssetResponse, error)
func (*UnimplementedMsgServer) SetCollateral ¶
func (*UnimplementedMsgServer) SetCollateral(ctx context.Context, req *MsgSetCollateral) (*MsgSetCollateralResponse, error)
func (*UnimplementedMsgServer) WithdrawAsset ¶
func (*UnimplementedMsgServer) WithdrawAsset(ctx context.Context, req *MsgWithdrawAsset) (*MsgWithdrawAssetResponse, error)
type UnimplementedQueryServer ¶
type UnimplementedQueryServer struct { }
UnimplementedQueryServer can be embedded to have forward compatible implementations.
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 Hilo 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