Documentation ¶
Overview ¶
Package types is a reverse proxy.
It translates gRPC into RESTful JSON APIs.
Index ¶
- Constants
- Variables
- func CdpKeySuffix(denomByte byte, cdpID uint64) []byte
- func CollateralRatioBytes(ratio sdk.Dec) []byte
- func CollateralRatioIterKey(denomByte byte, ratio sdk.Dec) []byte
- func CollateralRatioKey(denomByte byte, cdpID uint64, ratio sdk.Dec) []byte
- func DenomIterKey(denomByte byte) []byte
- func DepositIterKey(cdpID uint64) []byte
- func DepositKeySuffix(cdpID uint64, depositor sdk.AccAddress) []byte
- func GetCdpIDBytes(cdpID uint64) (cdpIDBz []byte)
- func GetCdpIDFromBytes(bz []byte) (cdpID uint64)
- func KeyPrefix(p string) []byte
- func ParamKeyTable() paramstype.KeyTable
- func ParseDecBytes(db []byte) (sdk.Dec, error)
- func RegisterCodec(cdc *codec.LegacyAmino)
- func RegisterInterfaces(registry cdctypes.InterfaceRegistry)
- func RegisterMsgServer(s grpc1.Server, srv MsgServer)
- func RegisterQueryHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
- func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, client QueryClient) error
- func RegisterQueryHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, ...) (err error)
- func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, server QueryServer) error
- func RegisterQueryServer(s grpc1.Server, srv QueryServer)
- func RelativePow(x sdk.Int, n sdk.Int, b sdk.Int) (z sdk.Int)
- func SortableDecBytes(dec sdk.Dec) []byte
- func SplitCdpKey(key []byte) (byte, uint64)
- func SplitCollateralRatioIterKey(key []byte) (denom byte, ratio sdk.Dec)
- func SplitCollateralRatioKey(key []byte) (denom byte, cdpID uint64, ratio sdk.Dec)
- func SplitDenomIterKey(key []byte) byte
- func SplitDepositIterKey(key []byte) (cdpID uint64)
- func SplitDepositKey(key []byte) (uint64, sdk.AccAddress)
- func ValidSortableDec(dec sdk.Dec) bool
- type AccountKeeper
- type AuctionKeeper
- type AugmentedCdp
- func (*AugmentedCdp) Descriptor() ([]byte, []int)
- func (m *AugmentedCdp) GetCollateralValue() types.Coin
- func (m *AugmentedCdp) Marshal() (dAtA []byte, err error)
- func (m *AugmentedCdp) MarshalTo(dAtA []byte) (int, error)
- func (m *AugmentedCdp) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*AugmentedCdp) ProtoMessage()
- func (m *AugmentedCdp) Reset()
- func (m *AugmentedCdp) Size() (n int)
- func (m *AugmentedCdp) String() string
- func (m *AugmentedCdp) Unmarshal(dAtA []byte) error
- func (m *AugmentedCdp) XXX_DiscardUnknown()
- func (m *AugmentedCdp) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *AugmentedCdp) XXX_Merge(src proto.Message)
- func (m *AugmentedCdp) XXX_Size() int
- func (m *AugmentedCdp) XXX_Unmarshal(b []byte) error
- type AugmentedCdps
- type BankKeeper
- type Cdp
- func (*Cdp) Descriptor() ([]byte, []int)
- func (m *Cdp) GetAccumulatedFees() types.Coin
- func (m *Cdp) GetCollateral() types.Coin
- func (m *Cdp) GetFeesUpdated() time.Time
- func (m *Cdp) GetId() uint64
- func (m *Cdp) GetPrincipal() types.Coin
- func (cdp Cdp) GetTotalPrincipal() sdk.Coin
- func (m *Cdp) GetType() string
- func (m *Cdp) Marshal() (dAtA []byte, err error)
- func (m *Cdp) MarshalTo(dAtA []byte) (int, error)
- func (m *Cdp) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*Cdp) ProtoMessage()
- func (m *Cdp) Reset()
- func (m *Cdp) Size() (n int)
- func (m *Cdp) String() string
- func (m *Cdp) Unmarshal(dAtA []byte) error
- func (cdp Cdp) Validate() error
- func (m *Cdp) XXX_DiscardUnknown()
- func (m *Cdp) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Cdp) XXX_Merge(src proto.Message)
- func (m *Cdp) XXX_Size() int
- func (m *Cdp) XXX_Unmarshal(b []byte) error
- type CdpHooks
- type Cdps
- type CollateralParam
- func (*CollateralParam) Descriptor() ([]byte, []int)
- func (m *CollateralParam) GetDebtLimit() types.Coin
- func (m *CollateralParam) GetDenom() string
- func (m *CollateralParam) GetLiquidationMarketId() string
- func (m *CollateralParam) GetPrefix() uint32
- func (m *CollateralParam) GetSpotMarketId() string
- func (m *CollateralParam) GetType() string
- func (m *CollateralParam) Marshal() (dAtA []byte, err error)
- func (m *CollateralParam) MarshalTo(dAtA []byte) (int, error)
- func (m *CollateralParam) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*CollateralParam) ProtoMessage()
- func (m *CollateralParam) Reset()
- func (m *CollateralParam) Size() (n int)
- func (m *CollateralParam) String() string
- func (m *CollateralParam) Unmarshal(dAtA []byte) error
- func (m *CollateralParam) XXX_DiscardUnknown()
- func (m *CollateralParam) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *CollateralParam) XXX_Merge(src proto.Message)
- func (m *CollateralParam) XXX_Size() int
- func (m *CollateralParam) XXX_Unmarshal(b []byte) error
- type CollateralParams
- type DebtDenomMap
- type DebtParam
- func (*DebtParam) Descriptor() ([]byte, []int)
- func (m *DebtParam) GetCircuitBreaker() bool
- func (m *DebtParam) GetDebtDenom() string
- func (m *DebtParam) GetDenom() string
- func (m *DebtParam) GetGlobalDebtLimit() types.Coin
- func (m *DebtParam) GetReferenceAsset() string
- func (m *DebtParam) Marshal() (dAtA []byte, err error)
- func (m *DebtParam) MarshalTo(dAtA []byte) (int, error)
- func (m *DebtParam) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*DebtParam) ProtoMessage()
- func (m *DebtParam) Reset()
- func (m *DebtParam) Size() (n int)
- func (m *DebtParam) String() string
- func (m *DebtParam) Unmarshal(dAtA []byte) error
- func (m *DebtParam) XXX_DiscardUnknown()
- func (m *DebtParam) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *DebtParam) XXX_Merge(src proto.Message)
- func (m *DebtParam) XXX_Size() int
- func (m *DebtParam) XXX_Unmarshal(b []byte) error
- type DebtParams
- type Deposit
- func (*Deposit) Descriptor() ([]byte, []int)
- func (d Deposit) Empty() bool
- func (d Deposit) Equals(comp Deposit) bool
- func (m *Deposit) GetAmount() types.Coin
- func (m *Deposit) GetCdpId() uint64
- func (m *Deposit) Marshal() (dAtA []byte, err error)
- func (m *Deposit) MarshalTo(dAtA []byte) (int, error)
- func (m *Deposit) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*Deposit) ProtoMessage()
- func (m *Deposit) Reset()
- func (m *Deposit) Size() (n int)
- func (m *Deposit) String() string
- func (m *Deposit) Unmarshal(dAtA []byte) error
- func (d Deposit) Validate() error
- func (m *Deposit) XXX_DiscardUnknown()
- func (m *Deposit) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Deposit) XXX_Merge(src proto.Message)
- func (m *Deposit) XXX_Size() int
- func (m *Deposit) XXX_Unmarshal(b []byte) error
- type Deposits
- type GenesisAccumulationTime
- func (*GenesisAccumulationTime) Descriptor() ([]byte, []int)
- func (m *GenesisAccumulationTime) GetCollateralType() string
- func (m *GenesisAccumulationTime) GetPreviousAccumulationTime() time.Time
- func (m *GenesisAccumulationTime) Marshal() (dAtA []byte, err error)
- func (m *GenesisAccumulationTime) MarshalTo(dAtA []byte) (int, error)
- func (m *GenesisAccumulationTime) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*GenesisAccumulationTime) ProtoMessage()
- func (m *GenesisAccumulationTime) Reset()
- func (m *GenesisAccumulationTime) Size() (n int)
- func (m *GenesisAccumulationTime) String() string
- func (m *GenesisAccumulationTime) Unmarshal(dAtA []byte) error
- func (gat GenesisAccumulationTime) Validate() error
- func (m *GenesisAccumulationTime) XXX_DiscardUnknown()
- func (m *GenesisAccumulationTime) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *GenesisAccumulationTime) XXX_Merge(src proto.Message)
- func (m *GenesisAccumulationTime) XXX_Size() int
- func (m *GenesisAccumulationTime) XXX_Unmarshal(b []byte) error
- type GenesisAccumulationTimes
- type GenesisState
- func (*GenesisState) Descriptor() ([]byte, []int)
- func (gs GenesisState) Equal(gs2 GenesisState) bool
- func (m *GenesisState) GetCdps() []Cdp
- func (m *GenesisState) GetDeposits() []Deposit
- func (m *GenesisState) GetGovDenom() string
- func (m *GenesisState) GetParams() Params
- func (m *GenesisState) GetPreviousAccumulationTimes() []GenesisAccumulationTime
- func (m *GenesisState) GetStartingCdpId() uint64
- func (m *GenesisState) GetTotalPrincipals() []GenesisTotalPrincipal
- func (gs GenesisState) IsEmpty() bool
- 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 GenesisTotalPrincipal
- func (*GenesisTotalPrincipal) Descriptor() ([]byte, []int)
- func (m *GenesisTotalPrincipal) GetCollateralType() string
- func (m *GenesisTotalPrincipal) Marshal() (dAtA []byte, err error)
- func (m *GenesisTotalPrincipal) MarshalTo(dAtA []byte) (int, error)
- func (m *GenesisTotalPrincipal) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*GenesisTotalPrincipal) ProtoMessage()
- func (m *GenesisTotalPrincipal) Reset()
- func (m *GenesisTotalPrincipal) Size() (n int)
- func (m *GenesisTotalPrincipal) String() string
- func (m *GenesisTotalPrincipal) Unmarshal(dAtA []byte) error
- func (gtp GenesisTotalPrincipal) Validate() error
- func (m *GenesisTotalPrincipal) XXX_DiscardUnknown()
- func (m *GenesisTotalPrincipal) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *GenesisTotalPrincipal) XXX_Merge(src proto.Message)
- func (m *GenesisTotalPrincipal) XXX_Size() int
- func (m *GenesisTotalPrincipal) XXX_Unmarshal(b []byte) error
- type GenesisTotalPrincipals
- type MsgClient
- type MsgCreateCdp
- func (*MsgCreateCdp) Descriptor() ([]byte, []int)
- func (m *MsgCreateCdp) GetCollateral() types.Coin
- func (m *MsgCreateCdp) GetCollateralType() string
- func (m *MsgCreateCdp) GetPrincipal() types.Coin
- func (msg MsgCreateCdp) GetSignBytes() []byte
- func (msg MsgCreateCdp) GetSigners() []sdk.AccAddress
- func (m *MsgCreateCdp) Marshal() (dAtA []byte, err error)
- func (m *MsgCreateCdp) MarshalTo(dAtA []byte) (int, error)
- func (m *MsgCreateCdp) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*MsgCreateCdp) ProtoMessage()
- func (m *MsgCreateCdp) Reset()
- func (msg MsgCreateCdp) Route() string
- func (m *MsgCreateCdp) Size() (n int)
- func (m *MsgCreateCdp) String() string
- func (msg MsgCreateCdp) Type() string
- func (m *MsgCreateCdp) Unmarshal(dAtA []byte) error
- func (msg MsgCreateCdp) ValidateBasic() error
- func (m *MsgCreateCdp) XXX_DiscardUnknown()
- func (m *MsgCreateCdp) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *MsgCreateCdp) XXX_Merge(src proto.Message)
- func (m *MsgCreateCdp) XXX_Size() int
- func (m *MsgCreateCdp) XXX_Unmarshal(b []byte) error
- type MsgCreateCdpResponse
- func (*MsgCreateCdpResponse) Descriptor() ([]byte, []int)
- func (m *MsgCreateCdpResponse) Marshal() (dAtA []byte, err error)
- func (m *MsgCreateCdpResponse) MarshalTo(dAtA []byte) (int, error)
- func (m *MsgCreateCdpResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*MsgCreateCdpResponse) ProtoMessage()
- func (m *MsgCreateCdpResponse) Reset()
- func (m *MsgCreateCdpResponse) Size() (n int)
- func (m *MsgCreateCdpResponse) String() string
- func (m *MsgCreateCdpResponse) Unmarshal(dAtA []byte) error
- func (m *MsgCreateCdpResponse) XXX_DiscardUnknown()
- func (m *MsgCreateCdpResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *MsgCreateCdpResponse) XXX_Merge(src proto.Message)
- func (m *MsgCreateCdpResponse) XXX_Size() int
- func (m *MsgCreateCdpResponse) XXX_Unmarshal(b []byte) error
- type MsgDeposit
- func (*MsgDeposit) Descriptor() ([]byte, []int)
- func (m *MsgDeposit) GetCollateral() types.Coin
- func (m *MsgDeposit) GetCollateralType() string
- func (msg MsgDeposit) GetSignBytes() []byte
- func (msg MsgDeposit) GetSigners() []sdk.AccAddress
- func (m *MsgDeposit) Marshal() (dAtA []byte, err error)
- func (m *MsgDeposit) MarshalTo(dAtA []byte) (int, error)
- func (m *MsgDeposit) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*MsgDeposit) ProtoMessage()
- func (m *MsgDeposit) Reset()
- func (msg MsgDeposit) Route() string
- func (m *MsgDeposit) Size() (n int)
- func (m *MsgDeposit) String() string
- func (msg MsgDeposit) Type() string
- func (m *MsgDeposit) Unmarshal(dAtA []byte) error
- func (msg MsgDeposit) ValidateBasic() error
- func (m *MsgDeposit) XXX_DiscardUnknown()
- func (m *MsgDeposit) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *MsgDeposit) XXX_Merge(src proto.Message)
- func (m *MsgDeposit) XXX_Size() int
- func (m *MsgDeposit) XXX_Unmarshal(b []byte) error
- type MsgDepositResponse
- func (*MsgDepositResponse) Descriptor() ([]byte, []int)
- func (m *MsgDepositResponse) Marshal() (dAtA []byte, err error)
- func (m *MsgDepositResponse) MarshalTo(dAtA []byte) (int, error)
- func (m *MsgDepositResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*MsgDepositResponse) ProtoMessage()
- func (m *MsgDepositResponse) Reset()
- func (m *MsgDepositResponse) Size() (n int)
- func (m *MsgDepositResponse) String() string
- func (m *MsgDepositResponse) Unmarshal(dAtA []byte) error
- func (m *MsgDepositResponse) XXX_DiscardUnknown()
- func (m *MsgDepositResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *MsgDepositResponse) XXX_Merge(src proto.Message)
- func (m *MsgDepositResponse) XXX_Size() int
- func (m *MsgDepositResponse) XXX_Unmarshal(b []byte) error
- type MsgDrawDebt
- func (*MsgDrawDebt) Descriptor() ([]byte, []int)
- func (m *MsgDrawDebt) GetCollateralType() string
- func (m *MsgDrawDebt) GetPrincipal() types.Coin
- func (msg MsgDrawDebt) GetSignBytes() []byte
- func (msg MsgDrawDebt) GetSigners() []sdk.AccAddress
- func (m *MsgDrawDebt) Marshal() (dAtA []byte, err error)
- func (m *MsgDrawDebt) MarshalTo(dAtA []byte) (int, error)
- func (m *MsgDrawDebt) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*MsgDrawDebt) ProtoMessage()
- func (m *MsgDrawDebt) Reset()
- func (msg MsgDrawDebt) Route() string
- func (m *MsgDrawDebt) Size() (n int)
- func (m *MsgDrawDebt) String() string
- func (msg MsgDrawDebt) Type() string
- func (m *MsgDrawDebt) Unmarshal(dAtA []byte) error
- func (msg MsgDrawDebt) ValidateBasic() error
- func (m *MsgDrawDebt) XXX_DiscardUnknown()
- func (m *MsgDrawDebt) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *MsgDrawDebt) XXX_Merge(src proto.Message)
- func (m *MsgDrawDebt) XXX_Size() int
- func (m *MsgDrawDebt) XXX_Unmarshal(b []byte) error
- type MsgDrawDebtResponse
- func (*MsgDrawDebtResponse) Descriptor() ([]byte, []int)
- func (m *MsgDrawDebtResponse) Marshal() (dAtA []byte, err error)
- func (m *MsgDrawDebtResponse) MarshalTo(dAtA []byte) (int, error)
- func (m *MsgDrawDebtResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*MsgDrawDebtResponse) ProtoMessage()
- func (m *MsgDrawDebtResponse) Reset()
- func (m *MsgDrawDebtResponse) Size() (n int)
- func (m *MsgDrawDebtResponse) String() string
- func (m *MsgDrawDebtResponse) Unmarshal(dAtA []byte) error
- func (m *MsgDrawDebtResponse) XXX_DiscardUnknown()
- func (m *MsgDrawDebtResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *MsgDrawDebtResponse) XXX_Merge(src proto.Message)
- func (m *MsgDrawDebtResponse) XXX_Size() int
- func (m *MsgDrawDebtResponse) XXX_Unmarshal(b []byte) error
- type MsgLiquidate
- func (*MsgLiquidate) Descriptor() ([]byte, []int)
- func (m *MsgLiquidate) GetCollateralType() string
- func (msg MsgLiquidate) GetSignBytes() []byte
- func (msg MsgLiquidate) GetSigners() []sdk.AccAddress
- func (m *MsgLiquidate) Marshal() (dAtA []byte, err error)
- func (m *MsgLiquidate) MarshalTo(dAtA []byte) (int, error)
- func (m *MsgLiquidate) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*MsgLiquidate) ProtoMessage()
- func (m *MsgLiquidate) Reset()
- func (msg MsgLiquidate) Route() string
- func (m *MsgLiquidate) Size() (n int)
- func (m *MsgLiquidate) String() string
- func (msg MsgLiquidate) Type() string
- func (m *MsgLiquidate) Unmarshal(dAtA []byte) error
- func (msg MsgLiquidate) ValidateBasic() error
- func (m *MsgLiquidate) XXX_DiscardUnknown()
- func (m *MsgLiquidate) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *MsgLiquidate) XXX_Merge(src proto.Message)
- func (m *MsgLiquidate) XXX_Size() int
- func (m *MsgLiquidate) XXX_Unmarshal(b []byte) error
- type MsgLiquidateResponse
- func (*MsgLiquidateResponse) Descriptor() ([]byte, []int)
- func (m *MsgLiquidateResponse) Marshal() (dAtA []byte, err error)
- func (m *MsgLiquidateResponse) MarshalTo(dAtA []byte) (int, error)
- func (m *MsgLiquidateResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*MsgLiquidateResponse) ProtoMessage()
- func (m *MsgLiquidateResponse) Reset()
- func (m *MsgLiquidateResponse) Size() (n int)
- func (m *MsgLiquidateResponse) String() string
- func (m *MsgLiquidateResponse) Unmarshal(dAtA []byte) error
- func (m *MsgLiquidateResponse) XXX_DiscardUnknown()
- func (m *MsgLiquidateResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *MsgLiquidateResponse) XXX_Merge(src proto.Message)
- func (m *MsgLiquidateResponse) XXX_Size() int
- func (m *MsgLiquidateResponse) XXX_Unmarshal(b []byte) error
- type MsgRepayDebt
- func (*MsgRepayDebt) Descriptor() ([]byte, []int)
- func (m *MsgRepayDebt) GetCollateralType() string
- func (m *MsgRepayDebt) GetPayment() types.Coin
- func (msg MsgRepayDebt) GetSignBytes() []byte
- func (msg MsgRepayDebt) GetSigners() []sdk.AccAddress
- func (m *MsgRepayDebt) Marshal() (dAtA []byte, err error)
- func (m *MsgRepayDebt) MarshalTo(dAtA []byte) (int, error)
- func (m *MsgRepayDebt) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*MsgRepayDebt) ProtoMessage()
- func (m *MsgRepayDebt) Reset()
- func (msg MsgRepayDebt) Route() string
- func (m *MsgRepayDebt) Size() (n int)
- func (m *MsgRepayDebt) String() string
- func (msg MsgRepayDebt) Type() string
- func (m *MsgRepayDebt) Unmarshal(dAtA []byte) error
- func (msg MsgRepayDebt) ValidateBasic() error
- func (m *MsgRepayDebt) XXX_DiscardUnknown()
- func (m *MsgRepayDebt) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *MsgRepayDebt) XXX_Merge(src proto.Message)
- func (m *MsgRepayDebt) XXX_Size() int
- func (m *MsgRepayDebt) XXX_Unmarshal(b []byte) error
- type MsgRepayDebtResponse
- func (*MsgRepayDebtResponse) Descriptor() ([]byte, []int)
- func (m *MsgRepayDebtResponse) Marshal() (dAtA []byte, err error)
- func (m *MsgRepayDebtResponse) MarshalTo(dAtA []byte) (int, error)
- func (m *MsgRepayDebtResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*MsgRepayDebtResponse) ProtoMessage()
- func (m *MsgRepayDebtResponse) Reset()
- func (m *MsgRepayDebtResponse) Size() (n int)
- func (m *MsgRepayDebtResponse) String() string
- func (m *MsgRepayDebtResponse) Unmarshal(dAtA []byte) error
- func (m *MsgRepayDebtResponse) XXX_DiscardUnknown()
- func (m *MsgRepayDebtResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *MsgRepayDebtResponse) XXX_Merge(src proto.Message)
- func (m *MsgRepayDebtResponse) XXX_Size() int
- func (m *MsgRepayDebtResponse) XXX_Unmarshal(b []byte) error
- type MsgServer
- type MsgWithdraw
- func (*MsgWithdraw) Descriptor() ([]byte, []int)
- func (m *MsgWithdraw) GetCollateral() types.Coin
- func (m *MsgWithdraw) GetCollateralType() string
- func (msg MsgWithdraw) GetSignBytes() []byte
- func (msg MsgWithdraw) GetSigners() []sdk.AccAddress
- func (m *MsgWithdraw) Marshal() (dAtA []byte, err error)
- func (m *MsgWithdraw) MarshalTo(dAtA []byte) (int, error)
- func (m *MsgWithdraw) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*MsgWithdraw) ProtoMessage()
- func (m *MsgWithdraw) Reset()
- func (msg MsgWithdraw) Route() string
- func (m *MsgWithdraw) Size() (n int)
- func (m *MsgWithdraw) String() string
- func (msg MsgWithdraw) Type() string
- func (m *MsgWithdraw) Unmarshal(dAtA []byte) error
- func (msg MsgWithdraw) ValidateBasic() error
- func (m *MsgWithdraw) XXX_DiscardUnknown()
- func (m *MsgWithdraw) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *MsgWithdraw) XXX_Merge(src proto.Message)
- func (m *MsgWithdraw) XXX_Size() int
- func (m *MsgWithdraw) XXX_Unmarshal(b []byte) error
- type MsgWithdrawResponse
- func (*MsgWithdrawResponse) Descriptor() ([]byte, []int)
- func (m *MsgWithdrawResponse) Marshal() (dAtA []byte, err error)
- func (m *MsgWithdrawResponse) MarshalTo(dAtA []byte) (int, error)
- func (m *MsgWithdrawResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*MsgWithdrawResponse) ProtoMessage()
- func (m *MsgWithdrawResponse) Reset()
- func (m *MsgWithdrawResponse) Size() (n int)
- func (m *MsgWithdrawResponse) String() string
- func (m *MsgWithdrawResponse) Unmarshal(dAtA []byte) error
- func (m *MsgWithdrawResponse) XXX_DiscardUnknown()
- func (m *MsgWithdrawResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *MsgWithdrawResponse) XXX_Merge(src proto.Message)
- func (m *MsgWithdrawResponse) XXX_Size() int
- func (m *MsgWithdrawResponse) XXX_Unmarshal(b []byte) error
- type MultiCdpHooks
- type Params
- func (*Params) Descriptor() ([]byte, []int)
- func (m *Params) GetCollateralParams() []CollateralParam
- func (m *Params) GetDebtParams() []DebtParam
- 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() paramstype.ParamSetPairs
- func (*Params) ProtoMessage()
- func (m *Params) Reset()
- func (m *Params) Size() (n int)
- func (m *Params) String() string
- func (m *Params) Unmarshal(dAtA []byte) error
- func (p Params) Validate() error
- func (m *Params) XXX_DiscardUnknown()
- func (m *Params) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Params) XXX_Merge(src proto.Message)
- func (m *Params) XXX_Size() int
- func (m *Params) XXX_Unmarshal(b []byte) error
- type PricefeedKeeper
- type QueryAllAccountRequest
- func (*QueryAllAccountRequest) Descriptor() ([]byte, []int)
- func (m *QueryAllAccountRequest) Marshal() (dAtA []byte, err error)
- func (m *QueryAllAccountRequest) MarshalTo(dAtA []byte) (int, error)
- func (m *QueryAllAccountRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*QueryAllAccountRequest) ProtoMessage()
- func (m *QueryAllAccountRequest) Reset()
- func (m *QueryAllAccountRequest) Size() (n int)
- func (m *QueryAllAccountRequest) String() string
- func (m *QueryAllAccountRequest) Unmarshal(dAtA []byte) error
- func (m *QueryAllAccountRequest) XXX_DiscardUnknown()
- func (m *QueryAllAccountRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *QueryAllAccountRequest) XXX_Merge(src proto.Message)
- func (m *QueryAllAccountRequest) XXX_Size() int
- func (m *QueryAllAccountRequest) XXX_Unmarshal(b []byte) error
- type QueryAllAccountResponse
- func (*QueryAllAccountResponse) Descriptor() ([]byte, []int)
- func (m *QueryAllAccountResponse) GetAccounts() []*types.Any
- func (m *QueryAllAccountResponse) Marshal() (dAtA []byte, err error)
- func (m *QueryAllAccountResponse) MarshalTo(dAtA []byte) (int, error)
- func (m *QueryAllAccountResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*QueryAllAccountResponse) ProtoMessage()
- func (m *QueryAllAccountResponse) Reset()
- func (m *QueryAllAccountResponse) Size() (n int)
- func (m *QueryAllAccountResponse) String() string
- func (m *QueryAllAccountResponse) Unmarshal(dAtA []byte) error
- func (m *QueryAllAccountResponse) XXX_DiscardUnknown()
- func (m *QueryAllAccountResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *QueryAllAccountResponse) XXX_Merge(src proto.Message)
- func (m *QueryAllAccountResponse) XXX_Size() int
- func (m *QueryAllAccountResponse) XXX_Unmarshal(b []byte) error
- type QueryAllCdpRequest
- func (*QueryAllCdpRequest) Descriptor() ([]byte, []int)
- func (m *QueryAllCdpRequest) GetPagination() *query.PageRequest
- func (m *QueryAllCdpRequest) Marshal() (dAtA []byte, err error)
- func (m *QueryAllCdpRequest) MarshalTo(dAtA []byte) (int, error)
- func (m *QueryAllCdpRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*QueryAllCdpRequest) ProtoMessage()
- func (m *QueryAllCdpRequest) Reset()
- func (m *QueryAllCdpRequest) Size() (n int)
- func (m *QueryAllCdpRequest) String() string
- func (m *QueryAllCdpRequest) Unmarshal(dAtA []byte) error
- func (m *QueryAllCdpRequest) XXX_DiscardUnknown()
- func (m *QueryAllCdpRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *QueryAllCdpRequest) XXX_Merge(src proto.Message)
- func (m *QueryAllCdpRequest) XXX_Size() int
- func (m *QueryAllCdpRequest) XXX_Unmarshal(b []byte) error
- type QueryAllCdpResponse
- func (*QueryAllCdpResponse) Descriptor() ([]byte, []int)
- func (m *QueryAllCdpResponse) GetCdp() []AugmentedCdp
- func (m *QueryAllCdpResponse) GetPagination() *query.PageResponse
- func (m *QueryAllCdpResponse) Marshal() (dAtA []byte, err error)
- func (m *QueryAllCdpResponse) MarshalTo(dAtA []byte) (int, error)
- func (m *QueryAllCdpResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*QueryAllCdpResponse) ProtoMessage()
- func (m *QueryAllCdpResponse) Reset()
- func (m *QueryAllCdpResponse) Size() (n int)
- func (m *QueryAllCdpResponse) String() string
- func (m *QueryAllCdpResponse) Unmarshal(dAtA []byte) error
- func (m *QueryAllCdpResponse) XXX_DiscardUnknown()
- func (m *QueryAllCdpResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *QueryAllCdpResponse) XXX_Merge(src proto.Message)
- func (m *QueryAllCdpResponse) XXX_Size() int
- func (m *QueryAllCdpResponse) XXX_Unmarshal(b []byte) error
- type QueryAllDepositRequest
- func (*QueryAllDepositRequest) Descriptor() ([]byte, []int)
- func (m *QueryAllDepositRequest) GetCollateralType() string
- func (m *QueryAllDepositRequest) GetOwner() string
- func (m *QueryAllDepositRequest) Marshal() (dAtA []byte, err error)
- func (m *QueryAllDepositRequest) MarshalTo(dAtA []byte) (int, error)
- func (m *QueryAllDepositRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*QueryAllDepositRequest) ProtoMessage()
- func (m *QueryAllDepositRequest) Reset()
- func (m *QueryAllDepositRequest) Size() (n int)
- func (m *QueryAllDepositRequest) String() string
- func (m *QueryAllDepositRequest) Unmarshal(dAtA []byte) error
- func (m *QueryAllDepositRequest) XXX_DiscardUnknown()
- func (m *QueryAllDepositRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *QueryAllDepositRequest) XXX_Merge(src proto.Message)
- func (m *QueryAllDepositRequest) XXX_Size() int
- func (m *QueryAllDepositRequest) XXX_Unmarshal(b []byte) error
- type QueryAllDepositResponse
- func (*QueryAllDepositResponse) Descriptor() ([]byte, []int)
- func (m *QueryAllDepositResponse) GetDeposits() []Deposit
- func (m *QueryAllDepositResponse) Marshal() (dAtA []byte, err error)
- func (m *QueryAllDepositResponse) MarshalTo(dAtA []byte) (int, error)
- func (m *QueryAllDepositResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*QueryAllDepositResponse) ProtoMessage()
- func (m *QueryAllDepositResponse) Reset()
- func (m *QueryAllDepositResponse) Size() (n int)
- func (m *QueryAllDepositResponse) String() string
- func (m *QueryAllDepositResponse) Unmarshal(dAtA []byte) error
- func (m *QueryAllDepositResponse) XXX_DiscardUnknown()
- func (m *QueryAllDepositResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *QueryAllDepositResponse) XXX_Merge(src proto.Message)
- func (m *QueryAllDepositResponse) XXX_Size() int
- func (m *QueryAllDepositResponse) XXX_Unmarshal(b []byte) error
- type QueryClient
- type QueryGetCdpRequest
- func (*QueryGetCdpRequest) Descriptor() ([]byte, []int)
- func (m *QueryGetCdpRequest) GetCollateralType() string
- func (m *QueryGetCdpRequest) GetOwner() string
- func (m *QueryGetCdpRequest) Marshal() (dAtA []byte, err error)
- func (m *QueryGetCdpRequest) MarshalTo(dAtA []byte) (int, error)
- func (m *QueryGetCdpRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*QueryGetCdpRequest) ProtoMessage()
- func (m *QueryGetCdpRequest) Reset()
- func (m *QueryGetCdpRequest) Size() (n int)
- func (m *QueryGetCdpRequest) String() string
- func (m *QueryGetCdpRequest) Unmarshal(dAtA []byte) error
- func (m *QueryGetCdpRequest) XXX_DiscardUnknown()
- func (m *QueryGetCdpRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *QueryGetCdpRequest) XXX_Merge(src proto.Message)
- func (m *QueryGetCdpRequest) XXX_Size() int
- func (m *QueryGetCdpRequest) XXX_Unmarshal(b []byte) error
- type QueryGetCdpResponse
- func (*QueryGetCdpResponse) Descriptor() ([]byte, []int)
- func (m *QueryGetCdpResponse) GetCdp() AugmentedCdp
- func (m *QueryGetCdpResponse) Marshal() (dAtA []byte, err error)
- func (m *QueryGetCdpResponse) MarshalTo(dAtA []byte) (int, error)
- func (m *QueryGetCdpResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*QueryGetCdpResponse) ProtoMessage()
- func (m *QueryGetCdpResponse) Reset()
- func (m *QueryGetCdpResponse) Size() (n int)
- func (m *QueryGetCdpResponse) String() string
- func (m *QueryGetCdpResponse) Unmarshal(dAtA []byte) error
- func (m *QueryGetCdpResponse) XXX_DiscardUnknown()
- func (m *QueryGetCdpResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *QueryGetCdpResponse) XXX_Merge(src proto.Message)
- func (m *QueryGetCdpResponse) XXX_Size() int
- func (m *QueryGetCdpResponse) XXX_Unmarshal(b []byte) error
- type QueryParamsRequest
- func (*QueryParamsRequest) Descriptor() ([]byte, []int)
- func (m *QueryParamsRequest) Marshal() (dAtA []byte, err error)
- func (m *QueryParamsRequest) MarshalTo(dAtA []byte) (int, error)
- func (m *QueryParamsRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*QueryParamsRequest) ProtoMessage()
- func (m *QueryParamsRequest) Reset()
- func (m *QueryParamsRequest) Size() (n int)
- func (m *QueryParamsRequest) String() string
- func (m *QueryParamsRequest) Unmarshal(dAtA []byte) error
- func (m *QueryParamsRequest) XXX_DiscardUnknown()
- func (m *QueryParamsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *QueryParamsRequest) XXX_Merge(src proto.Message)
- func (m *QueryParamsRequest) XXX_Size() int
- func (m *QueryParamsRequest) XXX_Unmarshal(b []byte) error
- type QueryParamsResponse
- func (*QueryParamsResponse) Descriptor() ([]byte, []int)
- func (m *QueryParamsResponse) GetParams() *Params
- func (m *QueryParamsResponse) Marshal() (dAtA []byte, err error)
- func (m *QueryParamsResponse) MarshalTo(dAtA []byte) (int, error)
- func (m *QueryParamsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*QueryParamsResponse) ProtoMessage()
- func (m *QueryParamsResponse) Reset()
- func (m *QueryParamsResponse) Size() (n int)
- func (m *QueryParamsResponse) String() string
- func (m *QueryParamsResponse) Unmarshal(dAtA []byte) error
- func (m *QueryParamsResponse) XXX_DiscardUnknown()
- func (m *QueryParamsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *QueryParamsResponse) XXX_Merge(src proto.Message)
- func (m *QueryParamsResponse) XXX_Size() int
- func (m *QueryParamsResponse) XXX_Unmarshal(b []byte) error
- type QueryServer
- type UnimplementedMsgServer
- func (*UnimplementedMsgServer) CreateCdp(ctx context.Context, req *MsgCreateCdp) (*MsgCreateCdpResponse, error)
- func (*UnimplementedMsgServer) Deposit(ctx context.Context, req *MsgDeposit) (*MsgDepositResponse, error)
- func (*UnimplementedMsgServer) DrawDebt(ctx context.Context, req *MsgDrawDebt) (*MsgDrawDebtResponse, error)
- func (*UnimplementedMsgServer) Liquidate(ctx context.Context, req *MsgLiquidate) (*MsgLiquidateResponse, error)
- func (*UnimplementedMsgServer) RepayDebt(ctx context.Context, req *MsgRepayDebt) (*MsgRepayDebtResponse, error)
- func (*UnimplementedMsgServer) Withdraw(ctx context.Context, req *MsgWithdraw) (*MsgWithdrawResponse, error)
- type UnimplementedQueryServer
- func (*UnimplementedQueryServer) AccountAll(ctx context.Context, req *QueryAllAccountRequest) (*QueryAllAccountResponse, error)
- func (*UnimplementedQueryServer) Cdp(ctx context.Context, req *QueryGetCdpRequest) (*QueryGetCdpResponse, error)
- func (*UnimplementedQueryServer) CdpAll(ctx context.Context, req *QueryAllCdpRequest) (*QueryAllCdpResponse, error)
- func (*UnimplementedQueryServer) DepositAll(ctx context.Context, req *QueryAllDepositRequest) (*QueryAllDepositResponse, error)
- func (*UnimplementedQueryServer) Params(ctx context.Context, req *QueryParamsRequest) (*QueryParamsResponse, error)
Constants ¶
const ( EventTypeCreateCdp = "create_cdp" EventTypeCdpDeposit = "cdp_deposit" EventTypeCdpDraw = "cdp_draw" EventTypeCdpRepay = "cdp_repayment" EventTypeCdpClose = "cdp_close" EventTypeCdpWithdrawal = "cdp_withdrawal" EventTypeCdpLiquidation = "cdp_liquidation" EventTypeBeginBlockerFatal = "cdp_begin_block_error" AttributeKeyCdpID = "cdp_id" AttributeKeyDeposit = "deposit" AttributeValueCategory = "cdp" AttributeKeyError = "error_message" )
Event types for cdp module
const ( // ModuleName defines the module name ModuleName = "cdp" // 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 // MemStoreKey defines the in-memory store key MemStoreKey = "mem_capability" // LiquidatorMacc module account for liquidator LiquidatorMacc = "liquidator" )
const ( ParamsKey = "Params-value-" CdpKey = "Cdp-value-" // CdpCountKey = "Cdp-count-" CdpIDKey = "CdpID-value-" CdpIDOwnerIndex = "CdpID-Owner-index-" CdpIDCollateralRatioIndex = "CdpID-CollateralRatio-index-" NextCdpID = "NextCdpID" DebtDenom = "DebtDenom" GovDenom = "GovDenom" DepositKey = "Deposit-value-" PrincipalKey = "Principal-value-" PricefeedStatusKey = "PricefeedStatus-value-" PreviousAccrualTime = "PreviousAccrualTime-" InterestFactor = "InterestFactor-" )
const DefaultIndex uint64 = 1
DefaultIndex is the default capability global index
Variables ¶
var ( ErrInvalidLengthCdp = fmt.Errorf("proto: negative length found during unmarshaling") ErrIntOverflowCdp = fmt.Errorf("proto: integer overflow") ErrUnexpectedEndOfGroupCdp = fmt.Errorf("proto: unexpected end of group") )
var ( // ErrCdpAlreadyExists error for duplicate cdps ErrCdpAlreadyExists = sdkerrors.Register(ModuleName, 2, "cdp already exists") // ErrInvalidCollateralLength error for invalid collateral input length ErrInvalidCollateralLength = sdkerrors.Register(ModuleName, 3, "only one collateral type per cdp") // ErrCollateralNotSupported error for unsupported collateral ErrCollateralNotSupported = sdkerrors.Register(ModuleName, 4, "collateral not supported") // ErrDebtNotSupported error for unsupported debt ErrDebtNotSupported = sdkerrors.Register(ModuleName, 5, "debt not supported") // ErrExceedsDebtLimit error for attempted draws that exceed debt limit ErrExceedsDebtLimit = sdkerrors.Register(ModuleName, 6, "proposed debt increase would exceed debt limit") // ErrInvalidCollateralRatio error for attempted draws that are below liquidation ratio ErrInvalidCollateralRatio = sdkerrors.Register(ModuleName, 7, "proposed collateral ratio is below liquidation ratio") // ErrCdpNotFound error cdp not found ErrCdpNotFound = sdkerrors.Register(ModuleName, 8, "cdp not found") // ErrDepositNotFound error for deposit not found ErrDepositNotFound = sdkerrors.Register(ModuleName, 9, "deposit not found") // ErrInvalidDeposit error for invalid deposit ErrInvalidDeposit = sdkerrors.Register(ModuleName, 10, "invalid deposit") // ErrInvalidPayment error for invalid payment ErrInvalidPayment = sdkerrors.Register(ModuleName, 11, "invalid payment") //ErrDepositNotAvailable error for withdrawing deposits in liquidation ErrDepositNotAvailable = sdkerrors.Register(ModuleName, 12, "deposit in liquidation") // ErrInvalidWithdrawAmount error for invalid withdrawal amount ErrInvalidWithdrawAmount = sdkerrors.Register(ModuleName, 13, "withdrawal amount exceeds deposit") //ErrCdpNotAvailable error for depositing to a Cdp in liquidation ErrCdpNotAvailable = sdkerrors.Register(ModuleName, 14, "cannot modify cdp in liquidation") // ErrBelowDebtFloor error for creating a cdp with debt below the minimum ErrBelowDebtFloor = sdkerrors.Register(ModuleName, 15, "proposed cdp debt is below minimum") // ErrLoadingAugmentedCdp error loading augmented cdp ErrLoadingAugmentedCdp = sdkerrors.Register(ModuleName, 16, "augmented cdp could not be loaded from cdp") // ErrInvalidDebtRequest error for invalid principal input length ErrInvalidDebtRequest = sdkerrors.Register(ModuleName, 17, "only one principal type per cdp") // ErrDenomPrefixNotFound error for denom prefix not found ErrDenomPrefixNotFound = sdkerrors.Register(ModuleName, 18, "denom prefix not found") // ErrPricefeedDown error for when a price for the input denom is not found ErrPricefeedDown = sdkerrors.Register(ModuleName, 19, "no price found for collateral") // ErrInvalidCollateral error for when the input collateral denom does not match the expected collateral denom ErrInvalidCollateral = sdkerrors.Register(ModuleName, 20, "invalid collateral for input collateral type") // ErrAccountNotFound error for when no account is found for an input address ErrAccountNotFound = sdkerrors.Register(ModuleName, 21, "account not found") // ErrInsufficientBalance error for when an account does not have enough funds ErrInsufficientBalance = sdkerrors.Register(ModuleName, 22, "insufficient balance") // ErrNotLiquidatable error for when an cdp is not liquidatable ErrNotLiquidatable = sdkerrors.Register(ModuleName, 23, "cdp collateral ratio not below liquidation ratio") )
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 ( KeyGlobalDebtLimit = []byte("GlobalDebtLimit") KeyCollateralParams = []byte("CollateralParams") KeyDebtParam = []byte("DebtParam") KeyCircuitBreaker = []byte("CircuitBreaker") KeyDebtThreshold = []byte("DebtThreshold") KeyDebtLot = []byte("DebtLot") KeySurplusThreshold = []byte("SurplusThreshold") KeySurplusLot = []byte("SurplusLot") DefaultCollateralParams = CollateralParams{} DefaultDebtParams = DebtParams{ DebtParam{ Denom: "jpu", ReferenceAsset: "jpy", ConversionFactor: sdk.NewInt(6), DebtFloor: sdk.NewInt(1), GlobalDebtLimit: sdk.NewCoin(DefaultStableDenom, sdk.ZeroInt()), DebtDenom: "debtjpu", SurplusAuctionThreshold: sdk.NewInt(500000000000), SurplusAuctionLot: sdk.NewInt(10000000000), DebtAuctionThreshold: sdk.NewInt(100000000000), DebtAuctionLot: sdk.NewInt(10000000000), CircuitBreaker: false, }, DebtParam{ Denom: "euu", ReferenceAsset: "eur", ConversionFactor: sdk.NewInt(6), DebtFloor: sdk.NewInt(1), GlobalDebtLimit: sdk.NewCoin("euu", sdk.ZeroInt()), DebtDenom: "debteuu", SurplusAuctionThreshold: sdk.NewInt(500000000000), SurplusAuctionLot: sdk.NewInt(10000000000), DebtAuctionThreshold: sdk.NewInt(100000000000), DebtAuctionLot: sdk.NewInt(10000000000), CircuitBreaker: false, }, } DefaultCdpStartingID = uint64(1) DefaultGovDenom = "uguu" DefaultStableDenom = "jpu" )
Parameter keys
var ( ErrInvalidLengthQuery = fmt.Errorf("proto: negative length found during unmarshaling") ErrIntOverflowQuery = fmt.Errorf("proto: integer overflow") ErrUnexpectedEndOfGroupQuery = fmt.Errorf("proto: unexpected end of group") )
var ( ErrInvalidLengthTx = fmt.Errorf("proto: negative length found during unmarshaling") ErrIntOverflowTx = fmt.Errorf("proto: integer overflow") ErrUnexpectedEndOfGroupTx = fmt.Errorf("proto: unexpected end of group") )
var MaxSortableDec = sdk.OneDec().Quo(sdk.SmallestDec())
MaxSortableDec largest sortable sdk.Dec
var (
ModuleCdc = codec.NewAminoCodec(amino)
)
Functions ¶
func CdpKeySuffix ¶
CdpKeySuffix key of a specific cdp in the store
func CollateralRatioBytes ¶
CollateralRatioBytes returns the liquidation ratio as sortable bytes
func CollateralRatioIterKey ¶
CollateralRatioIterKey returns the key for iterating over cdps by denom and liquidation ratio
func CollateralRatioKey ¶
CollateralRatioKey returns the key for querying a cdp by its liquidation ratio
func DenomIterKey ¶
DenomIterKey returns the key for iterating over cdps of a certain denom in the store
func DepositIterKey ¶
DepositIterKey returns the prefix key for iterating over deposits to a cdp
func DepositKeySuffix ¶
func DepositKeySuffix(cdpID uint64, depositor sdk.AccAddress) []byte
DepositKeySuffix key of a specific deposit in the store
func GetCdpIDBytes ¶
GetCdpIDBytes returns the byte representation of the cdpID
func GetCdpIDFromBytes ¶
GetCdpIDFromBytes returns cdpID in uint64 format from a byte array
func ParamKeyTable ¶
func ParamKeyTable() paramstype.KeyTable
ParamKeyTable Key declaration for parameters
func ParseDecBytes ¶
ParseDecBytes parses a []byte encoded using SortableDecBytes back to sdk.Dec
func RegisterCodec ¶
func RegisterCodec(cdc *codec.LegacyAmino)
func RegisterInterfaces ¶
func RegisterInterfaces(registry cdctypes.InterfaceRegistry)
func RegisterMsgServer ¶
func RegisterQueryHandler ¶
RegisterQueryHandler registers the http handlers for service Query to "mux". The handlers forward requests to the grpc endpoint over "conn".
func RegisterQueryHandlerClient ¶
func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, client QueryClient) error
RegisterQueryHandlerClient registers the http handlers for service Query to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "QueryClient". Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "QueryClient" doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in "QueryClient" to call the correct interceptors.
func RegisterQueryHandlerFromEndpoint ¶
func RegisterQueryHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error)
RegisterQueryHandlerFromEndpoint is same as RegisterQueryHandler but automatically dials to "endpoint" and closes the connection when "ctx" gets done.
func RegisterQueryHandlerServer ¶
func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, server QueryServer) error
RegisterQueryHandlerServer registers the http handlers for service Query to "mux". UnaryRPC :call QueryServer directly. StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterQueryHandlerFromEndpoint instead.
func RegisterQueryServer ¶
func RegisterQueryServer(s grpc1.Server, srv QueryServer)
func RelativePow ¶
RelativePow raises x to the power of n, where x (and the result, z) are scaled by factor b. For example, RelativePow(210, 2, 100) = 441 (2.1^2 = 4.41) Only defined for positive ints.
func SortableDecBytes ¶
SortableDecBytes returns a byte slice representation of a Dec that can be sorted. Left and right pads with 0s so there are 18 digits to left and right of the decimal point. For this reason, there is a maximum and minimum value for this, enforced by ValidSortableDec.
func SplitCdpKey ¶
SplitCdpKey returns the component parts of a cdp key
func SplitCollateralRatioIterKey ¶
SplitCollateralRatioIterKey split the collateral ratio key and return the denom, cdp id, and collateral:debt ratio
func SplitCollateralRatioKey ¶
SplitCollateralRatioKey split the collateral ratio key and return the denom, cdp id, and collateral:debt ratio
func SplitDenomIterKey ¶
SplitDenomIterKey returns the component part of a key for iterating over cdps by denom
func SplitDepositIterKey ¶
SplitDepositIterKey returns the component parts of a key for iterating over deposits on a cdp
func SplitDepositKey ¶
func SplitDepositKey(key []byte) (uint64, sdk.AccAddress)
SplitDepositKey returns the component parts of a deposit key
func ValidSortableDec ¶
ValidSortableDec sdk.Dec can't have precision of less than 10^-18
Types ¶
type AccountKeeper ¶
type AccountKeeper interface { // Return a new account with the next account number and the specified address. Does not save the new account to the store. NewAccountWithAddress(sdk.Context, sdk.AccAddress) authtypes.AccountI // Return a new account with the next account number. Does not save the new account to the store. NewAccount(sdk.Context, authtypes.AccountI) authtypes.AccountI // Retrieve an account from the store. GetAccount(sdk.Context, sdk.AccAddress) authtypes.AccountI // Set an account in the store. SetAccount(sdk.Context, authtypes.AccountI) // Remove an account from the store. RemoveAccount(sdk.Context, authtypes.AccountI) // Iterate over all accounts, calling the provided function. Stop iteraiton when it returns false. IterateAccounts(sdk.Context, func(authtypes.AccountI) bool) // Fetch the public key of an account at a specified address GetPubKey(sdk.Context, sdk.AccAddress) (cryptotypes.PubKey, error) // Fetch the sequence of an account at a specified address. GetSequence(sdk.Context, sdk.AccAddress) (uint64, error) // Fetch the next account number, and increment the internal counter. GetNextAccountNumber(sdk.Context) uint64 GetModuleAddress(moduleName string) sdk.AccAddress GetModuleAccount(ctx sdk.Context, moduleName string) authtypes.ModuleAccountI }
AccountKeeper expected interface for the account keeper (noalias)
type AuctionKeeper ¶
type AuctionKeeper interface { StartSurplusAuction(ctx sdk.Context, seller string, lot sdk.Coin, bidDenom string) (uint64, error) StartDebtAuction(ctx sdk.Context, buyer string, bid sdk.Coin, initialLot sdk.Coin, debt sdk.Coin) (uint64, error) StartCollateralAuction(ctx sdk.Context, seller string, lot sdk.Coin, maxBid sdk.Coin, lotReturnAddrs []sdk.AccAddress, lotReturnWeights []sdk.Int, debt sdk.Coin) (uint64, error) }
AuctionKeeper expected interface for the auction keeper (noalias)
type AugmentedCdp ¶
type AugmentedCdp struct { Cdp `protobuf:"bytes,1,opt,name=cdp,proto3,embedded=cdp" json:"cdp" yaml:"cdp"` CollateralValue types.Coin `protobuf:"bytes,2,opt,name=collateral_value,json=collateralValue,proto3" json:"collateral_value" yaml:"collateral_value"` CollateralizationRatio github_com_cosmos_cosmos_sdk_types.Dec `` /* 198-byte string literal not displayed */ }
func NewAugmentedCdp ¶
func NewAugmentedCdp(cdp Cdp, collateralValue sdk.Coin, collateralizationRatio sdk.Dec) AugmentedCdp
NewAugmentedCdp creates a new AugmentedCdp object
func (*AugmentedCdp) Descriptor ¶
func (*AugmentedCdp) Descriptor() ([]byte, []int)
func (*AugmentedCdp) GetCollateralValue ¶
func (m *AugmentedCdp) GetCollateralValue() types.Coin
func (*AugmentedCdp) Marshal ¶
func (m *AugmentedCdp) Marshal() (dAtA []byte, err error)
func (*AugmentedCdp) MarshalToSizedBuffer ¶
func (m *AugmentedCdp) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*AugmentedCdp) ProtoMessage ¶
func (*AugmentedCdp) ProtoMessage()
func (*AugmentedCdp) Reset ¶
func (m *AugmentedCdp) Reset()
func (*AugmentedCdp) Size ¶
func (m *AugmentedCdp) Size() (n int)
func (*AugmentedCdp) String ¶
func (m *AugmentedCdp) String() string
func (*AugmentedCdp) Unmarshal ¶
func (m *AugmentedCdp) Unmarshal(dAtA []byte) error
func (*AugmentedCdp) XXX_DiscardUnknown ¶
func (m *AugmentedCdp) XXX_DiscardUnknown()
func (*AugmentedCdp) XXX_Marshal ¶
func (m *AugmentedCdp) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*AugmentedCdp) XXX_Merge ¶
func (m *AugmentedCdp) XXX_Merge(src proto.Message)
func (*AugmentedCdp) XXX_Size ¶
func (m *AugmentedCdp) XXX_Size() int
func (*AugmentedCdp) XXX_Unmarshal ¶
func (m *AugmentedCdp) XXX_Unmarshal(b []byte) error
type AugmentedCdps ¶
type AugmentedCdps []AugmentedCdp
AugmentedCdps a collection of AugmentedCdp objects
func (AugmentedCdps) String ¶
func (augcdps AugmentedCdps) String() string
String implements stringer
type BankKeeper ¶
type BankKeeper interface { // View ValidateBalance(ctx sdk.Context, addr sdk.AccAddress) error HasBalance(ctx sdk.Context, addr sdk.AccAddress, amt sdk.Coin) bool GetAllBalances(ctx sdk.Context, addr sdk.AccAddress) sdk.Coins GetAccountsBalances(ctx sdk.Context) []banktypes.Balance GetBalance(ctx sdk.Context, addr sdk.AccAddress, denom string) sdk.Coin LockedCoins(ctx sdk.Context, addr sdk.AccAddress) sdk.Coins SpendableCoins(ctx sdk.Context, addr sdk.AccAddress) sdk.Coins IterateAccountBalances(ctx sdk.Context, addr sdk.AccAddress, cb func(coin sdk.Coin) (stop bool)) IterateAllBalances(ctx sdk.Context, cb func(address sdk.AccAddress, coin sdk.Coin) (stop bool)) // Send InputOutputCoins(ctx sdk.Context, inputs []banktypes.Input, outputs []banktypes.Output) error SendCoins(ctx sdk.Context, fromAddr sdk.AccAddress, toAddr sdk.AccAddress, amt sdk.Coins) error GetParams(ctx sdk.Context) banktypes.Params SetParams(ctx sdk.Context, params banktypes.Params) BlockedAddr(addr sdk.AccAddress) bool // InitGenesis(sdk.Context, *banktypes.GenesisState) ExportGenesis(sdk.Context) *banktypes.GenesisState GetSupply(ctx sdk.Context, denom string) sdk.Coin GetPaginatedTotalSupply(ctx sdk.Context, pagination *query.PageRequest) (sdk.Coins, *query.PageResponse, error) IterateTotalSupply(ctx sdk.Context, cb func(sdk.Coin) bool) 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) SendCoinsFromModuleToAccount(ctx sdk.Context, senderModule string, recipientAddr sdk.AccAddress, amt sdk.Coins) error SendCoinsFromModuleToModule(ctx sdk.Context, senderModule, recipientModule string, amt sdk.Coins) error SendCoinsFromAccountToModule(ctx sdk.Context, senderAddr sdk.AccAddress, recipientModule string, amt sdk.Coins) error DelegateCoinsFromAccountToModule(ctx sdk.Context, senderAddr sdk.AccAddress, recipientModule string, amt sdk.Coins) error UndelegateCoinsFromModuleToAccount(ctx sdk.Context, senderModule string, recipientAddr sdk.AccAddress, amt sdk.Coins) error MintCoins(ctx sdk.Context, moduleName string, amt sdk.Coins) error BurnCoins(ctx sdk.Context, moduleName string, amt sdk.Coins) error DelegateCoins(ctx sdk.Context, delegatorAddr, moduleAccAddr sdk.AccAddress, amt sdk.Coins) error UndelegateCoins(ctx sdk.Context, moduleAccAddr, delegatorAddr sdk.AccAddress, amt sdk.Coins) error }
type Cdp ¶
type Cdp struct { Id uint64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty" yaml:"id"` Owner github_com_UnUniFi_chain_types.StringAccAddress `protobuf:"bytes,2,opt,name=owner,proto3,customtype=github.com/UnUniFi/chain/types.StringAccAddress" json:"owner" yaml:"owner"` Type string `protobuf:"bytes,3,opt,name=type,proto3" json:"type,omitempty" yaml:"type"` Collateral types.Coin `protobuf:"bytes,4,opt,name=collateral,proto3" json:"collateral" yaml:"collateral"` Principal types.Coin `protobuf:"bytes,5,opt,name=principal,proto3" json:"principal" yaml:"principal"` AccumulatedFees types.Coin `protobuf:"bytes,6,opt,name=accumulated_fees,json=accumulatedFees,proto3" json:"accumulated_fees" yaml:"accumulated_fees"` FeesUpdated time.Time `protobuf:"bytes,7,opt,name=fees_updated,json=feesUpdated,proto3,stdtime" json:"fees_updated" yaml:"fees_updated"` InterestFactor github_com_cosmos_cosmos_sdk_types.Dec `` /* 166-byte string literal not displayed */ }
func NewCdp ¶
func NewCdp(id uint64, owner sdk.AccAddress, collateral sdk.Coin, collateralType string, principal sdk.Coin, time time.Time, interestFactor sdk.Dec) Cdp
NewCdp creates a new Cdp object
func NewCdpWithFees ¶
func NewCdpWithFees(id uint64, owner sdk.AccAddress, collateral sdk.Coin, collateralType string, principal, fees sdk.Coin, time time.Time, interestFactor sdk.Dec) Cdp
NewCdpWithFees creates a new Cdp object, for use during migration
func (*Cdp) Descriptor ¶
func (*Cdp) GetAccumulatedFees ¶
func (*Cdp) GetCollateral ¶
func (*Cdp) GetFeesUpdated ¶
func (*Cdp) GetPrincipal ¶
func (Cdp) GetTotalPrincipal ¶
GetTotalPrincipal returns the total principle for the cdp
func (*Cdp) ProtoMessage ¶
func (*Cdp) ProtoMessage()
func (*Cdp) XXX_DiscardUnknown ¶
func (m *Cdp) XXX_DiscardUnknown()
func (*Cdp) XXX_Unmarshal ¶
type CdpHooks ¶
type CdpHooks interface { AfterCdpCreated(ctx sdk.Context, cdp Cdp) BeforeCdpModified(ctx sdk.Context, cdp Cdp) }
CdpHooks event hooks for other keepers to run code in response to Cdp modifications
type CollateralParam ¶
type CollateralParam struct { Denom string `protobuf:"bytes,1,opt,name=denom,proto3" json:"denom,omitempty" yaml:"denom"` Type string `protobuf:"bytes,2,opt,name=type,proto3" json:"type,omitempty" yaml:"type"` LiquidationRatio github_com_cosmos_cosmos_sdk_types.Dec `` /* 174-byte string literal not displayed */ DebtLimit types.Coin `protobuf:"bytes,4,opt,name=debt_limit,json=debtLimit,proto3" json:"debt_limit" yaml:"debt_limit"` StabilityFee github_com_cosmos_cosmos_sdk_types.Dec `` /* 158-byte string literal not displayed */ AuctionSize github_com_cosmos_cosmos_sdk_types.Int `` /* 154-byte string literal not displayed */ LiquidationPenalty github_com_cosmos_cosmos_sdk_types.Dec `` /* 182-byte string literal not displayed */ Prefix uint32 `protobuf:"varint,8,opt,name=prefix,proto3" json:"prefix,omitempty" yaml:"prefix"` SpotMarketId string `protobuf:"bytes,9,opt,name=spot_market_id,json=spotMarketId,proto3" json:"spot_market_id,omitempty" yaml:"spot_market_id"` LiquidationMarketId string `` /* 150-byte string literal not displayed */ KeeperRewardPercentage github_com_cosmos_cosmos_sdk_types.Dec `` /* 202-byte string literal not displayed */ CheckCollateralizationIndexCount github_com_cosmos_cosmos_sdk_types.Int `` /* 245-byte string literal not displayed */ ConversionFactor github_com_cosmos_cosmos_sdk_types.Int `` /* 175-byte string literal not displayed */ }
func NewCollateralParam ¶
func NewCollateralParam( denom, ctype string, liqRatio sdk.Dec, debtLimit sdk.Coin, stabilityFee sdk.Dec, auctionSize sdk.Int, liqPenalty sdk.Dec, prefix byte, spotMarketID, liquidationMarketID string, keeperReward sdk.Dec, checkIndexCount sdk.Int, conversionFactor sdk.Int) CollateralParam
NewCollateralParam returns a new CollateralParam
func (*CollateralParam) Descriptor ¶
func (*CollateralParam) Descriptor() ([]byte, []int)
func (*CollateralParam) GetDebtLimit ¶
func (m *CollateralParam) GetDebtLimit() types.Coin
func (*CollateralParam) GetDenom ¶
func (m *CollateralParam) GetDenom() string
func (*CollateralParam) GetLiquidationMarketId ¶
func (m *CollateralParam) GetLiquidationMarketId() string
func (*CollateralParam) GetPrefix ¶
func (m *CollateralParam) GetPrefix() uint32
func (*CollateralParam) GetSpotMarketId ¶
func (m *CollateralParam) GetSpotMarketId() string
func (*CollateralParam) GetType ¶
func (m *CollateralParam) GetType() string
func (*CollateralParam) Marshal ¶
func (m *CollateralParam) Marshal() (dAtA []byte, err error)
func (*CollateralParam) MarshalToSizedBuffer ¶
func (m *CollateralParam) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*CollateralParam) ProtoMessage ¶
func (*CollateralParam) ProtoMessage()
func (*CollateralParam) Reset ¶
func (m *CollateralParam) Reset()
func (*CollateralParam) Size ¶
func (m *CollateralParam) Size() (n int)
func (*CollateralParam) String ¶
func (m *CollateralParam) String() string
func (*CollateralParam) Unmarshal ¶
func (m *CollateralParam) Unmarshal(dAtA []byte) error
func (*CollateralParam) XXX_DiscardUnknown ¶
func (m *CollateralParam) XXX_DiscardUnknown()
func (*CollateralParam) XXX_Marshal ¶
func (m *CollateralParam) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*CollateralParam) XXX_Merge ¶
func (m *CollateralParam) XXX_Merge(src proto.Message)
func (*CollateralParam) XXX_Size ¶
func (m *CollateralParam) XXX_Size() int
func (*CollateralParam) XXX_Unmarshal ¶
func (m *CollateralParam) XXX_Unmarshal(b []byte) error
type CollateralParams ¶
type CollateralParams []CollateralParam
CollateralParams array of CollateralParam
func (CollateralParams) String ¶
func (cps CollateralParams) String() string
String implements fmt.Stringer
type DebtDenomMap ¶ added in v1.0.0
func NewDebtDenomMap ¶ added in v1.0.0
func NewDebtDenomMap(dps DebtParams) DebtDenomMap
func NewDebtDenomMapFromByte ¶ added in v1.0.0
func NewDebtDenomMapFromByte(dps_bytes []byte) DebtDenomMap
func (DebtDenomMap) Byte ¶ added in v1.0.0
func (d DebtDenomMap) Byte() []byte
type DebtParam ¶
type DebtParam struct { Denom string `protobuf:"bytes,1,opt,name=denom,proto3" json:"denom,omitempty" yaml:"denom"` ReferenceAsset string `` /* 126-byte string literal not displayed */ ConversionFactor github_com_cosmos_cosmos_sdk_types.Int `` /* 174-byte string literal not displayed */ DebtFloor github_com_cosmos_cosmos_sdk_types.Int `` /* 146-byte string literal not displayed */ GlobalDebtLimit types.Coin `protobuf:"bytes,5,opt,name=global_debt_limit,json=globalDebtLimit,proto3" json:"global_debt_limit" yaml:"global_debt_limit"` DebtDenom string `protobuf:"bytes,6,opt,name=debt_denom,json=debtDenom,proto3" json:"debt_denom,omitempty" yaml:"debt_denom"` SurplusAuctionThreshold github_com_cosmos_cosmos_sdk_types.Int `` /* 205-byte string literal not displayed */ SurplusAuctionLot github_com_cosmos_cosmos_sdk_types.Int `` /* 181-byte string literal not displayed */ DebtAuctionThreshold github_com_cosmos_cosmos_sdk_types.Int `` /* 193-byte string literal not displayed */ DebtAuctionLot github_com_cosmos_cosmos_sdk_types.Int `` /* 170-byte string literal not displayed */ CircuitBreaker bool `` /* 128-byte string literal not displayed */ }
func NewDebtParam ¶
func NewDebtParam(denom, refAsset string, conversionFactor, debtFloor sdk.Int, globalDebtLimit sdk.Coin) DebtParam
NewDebtParam returns a new DebtParam
func (*DebtParam) Descriptor ¶
func (*DebtParam) GetCircuitBreaker ¶ added in v1.0.0
func (*DebtParam) GetDebtDenom ¶ added in v1.0.0
func (*DebtParam) GetGlobalDebtLimit ¶ added in v1.0.0
func (*DebtParam) GetReferenceAsset ¶
func (*DebtParam) MarshalToSizedBuffer ¶
func (*DebtParam) ProtoMessage ¶
func (*DebtParam) ProtoMessage()
func (*DebtParam) XXX_DiscardUnknown ¶
func (m *DebtParam) XXX_DiscardUnknown()
func (*DebtParam) XXX_Marshal ¶
func (*DebtParam) XXX_Unmarshal ¶
type DebtParams ¶
type DebtParams []DebtParam
DebtParams array of DebtParam
func (DebtParams) FindDenom ¶ added in v1.0.0
func (dps DebtParams) FindDenom(search_denom string) (DebtParam, bool)
Returns an element with a denom that matches search_denom
func (DebtParams) FindGlobalDebtLimitDenom ¶ added in v1.0.0
func (dps DebtParams) FindGlobalDebtLimitDenom(search_denom string) (DebtParam, bool)
Returns an element with a GlobalDebtLimit.Denom that matches search_denom
type Deposit ¶
type Deposit struct { CdpId uint64 `protobuf:"varint,1,opt,name=cdp_id,json=cdpId,proto3" json:"cdp_id,omitempty" yaml:"cdp_id"` Depositor github_com_UnUniFi_chain_types.StringAccAddress `` /* 137-byte string literal not displayed */ Amount types.Coin `protobuf:"bytes,3,opt,name=amount,proto3" json:"amount" yaml:"amount"` }
func NewDeposit ¶
NewDeposit creates a new Deposit object
func (*Deposit) Descriptor ¶
func (*Deposit) MarshalToSizedBuffer ¶
func (*Deposit) ProtoMessage ¶
func (*Deposit) ProtoMessage()
func (*Deposit) XXX_DiscardUnknown ¶
func (m *Deposit) XXX_DiscardUnknown()
func (*Deposit) XXX_Marshal ¶
func (*Deposit) XXX_Unmarshal ¶
type Deposits ¶
type Deposits []Deposit
Deposits a collection of Deposit objects
func (Deposits) SumCollateral ¶
SumCollateral returns the total amount of collateral in the input deposits
type GenesisAccumulationTime ¶
type GenesisAccumulationTime struct { CollateralType string `` /* 126-byte string literal not displayed */ PreviousAccumulationTime time.Time `` /* 167-byte string literal not displayed */ InterestFactor github_com_cosmos_cosmos_sdk_types.Dec `` /* 166-byte string literal not displayed */ }
func NewGenesisAccumulationTime ¶
func NewGenesisAccumulationTime(ctype string, prevTime time.Time, factor sdk.Dec) GenesisAccumulationTime
NewGenesisAccumulationTime returns a new GenesisAccumulationTime
func (*GenesisAccumulationTime) Descriptor ¶
func (*GenesisAccumulationTime) Descriptor() ([]byte, []int)
func (*GenesisAccumulationTime) GetCollateralType ¶
func (m *GenesisAccumulationTime) GetCollateralType() string
func (*GenesisAccumulationTime) GetPreviousAccumulationTime ¶
func (m *GenesisAccumulationTime) GetPreviousAccumulationTime() time.Time
func (*GenesisAccumulationTime) Marshal ¶
func (m *GenesisAccumulationTime) Marshal() (dAtA []byte, err error)
func (*GenesisAccumulationTime) MarshalTo ¶
func (m *GenesisAccumulationTime) MarshalTo(dAtA []byte) (int, error)
func (*GenesisAccumulationTime) MarshalToSizedBuffer ¶
func (m *GenesisAccumulationTime) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*GenesisAccumulationTime) ProtoMessage ¶
func (*GenesisAccumulationTime) ProtoMessage()
func (*GenesisAccumulationTime) Reset ¶
func (m *GenesisAccumulationTime) Reset()
func (*GenesisAccumulationTime) Size ¶
func (m *GenesisAccumulationTime) Size() (n int)
func (*GenesisAccumulationTime) String ¶
func (m *GenesisAccumulationTime) String() string
func (*GenesisAccumulationTime) Unmarshal ¶
func (m *GenesisAccumulationTime) Unmarshal(dAtA []byte) error
func (GenesisAccumulationTime) Validate ¶
func (gat GenesisAccumulationTime) Validate() error
Validate performs validation of GenesisAccumulationTime
func (*GenesisAccumulationTime) XXX_DiscardUnknown ¶
func (m *GenesisAccumulationTime) XXX_DiscardUnknown()
func (*GenesisAccumulationTime) XXX_Marshal ¶
func (m *GenesisAccumulationTime) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*GenesisAccumulationTime) XXX_Merge ¶
func (m *GenesisAccumulationTime) XXX_Merge(src proto.Message)
func (*GenesisAccumulationTime) XXX_Size ¶
func (m *GenesisAccumulationTime) XXX_Size() int
func (*GenesisAccumulationTime) XXX_Unmarshal ¶
func (m *GenesisAccumulationTime) XXX_Unmarshal(b []byte) error
type GenesisAccumulationTimes ¶
type GenesisAccumulationTimes []GenesisAccumulationTime
GenesisAccumulationTimes slice of GenesisAccumulationTime
func (GenesisAccumulationTimes) Validate ¶
func (gats GenesisAccumulationTimes) Validate() error
Validate performs validation of GenesisAccumulationTimes
type GenesisState ¶
type GenesisState struct { Params Params `protobuf:"bytes,1,opt,name=params,proto3" json:"params" yaml:"params"` Cdps []Cdp `protobuf:"bytes,2,rep,name=cdps,proto3" json:"cdps" yaml:"cdps"` Deposits []Deposit `protobuf:"bytes,3,rep,name=deposits,proto3" json:"deposits" yaml:"deposits"` StartingCdpId uint64 `` /* 126-byte string literal not displayed */ GovDenom string `protobuf:"bytes,5,opt,name=gov_denom,json=govDenom,proto3" json:"gov_denom,omitempty" yaml:"gov_denom"` PreviousAccumulationTimes []GenesisAccumulationTime `` /* 163-byte string literal not displayed */ TotalPrincipals []GenesisTotalPrincipal `protobuf:"bytes,7,rep,name=total_principals,json=totalPrincipals,proto3" json:"total_principals" yaml:"total_principals"` }
GenesisState defines the cdp module's genesis state.
func DefaultGenesis ¶
func DefaultGenesis() *GenesisState
DefaultGenesis returns the default Capability genesis state
func NewGenesisState ¶
func NewGenesisState(params Params, cdps Cdps, deposits Deposits, startingCdpID uint64, govDenom string, prevAccumTimes GenesisAccumulationTimes, totalPrincipals GenesisTotalPrincipals) GenesisState
func (*GenesisState) Descriptor ¶
func (*GenesisState) Descriptor() ([]byte, []int)
func (GenesisState) Equal ¶
func (gs GenesisState) Equal(gs2 GenesisState) bool
Equal checks whether two gov GenesisState structs are equivalent
func (*GenesisState) GetCdps ¶
func (m *GenesisState) GetCdps() []Cdp
func (*GenesisState) GetDeposits ¶
func (m *GenesisState) GetDeposits() []Deposit
func (*GenesisState) GetGovDenom ¶
func (m *GenesisState) GetGovDenom() string
func (*GenesisState) GetParams ¶
func (m *GenesisState) GetParams() Params
func (*GenesisState) GetPreviousAccumulationTimes ¶
func (m *GenesisState) GetPreviousAccumulationTimes() []GenesisAccumulationTime
func (*GenesisState) GetStartingCdpId ¶
func (m *GenesisState) GetStartingCdpId() uint64
func (*GenesisState) GetTotalPrincipals ¶
func (m *GenesisState) GetTotalPrincipals() []GenesisTotalPrincipal
func (GenesisState) IsEmpty ¶
func (gs GenesisState) IsEmpty() bool
IsEmpty returns true if a GenesisState is empty
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 GenesisTotalPrincipal ¶
type GenesisTotalPrincipal struct { CollateralType string `` /* 126-byte string literal not displayed */ TotalPrincipal github_com_cosmos_cosmos_sdk_types.Int `` /* 166-byte string literal not displayed */ }
func NewGenesisTotalPrincipal ¶
func NewGenesisTotalPrincipal(ctype string, principal sdk.Int) GenesisTotalPrincipal
NewGenesisTotalPrincipal returns a new GenesisTotalPrincipal
func (*GenesisTotalPrincipal) Descriptor ¶
func (*GenesisTotalPrincipal) Descriptor() ([]byte, []int)
func (*GenesisTotalPrincipal) GetCollateralType ¶
func (m *GenesisTotalPrincipal) GetCollateralType() string
func (*GenesisTotalPrincipal) Marshal ¶
func (m *GenesisTotalPrincipal) Marshal() (dAtA []byte, err error)
func (*GenesisTotalPrincipal) MarshalTo ¶
func (m *GenesisTotalPrincipal) MarshalTo(dAtA []byte) (int, error)
func (*GenesisTotalPrincipal) MarshalToSizedBuffer ¶
func (m *GenesisTotalPrincipal) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*GenesisTotalPrincipal) ProtoMessage ¶
func (*GenesisTotalPrincipal) ProtoMessage()
func (*GenesisTotalPrincipal) Reset ¶
func (m *GenesisTotalPrincipal) Reset()
func (*GenesisTotalPrincipal) Size ¶
func (m *GenesisTotalPrincipal) Size() (n int)
func (*GenesisTotalPrincipal) String ¶
func (m *GenesisTotalPrincipal) String() string
func (*GenesisTotalPrincipal) Unmarshal ¶
func (m *GenesisTotalPrincipal) Unmarshal(dAtA []byte) error
func (GenesisTotalPrincipal) Validate ¶
func (gtp GenesisTotalPrincipal) Validate() error
Validate performs validation of GenesisTotalPrincipal
func (*GenesisTotalPrincipal) XXX_DiscardUnknown ¶
func (m *GenesisTotalPrincipal) XXX_DiscardUnknown()
func (*GenesisTotalPrincipal) XXX_Marshal ¶
func (m *GenesisTotalPrincipal) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*GenesisTotalPrincipal) XXX_Merge ¶
func (m *GenesisTotalPrincipal) XXX_Merge(src proto.Message)
func (*GenesisTotalPrincipal) XXX_Size ¶
func (m *GenesisTotalPrincipal) XXX_Size() int
func (*GenesisTotalPrincipal) XXX_Unmarshal ¶
func (m *GenesisTotalPrincipal) XXX_Unmarshal(b []byte) error
type GenesisTotalPrincipals ¶
type GenesisTotalPrincipals []GenesisTotalPrincipal
GenesisTotalPrincipals slice of GenesisTotalPrincipal
func (GenesisTotalPrincipals) Validate ¶
func (gtps GenesisTotalPrincipals) Validate() error
Validate performs validation of GenesisTotalPrincipals
type MsgClient ¶
type MsgClient interface { CreateCdp(ctx context.Context, in *MsgCreateCdp, opts ...grpc.CallOption) (*MsgCreateCdpResponse, error) Deposit(ctx context.Context, in *MsgDeposit, opts ...grpc.CallOption) (*MsgDepositResponse, error) Withdraw(ctx context.Context, in *MsgWithdraw, opts ...grpc.CallOption) (*MsgWithdrawResponse, error) DrawDebt(ctx context.Context, in *MsgDrawDebt, opts ...grpc.CallOption) (*MsgDrawDebtResponse, error) RepayDebt(ctx context.Context, in *MsgRepayDebt, opts ...grpc.CallOption) (*MsgRepayDebtResponse, error) 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 MsgCreateCdp ¶
type MsgCreateCdp struct { Sender github_com_UnUniFi_chain_types.StringAccAddress `` /* 128-byte string literal not displayed */ Collateral types.Coin `protobuf:"bytes,2,opt,name=collateral,proto3" json:"collateral" yaml:"collateral"` Principal types.Coin `protobuf:"bytes,3,opt,name=principal,proto3" json:"principal" yaml:"principal"` CollateralType string `` /* 126-byte string literal not displayed */ }
func NewMsgCreateCdp ¶
func NewMsgCreateCdp(sender sdk.AccAddress, collateral sdk.Coin, principal sdk.Coin, collateralType string) MsgCreateCdp
NewMsgCreateCdp returns a new MsgPlaceBid.
func (*MsgCreateCdp) Descriptor ¶
func (*MsgCreateCdp) Descriptor() ([]byte, []int)
func (*MsgCreateCdp) GetCollateral ¶
func (m *MsgCreateCdp) GetCollateral() types.Coin
func (*MsgCreateCdp) GetCollateralType ¶
func (m *MsgCreateCdp) GetCollateralType() string
func (*MsgCreateCdp) GetPrincipal ¶
func (m *MsgCreateCdp) GetPrincipal() types.Coin
func (MsgCreateCdp) GetSignBytes ¶
func (msg MsgCreateCdp) GetSignBytes() []byte
GetSignBytes gets the canonical byte representation of the Msg.
func (MsgCreateCdp) GetSigners ¶
func (msg MsgCreateCdp) GetSigners() []sdk.AccAddress
GetSigners returns the addresses of signers that must sign.
func (*MsgCreateCdp) Marshal ¶
func (m *MsgCreateCdp) Marshal() (dAtA []byte, err error)
func (*MsgCreateCdp) MarshalToSizedBuffer ¶
func (m *MsgCreateCdp) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*MsgCreateCdp) ProtoMessage ¶
func (*MsgCreateCdp) ProtoMessage()
func (*MsgCreateCdp) Reset ¶
func (m *MsgCreateCdp) Reset()
func (MsgCreateCdp) Route ¶
func (msg MsgCreateCdp) Route() string
Route return the message type used for routing the message.
func (*MsgCreateCdp) Size ¶
func (m *MsgCreateCdp) Size() (n int)
func (*MsgCreateCdp) String ¶
func (m *MsgCreateCdp) String() string
func (MsgCreateCdp) Type ¶
func (msg MsgCreateCdp) Type() string
Type returns a human-readable string for the message, intended for utilization within tags.
func (*MsgCreateCdp) Unmarshal ¶
func (m *MsgCreateCdp) Unmarshal(dAtA []byte) error
func (MsgCreateCdp) ValidateBasic ¶
func (msg MsgCreateCdp) ValidateBasic() error
ValidateBasic does a simple validation check that doesn't require access to any other information.
func (*MsgCreateCdp) XXX_DiscardUnknown ¶
func (m *MsgCreateCdp) XXX_DiscardUnknown()
func (*MsgCreateCdp) XXX_Marshal ¶
func (m *MsgCreateCdp) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*MsgCreateCdp) XXX_Merge ¶
func (m *MsgCreateCdp) XXX_Merge(src proto.Message)
func (*MsgCreateCdp) XXX_Size ¶
func (m *MsgCreateCdp) XXX_Size() int
func (*MsgCreateCdp) XXX_Unmarshal ¶
func (m *MsgCreateCdp) XXX_Unmarshal(b []byte) error
type MsgCreateCdpResponse ¶
type MsgCreateCdpResponse struct { }
func (*MsgCreateCdpResponse) Descriptor ¶
func (*MsgCreateCdpResponse) Descriptor() ([]byte, []int)
func (*MsgCreateCdpResponse) Marshal ¶
func (m *MsgCreateCdpResponse) Marshal() (dAtA []byte, err error)
func (*MsgCreateCdpResponse) MarshalTo ¶
func (m *MsgCreateCdpResponse) MarshalTo(dAtA []byte) (int, error)
func (*MsgCreateCdpResponse) MarshalToSizedBuffer ¶
func (m *MsgCreateCdpResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*MsgCreateCdpResponse) ProtoMessage ¶
func (*MsgCreateCdpResponse) ProtoMessage()
func (*MsgCreateCdpResponse) Reset ¶
func (m *MsgCreateCdpResponse) Reset()
func (*MsgCreateCdpResponse) Size ¶
func (m *MsgCreateCdpResponse) Size() (n int)
func (*MsgCreateCdpResponse) String ¶
func (m *MsgCreateCdpResponse) String() string
func (*MsgCreateCdpResponse) Unmarshal ¶
func (m *MsgCreateCdpResponse) Unmarshal(dAtA []byte) error
func (*MsgCreateCdpResponse) XXX_DiscardUnknown ¶
func (m *MsgCreateCdpResponse) XXX_DiscardUnknown()
func (*MsgCreateCdpResponse) XXX_Marshal ¶
func (m *MsgCreateCdpResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*MsgCreateCdpResponse) XXX_Merge ¶
func (m *MsgCreateCdpResponse) XXX_Merge(src proto.Message)
func (*MsgCreateCdpResponse) XXX_Size ¶
func (m *MsgCreateCdpResponse) XXX_Size() int
func (*MsgCreateCdpResponse) XXX_Unmarshal ¶
func (m *MsgCreateCdpResponse) XXX_Unmarshal(b []byte) error
type MsgDeposit ¶
type MsgDeposit struct { Depositor github_com_UnUniFi_chain_types.StringAccAddress `` /* 137-byte string literal not displayed */ Owner github_com_UnUniFi_chain_types.StringAccAddress `protobuf:"bytes,2,opt,name=owner,proto3,customtype=github.com/UnUniFi/chain/types.StringAccAddress" json:"owner" yaml:"owner"` Collateral types.Coin `protobuf:"bytes,3,opt,name=collateral,proto3" json:"collateral" yaml:"collateral"` CollateralType string `` /* 126-byte string literal not displayed */ }
func NewMsgDeposit ¶
func NewMsgDeposit(owner sdk.AccAddress, depositor sdk.AccAddress, collateral sdk.Coin, collateralType string) MsgDeposit
NewMsgDeposit returns a new MsgDeposit
func (*MsgDeposit) Descriptor ¶
func (*MsgDeposit) Descriptor() ([]byte, []int)
func (*MsgDeposit) GetCollateral ¶
func (m *MsgDeposit) GetCollateral() types.Coin
func (*MsgDeposit) GetCollateralType ¶
func (m *MsgDeposit) GetCollateralType() string
func (MsgDeposit) GetSignBytes ¶
func (msg MsgDeposit) GetSignBytes() []byte
GetSignBytes gets the canonical byte representation of the Msg.
func (MsgDeposit) GetSigners ¶
func (msg MsgDeposit) GetSigners() []sdk.AccAddress
GetSigners returns the addresses of signers that must sign.
func (*MsgDeposit) Marshal ¶
func (m *MsgDeposit) Marshal() (dAtA []byte, err error)
func (*MsgDeposit) MarshalToSizedBuffer ¶
func (m *MsgDeposit) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*MsgDeposit) ProtoMessage ¶
func (*MsgDeposit) ProtoMessage()
func (*MsgDeposit) Reset ¶
func (m *MsgDeposit) Reset()
func (MsgDeposit) Route ¶
func (msg MsgDeposit) Route() string
Route return the message type used for routing the message.
func (*MsgDeposit) Size ¶
func (m *MsgDeposit) Size() (n int)
func (*MsgDeposit) String ¶
func (m *MsgDeposit) String() string
func (MsgDeposit) Type ¶
func (msg MsgDeposit) Type() string
Type returns a human-readable string for the message, intended for utilization within tags.
func (*MsgDeposit) Unmarshal ¶
func (m *MsgDeposit) Unmarshal(dAtA []byte) error
func (MsgDeposit) ValidateBasic ¶
func (msg MsgDeposit) ValidateBasic() error
ValidateBasic does a simple validation check that doesn't require access to any other information.
func (*MsgDeposit) XXX_DiscardUnknown ¶
func (m *MsgDeposit) XXX_DiscardUnknown()
func (*MsgDeposit) XXX_Marshal ¶
func (m *MsgDeposit) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*MsgDeposit) XXX_Merge ¶
func (m *MsgDeposit) XXX_Merge(src proto.Message)
func (*MsgDeposit) XXX_Size ¶
func (m *MsgDeposit) XXX_Size() int
func (*MsgDeposit) XXX_Unmarshal ¶
func (m *MsgDeposit) XXX_Unmarshal(b []byte) error
type MsgDepositResponse ¶
type MsgDepositResponse struct { }
func (*MsgDepositResponse) Descriptor ¶
func (*MsgDepositResponse) Descriptor() ([]byte, []int)
func (*MsgDepositResponse) Marshal ¶
func (m *MsgDepositResponse) Marshal() (dAtA []byte, err error)
func (*MsgDepositResponse) MarshalTo ¶
func (m *MsgDepositResponse) MarshalTo(dAtA []byte) (int, error)
func (*MsgDepositResponse) MarshalToSizedBuffer ¶
func (m *MsgDepositResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*MsgDepositResponse) ProtoMessage ¶
func (*MsgDepositResponse) ProtoMessage()
func (*MsgDepositResponse) Reset ¶
func (m *MsgDepositResponse) Reset()
func (*MsgDepositResponse) Size ¶
func (m *MsgDepositResponse) Size() (n int)
func (*MsgDepositResponse) String ¶
func (m *MsgDepositResponse) String() string
func (*MsgDepositResponse) Unmarshal ¶
func (m *MsgDepositResponse) Unmarshal(dAtA []byte) error
func (*MsgDepositResponse) XXX_DiscardUnknown ¶
func (m *MsgDepositResponse) XXX_DiscardUnknown()
func (*MsgDepositResponse) XXX_Marshal ¶
func (m *MsgDepositResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*MsgDepositResponse) XXX_Merge ¶
func (m *MsgDepositResponse) XXX_Merge(src proto.Message)
func (*MsgDepositResponse) XXX_Size ¶
func (m *MsgDepositResponse) XXX_Size() int
func (*MsgDepositResponse) XXX_Unmarshal ¶
func (m *MsgDepositResponse) XXX_Unmarshal(b []byte) error
type MsgDrawDebt ¶
type MsgDrawDebt struct { Sender github_com_UnUniFi_chain_types.StringAccAddress `` /* 128-byte string literal not displayed */ CollateralType string `` /* 126-byte string literal not displayed */ Principal types.Coin `protobuf:"bytes,3,opt,name=principal,proto3" json:"principal" yaml:"principal"` }
func NewMsgDrawDebt ¶
func NewMsgDrawDebt(sender sdk.AccAddress, collateralType string, principal sdk.Coin) MsgDrawDebt
NewMsgDrawDebt returns a new MsgDrawDebt
func (*MsgDrawDebt) Descriptor ¶
func (*MsgDrawDebt) Descriptor() ([]byte, []int)
func (*MsgDrawDebt) GetCollateralType ¶
func (m *MsgDrawDebt) GetCollateralType() string
func (*MsgDrawDebt) GetPrincipal ¶
func (m *MsgDrawDebt) GetPrincipal() types.Coin
func (MsgDrawDebt) GetSignBytes ¶
func (msg MsgDrawDebt) GetSignBytes() []byte
GetSignBytes gets the canonical byte representation of the Msg.
func (MsgDrawDebt) GetSigners ¶
func (msg MsgDrawDebt) GetSigners() []sdk.AccAddress
GetSigners returns the addresses of signers that must sign.
func (*MsgDrawDebt) Marshal ¶
func (m *MsgDrawDebt) Marshal() (dAtA []byte, err error)
func (*MsgDrawDebt) MarshalToSizedBuffer ¶
func (m *MsgDrawDebt) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*MsgDrawDebt) ProtoMessage ¶
func (*MsgDrawDebt) ProtoMessage()
func (*MsgDrawDebt) Reset ¶
func (m *MsgDrawDebt) Reset()
func (MsgDrawDebt) Route ¶
func (msg MsgDrawDebt) Route() string
Route return the message type used for routing the message.
func (*MsgDrawDebt) Size ¶
func (m *MsgDrawDebt) Size() (n int)
func (*MsgDrawDebt) String ¶
func (m *MsgDrawDebt) String() string
func (MsgDrawDebt) Type ¶
func (msg MsgDrawDebt) Type() string
Type returns a human-readable string for the message, intended for utilization within tags.
func (*MsgDrawDebt) Unmarshal ¶
func (m *MsgDrawDebt) Unmarshal(dAtA []byte) error
func (MsgDrawDebt) ValidateBasic ¶
func (msg MsgDrawDebt) ValidateBasic() error
ValidateBasic does a simple validation check that doesn't require access to any other information.
func (*MsgDrawDebt) XXX_DiscardUnknown ¶
func (m *MsgDrawDebt) XXX_DiscardUnknown()
func (*MsgDrawDebt) XXX_Marshal ¶
func (m *MsgDrawDebt) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*MsgDrawDebt) XXX_Merge ¶
func (m *MsgDrawDebt) XXX_Merge(src proto.Message)
func (*MsgDrawDebt) XXX_Size ¶
func (m *MsgDrawDebt) XXX_Size() int
func (*MsgDrawDebt) XXX_Unmarshal ¶
func (m *MsgDrawDebt) XXX_Unmarshal(b []byte) error
type MsgDrawDebtResponse ¶
type MsgDrawDebtResponse struct { }
func (*MsgDrawDebtResponse) Descriptor ¶
func (*MsgDrawDebtResponse) Descriptor() ([]byte, []int)
func (*MsgDrawDebtResponse) Marshal ¶
func (m *MsgDrawDebtResponse) Marshal() (dAtA []byte, err error)
func (*MsgDrawDebtResponse) MarshalTo ¶
func (m *MsgDrawDebtResponse) MarshalTo(dAtA []byte) (int, error)
func (*MsgDrawDebtResponse) MarshalToSizedBuffer ¶
func (m *MsgDrawDebtResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*MsgDrawDebtResponse) ProtoMessage ¶
func (*MsgDrawDebtResponse) ProtoMessage()
func (*MsgDrawDebtResponse) Reset ¶
func (m *MsgDrawDebtResponse) Reset()
func (*MsgDrawDebtResponse) Size ¶
func (m *MsgDrawDebtResponse) Size() (n int)
func (*MsgDrawDebtResponse) String ¶
func (m *MsgDrawDebtResponse) String() string
func (*MsgDrawDebtResponse) Unmarshal ¶
func (m *MsgDrawDebtResponse) Unmarshal(dAtA []byte) error
func (*MsgDrawDebtResponse) XXX_DiscardUnknown ¶
func (m *MsgDrawDebtResponse) XXX_DiscardUnknown()
func (*MsgDrawDebtResponse) XXX_Marshal ¶
func (m *MsgDrawDebtResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*MsgDrawDebtResponse) XXX_Merge ¶
func (m *MsgDrawDebtResponse) XXX_Merge(src proto.Message)
func (*MsgDrawDebtResponse) XXX_Size ¶
func (m *MsgDrawDebtResponse) XXX_Size() int
func (*MsgDrawDebtResponse) XXX_Unmarshal ¶
func (m *MsgDrawDebtResponse) XXX_Unmarshal(b []byte) error
type MsgLiquidate ¶
type MsgLiquidate struct { Keeper github_com_UnUniFi_chain_types.StringAccAddress `` /* 128-byte string literal not displayed */ Borrower github_com_UnUniFi_chain_types.StringAccAddress `` /* 134-byte string literal not displayed */ CollateralType string `` /* 126-byte string literal not displayed */ }
func NewMsgLiquidate ¶
func NewMsgLiquidate(keeper, borrower sdk.AccAddress, ctype string) MsgLiquidate
NewMsgLiquidate returns a new MsgLiquidate
func (*MsgLiquidate) Descriptor ¶
func (*MsgLiquidate) Descriptor() ([]byte, []int)
func (*MsgLiquidate) GetCollateralType ¶
func (m *MsgLiquidate) GetCollateralType() string
func (MsgLiquidate) GetSignBytes ¶
func (msg MsgLiquidate) GetSignBytes() []byte
GetSignBytes gets the canonical byte representation of the Msg.
func (MsgLiquidate) GetSigners ¶
func (msg MsgLiquidate) GetSigners() []sdk.AccAddress
GetSigners returns the addresses of signers that must sign.
func (*MsgLiquidate) Marshal ¶
func (m *MsgLiquidate) Marshal() (dAtA []byte, err 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
Route return the message type used for routing the message.
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
Type returns a human-readable string for the message, intended for utilization within tags.
func (*MsgLiquidate) Unmarshal ¶
func (m *MsgLiquidate) Unmarshal(dAtA []byte) error
func (MsgLiquidate) ValidateBasic ¶
func (msg MsgLiquidate) ValidateBasic() error
ValidateBasic does a simple validation check that doesn't require access to any other information.
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_Size ¶
func (m *MsgLiquidate) XXX_Size() int
func (*MsgLiquidate) XXX_Unmarshal ¶
func (m *MsgLiquidate) XXX_Unmarshal(b []byte) error
type MsgLiquidateResponse ¶
type MsgLiquidateResponse struct { }
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_Size ¶
func (m *MsgLiquidateResponse) XXX_Size() int
func (*MsgLiquidateResponse) XXX_Unmarshal ¶
func (m *MsgLiquidateResponse) XXX_Unmarshal(b []byte) error
type MsgRepayDebt ¶
type MsgRepayDebt struct { Sender github_com_UnUniFi_chain_types.StringAccAddress `` /* 128-byte string literal not displayed */ CollateralType string `` /* 126-byte string literal not displayed */ Payment types.Coin `protobuf:"bytes,3,opt,name=payment,proto3" json:"payment" yaml:"payment"` }
func NewMsgRepayDebt ¶
func NewMsgRepayDebt(sender sdk.AccAddress, collateralType string, payment sdk.Coin) MsgRepayDebt
NewMsgRepayDebt returns a new MsgRepayDebt
func (*MsgRepayDebt) Descriptor ¶
func (*MsgRepayDebt) Descriptor() ([]byte, []int)
func (*MsgRepayDebt) GetCollateralType ¶
func (m *MsgRepayDebt) GetCollateralType() string
func (*MsgRepayDebt) GetPayment ¶
func (m *MsgRepayDebt) GetPayment() types.Coin
func (MsgRepayDebt) GetSignBytes ¶
func (msg MsgRepayDebt) GetSignBytes() []byte
GetSignBytes gets the canonical byte representation of the Msg.
func (MsgRepayDebt) GetSigners ¶
func (msg MsgRepayDebt) GetSigners() []sdk.AccAddress
GetSigners returns the addresses of signers that must sign.
func (*MsgRepayDebt) Marshal ¶
func (m *MsgRepayDebt) Marshal() (dAtA []byte, err error)
func (*MsgRepayDebt) MarshalToSizedBuffer ¶
func (m *MsgRepayDebt) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*MsgRepayDebt) ProtoMessage ¶
func (*MsgRepayDebt) ProtoMessage()
func (*MsgRepayDebt) Reset ¶
func (m *MsgRepayDebt) Reset()
func (MsgRepayDebt) Route ¶
func (msg MsgRepayDebt) Route() string
Route return the message type used for routing the message.
func (*MsgRepayDebt) Size ¶
func (m *MsgRepayDebt) Size() (n int)
func (*MsgRepayDebt) String ¶
func (m *MsgRepayDebt) String() string
func (MsgRepayDebt) Type ¶
func (msg MsgRepayDebt) Type() string
Type returns a human-readable string for the message, intended for utilization within tags.
func (*MsgRepayDebt) Unmarshal ¶
func (m *MsgRepayDebt) Unmarshal(dAtA []byte) error
func (MsgRepayDebt) ValidateBasic ¶
func (msg MsgRepayDebt) ValidateBasic() error
ValidateBasic does a simple validation check that doesn't require access to any other information.
func (*MsgRepayDebt) XXX_DiscardUnknown ¶
func (m *MsgRepayDebt) XXX_DiscardUnknown()
func (*MsgRepayDebt) XXX_Marshal ¶
func (m *MsgRepayDebt) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*MsgRepayDebt) XXX_Merge ¶
func (m *MsgRepayDebt) XXX_Merge(src proto.Message)
func (*MsgRepayDebt) XXX_Size ¶
func (m *MsgRepayDebt) XXX_Size() int
func (*MsgRepayDebt) XXX_Unmarshal ¶
func (m *MsgRepayDebt) XXX_Unmarshal(b []byte) error
type MsgRepayDebtResponse ¶
type MsgRepayDebtResponse struct { }
func (*MsgRepayDebtResponse) Descriptor ¶
func (*MsgRepayDebtResponse) Descriptor() ([]byte, []int)
func (*MsgRepayDebtResponse) Marshal ¶
func (m *MsgRepayDebtResponse) Marshal() (dAtA []byte, err error)
func (*MsgRepayDebtResponse) MarshalTo ¶
func (m *MsgRepayDebtResponse) MarshalTo(dAtA []byte) (int, error)
func (*MsgRepayDebtResponse) MarshalToSizedBuffer ¶
func (m *MsgRepayDebtResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*MsgRepayDebtResponse) ProtoMessage ¶
func (*MsgRepayDebtResponse) ProtoMessage()
func (*MsgRepayDebtResponse) Reset ¶
func (m *MsgRepayDebtResponse) Reset()
func (*MsgRepayDebtResponse) Size ¶
func (m *MsgRepayDebtResponse) Size() (n int)
func (*MsgRepayDebtResponse) String ¶
func (m *MsgRepayDebtResponse) String() string
func (*MsgRepayDebtResponse) Unmarshal ¶
func (m *MsgRepayDebtResponse) Unmarshal(dAtA []byte) error
func (*MsgRepayDebtResponse) XXX_DiscardUnknown ¶
func (m *MsgRepayDebtResponse) XXX_DiscardUnknown()
func (*MsgRepayDebtResponse) XXX_Marshal ¶
func (m *MsgRepayDebtResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*MsgRepayDebtResponse) XXX_Merge ¶
func (m *MsgRepayDebtResponse) XXX_Merge(src proto.Message)
func (*MsgRepayDebtResponse) XXX_Size ¶
func (m *MsgRepayDebtResponse) XXX_Size() int
func (*MsgRepayDebtResponse) XXX_Unmarshal ¶
func (m *MsgRepayDebtResponse) XXX_Unmarshal(b []byte) error
type MsgServer ¶
type MsgServer interface { CreateCdp(context.Context, *MsgCreateCdp) (*MsgCreateCdpResponse, error) Deposit(context.Context, *MsgDeposit) (*MsgDepositResponse, error) Withdraw(context.Context, *MsgWithdraw) (*MsgWithdrawResponse, error) DrawDebt(context.Context, *MsgDrawDebt) (*MsgDrawDebtResponse, error) RepayDebt(context.Context, *MsgRepayDebt) (*MsgRepayDebtResponse, error) Liquidate(context.Context, *MsgLiquidate) (*MsgLiquidateResponse, error) }
MsgServer is the server API for Msg service.
type MsgWithdraw ¶
type MsgWithdraw struct { Depositor github_com_UnUniFi_chain_types.StringAccAddress `` /* 137-byte string literal not displayed */ Owner github_com_UnUniFi_chain_types.StringAccAddress `protobuf:"bytes,2,opt,name=owner,proto3,customtype=github.com/UnUniFi/chain/types.StringAccAddress" json:"owner" yaml:"owner"` Collateral types.Coin `protobuf:"bytes,3,opt,name=collateral,proto3" json:"collateral" yaml:"collateral"` CollateralType string `` /* 126-byte string literal not displayed */ }
func NewMsgWithdraw ¶
func NewMsgWithdraw(owner sdk.AccAddress, depositor sdk.AccAddress, collateral sdk.Coin, collateralType string) MsgWithdraw
NewMsgWithdraw returns a new MsgDeposit
func (*MsgWithdraw) Descriptor ¶
func (*MsgWithdraw) Descriptor() ([]byte, []int)
func (*MsgWithdraw) GetCollateral ¶
func (m *MsgWithdraw) GetCollateral() types.Coin
func (*MsgWithdraw) GetCollateralType ¶
func (m *MsgWithdraw) GetCollateralType() string
func (MsgWithdraw) GetSignBytes ¶
func (msg MsgWithdraw) GetSignBytes() []byte
GetSignBytes gets the canonical byte representation of the Msg.
func (MsgWithdraw) GetSigners ¶
func (msg MsgWithdraw) GetSigners() []sdk.AccAddress
GetSigners returns the addresses of signers that must sign.
func (*MsgWithdraw) Marshal ¶
func (m *MsgWithdraw) Marshal() (dAtA []byte, err 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
Route return the message type used for routing the message.
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
Type returns a human-readable string for the message, intended for utilization within tags.
func (*MsgWithdraw) Unmarshal ¶
func (m *MsgWithdraw) Unmarshal(dAtA []byte) error
func (MsgWithdraw) ValidateBasic ¶
func (msg MsgWithdraw) ValidateBasic() error
ValidateBasic does a simple validation check that doesn't require access to any other information.
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_Size ¶
func (m *MsgWithdraw) XXX_Size() int
func (*MsgWithdraw) XXX_Unmarshal ¶
func (m *MsgWithdraw) XXX_Unmarshal(b []byte) error
type MsgWithdrawResponse ¶
type MsgWithdrawResponse struct { }
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_Size ¶
func (m *MsgWithdrawResponse) XXX_Size() int
func (*MsgWithdrawResponse) XXX_Unmarshal ¶
func (m *MsgWithdrawResponse) XXX_Unmarshal(b []byte) error
type MultiCdpHooks ¶
type MultiCdpHooks []CdpHooks
MultiCdpHooks combine multiple cdp hooks, all hook functions are run in array sequence
func NewMultiCdpHooks ¶
func NewMultiCdpHooks(hooks ...CdpHooks) MultiCdpHooks
NewMultiCdpHooks returns a new MultiCdpHooks
func (MultiCdpHooks) AfterCdpCreated ¶
func (h MultiCdpHooks) AfterCdpCreated(ctx sdk.Context, cdp Cdp)
AfterCdpCreated runs before a cdp is created
func (MultiCdpHooks) BeforeCdpModified ¶
func (h MultiCdpHooks) BeforeCdpModified(ctx sdk.Context, cdp Cdp)
BeforeCdpModified runs before a cdp is modified
type Params ¶
type Params struct { CollateralParams []CollateralParam `protobuf:"bytes,1,rep,name=collateral_params,json=collateralParams,proto3" json:"collateral_params" yaml:"collateral_params"` DebtParams []DebtParam `protobuf:"bytes,2,rep,name=debt_params,json=debtParams,proto3" json:"debt_params" yaml:"debt_param"` }
func DefaultParams ¶
func DefaultParams() Params
DefaultParams returns default params for cdp module
func NewParams ¶
func NewParams( collateralParams CollateralParams, debtParams DebtParams, ) Params
NewParams returns a new params object
func (*Params) Descriptor ¶
func (*Params) GetCollateralParams ¶
func (m *Params) GetCollateralParams() []CollateralParam
func (*Params) GetDebtParams ¶ added in v1.0.0
func (*Params) MarshalToSizedBuffer ¶
func (*Params) ParamSetPairs ¶
func (p *Params) ParamSetPairs() paramstype.ParamSetPairs
ParamSetPairs implements the ParamSet interface and returns all the key/value pairs pairs of auth module's parameters. nolint
func (*Params) ProtoMessage ¶
func (*Params) ProtoMessage()
func (*Params) XXX_DiscardUnknown ¶
func (m *Params) XXX_DiscardUnknown()
func (*Params) XXX_Marshal ¶
func (*Params) XXX_Unmarshal ¶
type PricefeedKeeper ¶
type PricefeedKeeper interface { GetCurrentPrice(sdk.Context, string) (pftypes.CurrentPrice, error) GetParams(sdk.Context) pftypes.Params // These are used for testing TODO replace mockApp with keeper in tests to remove these SetParams(sdk.Context, pftypes.Params) SetPrice(sdk.Context, sdk.AccAddress, string, sdk.Dec, time.Time) (pftypes.PostedPrice, error) SetCurrentPrices(sdk.Context, string) error }
PricefeedKeeper defines the expected interface for the pricefeed (noalias)
type QueryAllAccountRequest ¶
type QueryAllAccountRequest struct { }
func (*QueryAllAccountRequest) Descriptor ¶
func (*QueryAllAccountRequest) Descriptor() ([]byte, []int)
func (*QueryAllAccountRequest) Marshal ¶
func (m *QueryAllAccountRequest) Marshal() (dAtA []byte, err error)
func (*QueryAllAccountRequest) MarshalTo ¶
func (m *QueryAllAccountRequest) MarshalTo(dAtA []byte) (int, error)
func (*QueryAllAccountRequest) MarshalToSizedBuffer ¶
func (m *QueryAllAccountRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*QueryAllAccountRequest) ProtoMessage ¶
func (*QueryAllAccountRequest) ProtoMessage()
func (*QueryAllAccountRequest) Reset ¶
func (m *QueryAllAccountRequest) Reset()
func (*QueryAllAccountRequest) Size ¶
func (m *QueryAllAccountRequest) Size() (n int)
func (*QueryAllAccountRequest) String ¶
func (m *QueryAllAccountRequest) String() string
func (*QueryAllAccountRequest) Unmarshal ¶
func (m *QueryAllAccountRequest) Unmarshal(dAtA []byte) error
func (*QueryAllAccountRequest) XXX_DiscardUnknown ¶
func (m *QueryAllAccountRequest) XXX_DiscardUnknown()
func (*QueryAllAccountRequest) XXX_Marshal ¶
func (m *QueryAllAccountRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*QueryAllAccountRequest) XXX_Merge ¶
func (m *QueryAllAccountRequest) XXX_Merge(src proto.Message)
func (*QueryAllAccountRequest) XXX_Size ¶
func (m *QueryAllAccountRequest) XXX_Size() int
func (*QueryAllAccountRequest) XXX_Unmarshal ¶
func (m *QueryAllAccountRequest) XXX_Unmarshal(b []byte) error
type QueryAllAccountResponse ¶
type QueryAllAccountResponse struct {
Accounts []*types.Any `protobuf:"bytes,1,rep,name=accounts,proto3" json:"accounts,omitempty"`
}
func (*QueryAllAccountResponse) Descriptor ¶
func (*QueryAllAccountResponse) Descriptor() ([]byte, []int)
func (*QueryAllAccountResponse) GetAccounts ¶
func (m *QueryAllAccountResponse) GetAccounts() []*types.Any
func (*QueryAllAccountResponse) Marshal ¶
func (m *QueryAllAccountResponse) Marshal() (dAtA []byte, err error)
func (*QueryAllAccountResponse) MarshalTo ¶
func (m *QueryAllAccountResponse) MarshalTo(dAtA []byte) (int, error)
func (*QueryAllAccountResponse) MarshalToSizedBuffer ¶
func (m *QueryAllAccountResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*QueryAllAccountResponse) ProtoMessage ¶
func (*QueryAllAccountResponse) ProtoMessage()
func (*QueryAllAccountResponse) Reset ¶
func (m *QueryAllAccountResponse) Reset()
func (*QueryAllAccountResponse) Size ¶
func (m *QueryAllAccountResponse) Size() (n int)
func (*QueryAllAccountResponse) String ¶
func (m *QueryAllAccountResponse) String() string
func (*QueryAllAccountResponse) Unmarshal ¶
func (m *QueryAllAccountResponse) Unmarshal(dAtA []byte) error
func (*QueryAllAccountResponse) XXX_DiscardUnknown ¶
func (m *QueryAllAccountResponse) XXX_DiscardUnknown()
func (*QueryAllAccountResponse) XXX_Marshal ¶
func (m *QueryAllAccountResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*QueryAllAccountResponse) XXX_Merge ¶
func (m *QueryAllAccountResponse) XXX_Merge(src proto.Message)
func (*QueryAllAccountResponse) XXX_Size ¶
func (m *QueryAllAccountResponse) XXX_Size() int
func (*QueryAllAccountResponse) XXX_Unmarshal ¶
func (m *QueryAllAccountResponse) XXX_Unmarshal(b []byte) error
type QueryAllCdpRequest ¶
type QueryAllCdpRequest struct {
Pagination *query.PageRequest `protobuf:"bytes,1,opt,name=pagination,proto3" json:"pagination,omitempty"`
}
func (*QueryAllCdpRequest) Descriptor ¶
func (*QueryAllCdpRequest) Descriptor() ([]byte, []int)
func (*QueryAllCdpRequest) GetPagination ¶
func (m *QueryAllCdpRequest) GetPagination() *query.PageRequest
func (*QueryAllCdpRequest) Marshal ¶
func (m *QueryAllCdpRequest) Marshal() (dAtA []byte, err error)
func (*QueryAllCdpRequest) MarshalTo ¶
func (m *QueryAllCdpRequest) MarshalTo(dAtA []byte) (int, error)
func (*QueryAllCdpRequest) MarshalToSizedBuffer ¶
func (m *QueryAllCdpRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*QueryAllCdpRequest) ProtoMessage ¶
func (*QueryAllCdpRequest) ProtoMessage()
func (*QueryAllCdpRequest) Reset ¶
func (m *QueryAllCdpRequest) Reset()
func (*QueryAllCdpRequest) Size ¶
func (m *QueryAllCdpRequest) Size() (n int)
func (*QueryAllCdpRequest) String ¶
func (m *QueryAllCdpRequest) String() string
func (*QueryAllCdpRequest) Unmarshal ¶
func (m *QueryAllCdpRequest) Unmarshal(dAtA []byte) error
func (*QueryAllCdpRequest) XXX_DiscardUnknown ¶
func (m *QueryAllCdpRequest) XXX_DiscardUnknown()
func (*QueryAllCdpRequest) XXX_Marshal ¶
func (m *QueryAllCdpRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*QueryAllCdpRequest) XXX_Merge ¶
func (m *QueryAllCdpRequest) XXX_Merge(src proto.Message)
func (*QueryAllCdpRequest) XXX_Size ¶
func (m *QueryAllCdpRequest) XXX_Size() int
func (*QueryAllCdpRequest) XXX_Unmarshal ¶
func (m *QueryAllCdpRequest) XXX_Unmarshal(b []byte) error
type QueryAllCdpResponse ¶
type QueryAllCdpResponse struct { Cdp []AugmentedCdp `protobuf:"bytes,1,rep,name=cdp,proto3" json:"cdp"` Pagination *query.PageResponse `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"` }
func (*QueryAllCdpResponse) Descriptor ¶
func (*QueryAllCdpResponse) Descriptor() ([]byte, []int)
func (*QueryAllCdpResponse) GetCdp ¶
func (m *QueryAllCdpResponse) GetCdp() []AugmentedCdp
func (*QueryAllCdpResponse) GetPagination ¶
func (m *QueryAllCdpResponse) GetPagination() *query.PageResponse
func (*QueryAllCdpResponse) Marshal ¶
func (m *QueryAllCdpResponse) Marshal() (dAtA []byte, err error)
func (*QueryAllCdpResponse) MarshalTo ¶
func (m *QueryAllCdpResponse) MarshalTo(dAtA []byte) (int, error)
func (*QueryAllCdpResponse) MarshalToSizedBuffer ¶
func (m *QueryAllCdpResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*QueryAllCdpResponse) ProtoMessage ¶
func (*QueryAllCdpResponse) ProtoMessage()
func (*QueryAllCdpResponse) Reset ¶
func (m *QueryAllCdpResponse) Reset()
func (*QueryAllCdpResponse) Size ¶
func (m *QueryAllCdpResponse) Size() (n int)
func (*QueryAllCdpResponse) String ¶
func (m *QueryAllCdpResponse) String() string
func (*QueryAllCdpResponse) Unmarshal ¶
func (m *QueryAllCdpResponse) Unmarshal(dAtA []byte) error
func (*QueryAllCdpResponse) XXX_DiscardUnknown ¶
func (m *QueryAllCdpResponse) XXX_DiscardUnknown()
func (*QueryAllCdpResponse) XXX_Marshal ¶
func (m *QueryAllCdpResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*QueryAllCdpResponse) XXX_Merge ¶
func (m *QueryAllCdpResponse) XXX_Merge(src proto.Message)
func (*QueryAllCdpResponse) XXX_Size ¶
func (m *QueryAllCdpResponse) XXX_Size() int
func (*QueryAllCdpResponse) XXX_Unmarshal ¶
func (m *QueryAllCdpResponse) XXX_Unmarshal(b []byte) error
type QueryAllDepositRequest ¶
type QueryAllDepositRequest struct { Owner string `protobuf:"bytes,1,opt,name=owner,proto3" json:"owner,omitempty"` CollateralType string `protobuf:"bytes,2,opt,name=collateral_type,json=collateralType,proto3" json:"collateral_type,omitempty"` }
func (*QueryAllDepositRequest) Descriptor ¶
func (*QueryAllDepositRequest) Descriptor() ([]byte, []int)
func (*QueryAllDepositRequest) GetCollateralType ¶
func (m *QueryAllDepositRequest) GetCollateralType() string
func (*QueryAllDepositRequest) GetOwner ¶
func (m *QueryAllDepositRequest) GetOwner() string
func (*QueryAllDepositRequest) Marshal ¶
func (m *QueryAllDepositRequest) Marshal() (dAtA []byte, err error)
func (*QueryAllDepositRequest) MarshalTo ¶
func (m *QueryAllDepositRequest) MarshalTo(dAtA []byte) (int, error)
func (*QueryAllDepositRequest) MarshalToSizedBuffer ¶
func (m *QueryAllDepositRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*QueryAllDepositRequest) ProtoMessage ¶
func (*QueryAllDepositRequest) ProtoMessage()
func (*QueryAllDepositRequest) Reset ¶
func (m *QueryAllDepositRequest) Reset()
func (*QueryAllDepositRequest) Size ¶
func (m *QueryAllDepositRequest) Size() (n int)
func (*QueryAllDepositRequest) String ¶
func (m *QueryAllDepositRequest) String() string
func (*QueryAllDepositRequest) Unmarshal ¶
func (m *QueryAllDepositRequest) Unmarshal(dAtA []byte) error
func (*QueryAllDepositRequest) XXX_DiscardUnknown ¶
func (m *QueryAllDepositRequest) XXX_DiscardUnknown()
func (*QueryAllDepositRequest) XXX_Marshal ¶
func (m *QueryAllDepositRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*QueryAllDepositRequest) XXX_Merge ¶
func (m *QueryAllDepositRequest) XXX_Merge(src proto.Message)
func (*QueryAllDepositRequest) XXX_Size ¶
func (m *QueryAllDepositRequest) XXX_Size() int
func (*QueryAllDepositRequest) XXX_Unmarshal ¶
func (m *QueryAllDepositRequest) XXX_Unmarshal(b []byte) error
type QueryAllDepositResponse ¶
type QueryAllDepositResponse struct {
Deposits []Deposit `protobuf:"bytes,1,rep,name=deposits,proto3" json:"deposits"`
}
func (*QueryAllDepositResponse) Descriptor ¶
func (*QueryAllDepositResponse) Descriptor() ([]byte, []int)
func (*QueryAllDepositResponse) GetDeposits ¶
func (m *QueryAllDepositResponse) GetDeposits() []Deposit
func (*QueryAllDepositResponse) Marshal ¶
func (m *QueryAllDepositResponse) Marshal() (dAtA []byte, err error)
func (*QueryAllDepositResponse) MarshalTo ¶
func (m *QueryAllDepositResponse) MarshalTo(dAtA []byte) (int, error)
func (*QueryAllDepositResponse) MarshalToSizedBuffer ¶
func (m *QueryAllDepositResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*QueryAllDepositResponse) ProtoMessage ¶
func (*QueryAllDepositResponse) ProtoMessage()
func (*QueryAllDepositResponse) Reset ¶
func (m *QueryAllDepositResponse) Reset()
func (*QueryAllDepositResponse) Size ¶
func (m *QueryAllDepositResponse) Size() (n int)
func (*QueryAllDepositResponse) String ¶
func (m *QueryAllDepositResponse) String() string
func (*QueryAllDepositResponse) Unmarshal ¶
func (m *QueryAllDepositResponse) Unmarshal(dAtA []byte) error
func (*QueryAllDepositResponse) XXX_DiscardUnknown ¶
func (m *QueryAllDepositResponse) XXX_DiscardUnknown()
func (*QueryAllDepositResponse) XXX_Marshal ¶
func (m *QueryAllDepositResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*QueryAllDepositResponse) XXX_Merge ¶
func (m *QueryAllDepositResponse) XXX_Merge(src proto.Message)
func (*QueryAllDepositResponse) XXX_Size ¶
func (m *QueryAllDepositResponse) XXX_Size() int
func (*QueryAllDepositResponse) XXX_Unmarshal ¶
func (m *QueryAllDepositResponse) XXX_Unmarshal(b []byte) error
type QueryClient ¶
type QueryClient interface { Params(ctx context.Context, in *QueryParamsRequest, opts ...grpc.CallOption) (*QueryParamsResponse, error) // this line is used by starport scaffolding # 2 Cdp(ctx context.Context, in *QueryGetCdpRequest, opts ...grpc.CallOption) (*QueryGetCdpResponse, error) CdpAll(ctx context.Context, in *QueryAllCdpRequest, opts ...grpc.CallOption) (*QueryAllCdpResponse, error) AccountAll(ctx context.Context, in *QueryAllAccountRequest, opts ...grpc.CallOption) (*QueryAllAccountResponse, error) DepositAll(ctx context.Context, in *QueryAllDepositRequest, opts ...grpc.CallOption) (*QueryAllDepositResponse, 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 QueryGetCdpRequest ¶
type QueryGetCdpRequest struct { Owner string `protobuf:"bytes,1,opt,name=owner,proto3" json:"owner,omitempty"` CollateralType string `protobuf:"bytes,2,opt,name=collateral_type,json=collateralType,proto3" json:"collateral_type,omitempty"` }
this line is used by starport scaffolding # 3
func (*QueryGetCdpRequest) Descriptor ¶
func (*QueryGetCdpRequest) Descriptor() ([]byte, []int)
func (*QueryGetCdpRequest) GetCollateralType ¶
func (m *QueryGetCdpRequest) GetCollateralType() string
func (*QueryGetCdpRequest) GetOwner ¶
func (m *QueryGetCdpRequest) GetOwner() string
func (*QueryGetCdpRequest) Marshal ¶
func (m *QueryGetCdpRequest) Marshal() (dAtA []byte, err error)
func (*QueryGetCdpRequest) MarshalTo ¶
func (m *QueryGetCdpRequest) MarshalTo(dAtA []byte) (int, error)
func (*QueryGetCdpRequest) MarshalToSizedBuffer ¶
func (m *QueryGetCdpRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*QueryGetCdpRequest) ProtoMessage ¶
func (*QueryGetCdpRequest) ProtoMessage()
func (*QueryGetCdpRequest) Reset ¶
func (m *QueryGetCdpRequest) Reset()
func (*QueryGetCdpRequest) Size ¶
func (m *QueryGetCdpRequest) Size() (n int)
func (*QueryGetCdpRequest) String ¶
func (m *QueryGetCdpRequest) String() string
func (*QueryGetCdpRequest) Unmarshal ¶
func (m *QueryGetCdpRequest) Unmarshal(dAtA []byte) error
func (*QueryGetCdpRequest) XXX_DiscardUnknown ¶
func (m *QueryGetCdpRequest) XXX_DiscardUnknown()
func (*QueryGetCdpRequest) XXX_Marshal ¶
func (m *QueryGetCdpRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*QueryGetCdpRequest) XXX_Merge ¶
func (m *QueryGetCdpRequest) XXX_Merge(src proto.Message)
func (*QueryGetCdpRequest) XXX_Size ¶
func (m *QueryGetCdpRequest) XXX_Size() int
func (*QueryGetCdpRequest) XXX_Unmarshal ¶
func (m *QueryGetCdpRequest) XXX_Unmarshal(b []byte) error
type QueryGetCdpResponse ¶
type QueryGetCdpResponse struct {
Cdp AugmentedCdp `protobuf:"bytes,1,opt,name=cdp,proto3" json:"cdp"`
}
func (*QueryGetCdpResponse) Descriptor ¶
func (*QueryGetCdpResponse) Descriptor() ([]byte, []int)
func (*QueryGetCdpResponse) GetCdp ¶
func (m *QueryGetCdpResponse) GetCdp() AugmentedCdp
func (*QueryGetCdpResponse) Marshal ¶
func (m *QueryGetCdpResponse) Marshal() (dAtA []byte, err error)
func (*QueryGetCdpResponse) MarshalTo ¶
func (m *QueryGetCdpResponse) MarshalTo(dAtA []byte) (int, error)
func (*QueryGetCdpResponse) MarshalToSizedBuffer ¶
func (m *QueryGetCdpResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*QueryGetCdpResponse) ProtoMessage ¶
func (*QueryGetCdpResponse) ProtoMessage()
func (*QueryGetCdpResponse) Reset ¶
func (m *QueryGetCdpResponse) Reset()
func (*QueryGetCdpResponse) Size ¶
func (m *QueryGetCdpResponse) Size() (n int)
func (*QueryGetCdpResponse) String ¶
func (m *QueryGetCdpResponse) String() string
func (*QueryGetCdpResponse) Unmarshal ¶
func (m *QueryGetCdpResponse) Unmarshal(dAtA []byte) error
func (*QueryGetCdpResponse) XXX_DiscardUnknown ¶
func (m *QueryGetCdpResponse) XXX_DiscardUnknown()
func (*QueryGetCdpResponse) XXX_Marshal ¶
func (m *QueryGetCdpResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*QueryGetCdpResponse) XXX_Merge ¶
func (m *QueryGetCdpResponse) XXX_Merge(src proto.Message)
func (*QueryGetCdpResponse) XXX_Size ¶
func (m *QueryGetCdpResponse) XXX_Size() int
func (*QueryGetCdpResponse) XXX_Unmarshal ¶
func (m *QueryGetCdpResponse) XXX_Unmarshal(b []byte) error
type QueryParamsRequest ¶
type QueryParamsRequest struct { }
func (*QueryParamsRequest) Descriptor ¶
func (*QueryParamsRequest) Descriptor() ([]byte, []int)
func (*QueryParamsRequest) Marshal ¶
func (m *QueryParamsRequest) Marshal() (dAtA []byte, err error)
func (*QueryParamsRequest) MarshalTo ¶
func (m *QueryParamsRequest) MarshalTo(dAtA []byte) (int, error)
func (*QueryParamsRequest) MarshalToSizedBuffer ¶
func (m *QueryParamsRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*QueryParamsRequest) ProtoMessage ¶
func (*QueryParamsRequest) ProtoMessage()
func (*QueryParamsRequest) Reset ¶
func (m *QueryParamsRequest) Reset()
func (*QueryParamsRequest) Size ¶
func (m *QueryParamsRequest) Size() (n int)
func (*QueryParamsRequest) String ¶
func (m *QueryParamsRequest) String() string
func (*QueryParamsRequest) Unmarshal ¶
func (m *QueryParamsRequest) Unmarshal(dAtA []byte) error
func (*QueryParamsRequest) XXX_DiscardUnknown ¶
func (m *QueryParamsRequest) XXX_DiscardUnknown()
func (*QueryParamsRequest) XXX_Marshal ¶
func (m *QueryParamsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*QueryParamsRequest) XXX_Merge ¶
func (m *QueryParamsRequest) XXX_Merge(src proto.Message)
func (*QueryParamsRequest) XXX_Size ¶
func (m *QueryParamsRequest) XXX_Size() int
func (*QueryParamsRequest) XXX_Unmarshal ¶
func (m *QueryParamsRequest) XXX_Unmarshal(b []byte) error
type QueryParamsResponse ¶
type QueryParamsResponse struct {
Params *Params `protobuf:"bytes,1,opt,name=params,proto3" json:"params,omitempty"`
}
func (*QueryParamsResponse) Descriptor ¶
func (*QueryParamsResponse) Descriptor() ([]byte, []int)
func (*QueryParamsResponse) GetParams ¶
func (m *QueryParamsResponse) GetParams() *Params
func (*QueryParamsResponse) Marshal ¶
func (m *QueryParamsResponse) Marshal() (dAtA []byte, err error)
func (*QueryParamsResponse) MarshalTo ¶
func (m *QueryParamsResponse) MarshalTo(dAtA []byte) (int, error)
func (*QueryParamsResponse) MarshalToSizedBuffer ¶
func (m *QueryParamsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*QueryParamsResponse) ProtoMessage ¶
func (*QueryParamsResponse) ProtoMessage()
func (*QueryParamsResponse) Reset ¶
func (m *QueryParamsResponse) Reset()
func (*QueryParamsResponse) Size ¶
func (m *QueryParamsResponse) Size() (n int)
func (*QueryParamsResponse) String ¶
func (m *QueryParamsResponse) String() string
func (*QueryParamsResponse) Unmarshal ¶
func (m *QueryParamsResponse) Unmarshal(dAtA []byte) error
func (*QueryParamsResponse) XXX_DiscardUnknown ¶
func (m *QueryParamsResponse) XXX_DiscardUnknown()
func (*QueryParamsResponse) XXX_Marshal ¶
func (m *QueryParamsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*QueryParamsResponse) XXX_Merge ¶
func (m *QueryParamsResponse) XXX_Merge(src proto.Message)
func (*QueryParamsResponse) XXX_Size ¶
func (m *QueryParamsResponse) XXX_Size() int
func (*QueryParamsResponse) XXX_Unmarshal ¶
func (m *QueryParamsResponse) XXX_Unmarshal(b []byte) error
type QueryServer ¶
type QueryServer interface { Params(context.Context, *QueryParamsRequest) (*QueryParamsResponse, error) // this line is used by starport scaffolding # 2 Cdp(context.Context, *QueryGetCdpRequest) (*QueryGetCdpResponse, error) CdpAll(context.Context, *QueryAllCdpRequest) (*QueryAllCdpResponse, error) AccountAll(context.Context, *QueryAllAccountRequest) (*QueryAllAccountResponse, error) DepositAll(context.Context, *QueryAllDepositRequest) (*QueryAllDepositResponse, error) }
QueryServer is the server API for Query service.
type UnimplementedMsgServer ¶
type UnimplementedMsgServer struct { }
UnimplementedMsgServer can be embedded to have forward compatible implementations.
func (*UnimplementedMsgServer) CreateCdp ¶
func (*UnimplementedMsgServer) CreateCdp(ctx context.Context, req *MsgCreateCdp) (*MsgCreateCdpResponse, error)
func (*UnimplementedMsgServer) Deposit ¶
func (*UnimplementedMsgServer) Deposit(ctx context.Context, req *MsgDeposit) (*MsgDepositResponse, error)
func (*UnimplementedMsgServer) DrawDebt ¶
func (*UnimplementedMsgServer) DrawDebt(ctx context.Context, req *MsgDrawDebt) (*MsgDrawDebtResponse, error)
func (*UnimplementedMsgServer) Liquidate ¶
func (*UnimplementedMsgServer) Liquidate(ctx context.Context, req *MsgLiquidate) (*MsgLiquidateResponse, error)
func (*UnimplementedMsgServer) RepayDebt ¶
func (*UnimplementedMsgServer) RepayDebt(ctx context.Context, req *MsgRepayDebt) (*MsgRepayDebtResponse, error)
func (*UnimplementedMsgServer) Withdraw ¶
func (*UnimplementedMsgServer) Withdraw(ctx context.Context, req *MsgWithdraw) (*MsgWithdrawResponse, error)
type UnimplementedQueryServer ¶
type UnimplementedQueryServer struct { }
UnimplementedQueryServer can be embedded to have forward compatible implementations.
func (*UnimplementedQueryServer) AccountAll ¶
func (*UnimplementedQueryServer) AccountAll(ctx context.Context, req *QueryAllAccountRequest) (*QueryAllAccountResponse, error)
func (*UnimplementedQueryServer) Cdp ¶
func (*UnimplementedQueryServer) Cdp(ctx context.Context, req *QueryGetCdpRequest) (*QueryGetCdpResponse, error)
func (*UnimplementedQueryServer) CdpAll ¶
func (*UnimplementedQueryServer) CdpAll(ctx context.Context, req *QueryAllCdpRequest) (*QueryAllCdpResponse, error)
func (*UnimplementedQueryServer) DepositAll ¶
func (*UnimplementedQueryServer) DepositAll(ctx context.Context, req *QueryAllDepositRequest) (*QueryAllDepositResponse, error)
func (*UnimplementedQueryServer) Params ¶
func (*UnimplementedQueryServer) Params(ctx context.Context, req *QueryParamsRequest) (*QueryParamsResponse, error)