types

package
v0.16.1 Latest Latest
Warning

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

Go to latest
Published: Jan 27, 2022 License: Apache-2.0 Imports: 37 Imported by: 13

Documentation

Overview

Package types is a reverse proxy.

It translates gRPC into RESTful JSON APIs.

Index

Constants

View Source
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

View Source
const (
	// ModuleName The name that will be used throughout the module
	ModuleName = "cdp"

	// StoreKey Top level store key where all module items will be stored
	StoreKey = ModuleName

	// RouterKey Top level router key
	RouterKey = ModuleName

	// QuerierRoute Top level query string
	QuerierRoute = ModuleName

	// DefaultParamspace default name for parameter store
	DefaultParamspace = ModuleName

	// LiquidatorMacc module account for liquidator
	LiquidatorMacc = "liquidator"
)
View Source
const (
	QueryGetCdp                     = "cdp"
	QueryGetCdps                    = "cdps"
	QueryGetCdpDeposits             = "deposits"
	QueryGetCdpsByCollateralization = "ratio"          // legacy query, maintained for REST API
	QueryGetCdpsByCollateralType    = "collateralType" // legacy query, maintained for REST API
	QueryGetParams                  = "params"
	QueryGetAccounts                = "accounts"
	QueryGetTotalPrincipal          = "totalPrincipal"
	QueryGetTotalCollateral         = "totalCollateral"
	RestOwner                       = "owner"
	RestCollateralType              = "collateral-type"
	RestRatio                       = "ratio"
)

Querier routes for the cdp module

Variables

View Source
var (
	ErrInvalidLengthCdp        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowCdp          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupCdp = fmt.Errorf("proto: unexpected end of group")
)
View Source
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")
)
View Source
var (
	ErrInvalidLengthGenesis        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowGenesis          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupGenesis = fmt.Errorf("proto: unexpected end of group")
)
View Source
var (
	CdpIDKeyPrefix             = []byte{0x01}
	CdpKeyPrefix               = []byte{0x02}
	CollateralRatioIndexPrefix = []byte{0x03}
	CdpIDKey                   = []byte{0x04}
	DebtDenomKey               = []byte{0x05}
	GovDenomKey                = []byte{0x06}
	DepositKeyPrefix           = []byte{0x07}
	PrincipalKeyPrefix         = []byte{0x08}
	PricefeedStatusKeyPrefix   = []byte{0x10}
	PreviousAccrualTimePrefix  = []byte{0x12}
	InterestFactorPrefix       = []byte{0x13}
)

KVStore key prefixes

View Source
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")
	DefaultGlobalDebt       = sdk.NewCoin(DefaultStableDenom, sdk.ZeroInt())
	DefaultCircuitBreaker   = false
	DefaultCollateralParams = CollateralParams{}
	DefaultDebtParam        = DebtParam{
		Denom:            "usdx",
		ReferenceAsset:   "usd",
		ConversionFactor: sdk.NewInt(6),
		DebtFloor:        sdk.NewInt(10000000),
	}
	DefaultCdpStartingID    = uint64(1)
	DefaultDebtDenom        = "debt"
	DefaultGovDenom         = "ukava"
	DefaultStableDenom      = "usdx"
	DefaultSurplusThreshold = sdk.NewInt(500000000000)
	DefaultDebtThreshold    = sdk.NewInt(100000000000)
	DefaultSurplusLot       = sdk.NewInt(10000000000)
	DefaultDebtLot          = sdk.NewInt(10000000000)
)

Parameter keys

View Source
var (
	ErrInvalidLengthQuery        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowQuery          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupQuery = fmt.Errorf("proto: unexpected end of group")
)
View Source
var (
	ErrInvalidLengthTx        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowTx          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupTx = fmt.Errorf("proto: unexpected end of group")
)
View Source
var MaxSortableDec = sdk.OneDec().Quo(sdk.SmallestDec())

MaxSortableDec largest sortable sdk.Dec

View Source
var (
	ModuleCdc = codec.NewAminoCodec(amino)
)

Functions

func CdpKey

func CdpKey(collateralType string, cdpID uint64) []byte

CdpKey key of a specific cdp in the store

func CollateralRatioBytes

func CollateralRatioBytes(ratio sdk.Dec) []byte

CollateralRatioBytes returns the liquidation ratio as sortable bytes

func CollateralRatioIterKey

func CollateralRatioIterKey(collateralType string, ratio sdk.Dec) []byte

CollateralRatioIterKey returns the key for iterating over cdps by denom and liquidation ratio

func CollateralRatioKey

func CollateralRatioKey(collateralType string, cdpID uint64, ratio sdk.Dec) []byte

CollateralRatioKey returns the key for querying a cdp by its liquidation ratio

func DenomIterKey

func DenomIterKey(collateralType string) []byte

DenomIterKey returns the key for iterating over cdps of a certain denom in the store

func DepositIterKey

func DepositIterKey(cdpID uint64) []byte

DepositIterKey returns the prefix key for iterating over deposits to a cdp

func DepositKey

func DepositKey(cdpID uint64, depositor sdk.AccAddress) []byte

DepositKey key of a specific deposit in the store

func GetCdpIDBytes

func GetCdpIDBytes(cdpID uint64) (cdpIDBz []byte)

GetCdpIDBytes returns the byte representation of the cdpID

func GetCdpIDFromBytes

func GetCdpIDFromBytes(bz []byte) (cdpID uint64)

GetCdpIDFromBytes returns cdpID in uint64 format from a byte array

func ParamKeyTable

func ParamKeyTable() paramtypes.KeyTable

ParamKeyTable Key declaration for parameters

func ParseDecBytes

func ParseDecBytes(db []byte) (sdk.Dec, error)

ParseDecBytes parses a []byte encoded using SortableDecBytes back to sdk.Dec

func RegisterInterfaces added in v0.16.0

func RegisterInterfaces(registry types.InterfaceRegistry)

func RegisterLegacyAminoCodec added in v0.16.0

func RegisterLegacyAminoCodec(cdc *codec.LegacyAmino)

RegisterLegacyAminoCodec registers all the necessary types and interfaces for the governance module.

func RegisterMsgServer added in v0.16.0

func RegisterMsgServer(s grpc1.Server, srv MsgServer)

func RegisterQueryHandler added in v0.16.0

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

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

func RegisterQueryHandlerClient added in v0.16.0

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 added in v0.16.0

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 added in v0.16.0

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 (such as grpc.SendHeader, etc) to stop working. Consider using RegisterQueryHandlerFromEndpoint instead.

func RegisterQueryServer added in v0.16.0

func RegisterQueryServer(s grpc1.Server, srv QueryServer)

func RelativePow

func RelativePow(x sdk.Int, n sdk.Int, b sdk.Int) (z sdk.Int)

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

func SortableDecBytes(dec sdk.Dec) []byte

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

func SplitCdpKey(key []byte) (string, uint64)

SplitCdpKey returns the component parts of a cdp key

func SplitCollateralRatioIterKey

func SplitCollateralRatioIterKey(key []byte) (string, sdk.Dec)

SplitCollateralRatioIterKey split the collateral ratio key and return the denom, cdp id, and collateral:debt ratio

func SplitCollateralRatioKey

func SplitCollateralRatioKey(key []byte) (string, uint64, sdk.Dec)

SplitCollateralRatioKey split the collateral ratio key and return the denom, cdp id, and collateral:debt ratio

func SplitDenomIterKey

func SplitDenomIterKey(key []byte) string

SplitDenomIterKey returns the component part of a key for iterating over cdps by denom

func SplitDepositIterKey

func SplitDepositIterKey(key []byte) (cdpID uint64)

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

func ValidSortableDec(dec sdk.Dec) bool

ValidSortableDec sdk.Dec can't have precision of less than 10^-18

Types

type AccountKeeper added in v0.5.0

type AccountKeeper interface {
	GetModuleAddress(name string) sdk.AccAddress
	GetModuleAccount(ctx sdk.Context, name string) authtypes.ModuleAccountI
	// TODO remove with genesis 2-phases refactor https://github.com/cosmos/cosmos-sdk/issues/2862
	SetModuleAccount(sdk.Context, authtypes.ModuleAccountI)

	IterateAccounts(ctx sdk.Context, cb func(account authtypes.AccountI) (stop bool))
	GetAccount(ctx sdk.Context, addr sdk.AccAddress) authtypes.AccountI
}

AccountKeeper expected interface for the account keeper

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

type AugmentedCDP

type AugmentedCDP struct {
	CDP                    `json:"cdp" yaml:"cdp"`
	CollateralValue        sdk.Coin `json:"collateral_value" yaml:"collateral_value"`               // collateral's market value in debt coin
	CollateralizationRatio sdk.Dec  `json:"collateralization_ratio" yaml:"collateralization_ratio"` // current collateralization ratio
}

AugmentedCDP provides additional information about an active CDP. This is only used for the legacy querier and legacy rest endpoints.

func NewAugmentedCDP

func NewAugmentedCDP(cdp CDP, collateralValue sdk.Coin, collateralizationRatio sdk.Dec) AugmentedCDP

NewAugmentedCDP creates a new AugmentedCDP object

func (AugmentedCDP) String

func (augCDP AugmentedCDP) String() string

String implements fmt.stringer

type AugmentedCDPs

type AugmentedCDPs []AugmentedCDP

AugmentedCDPs a collection of AugmentedCDP objects

func (AugmentedCDPs) String

func (augcdps AugmentedCDPs) String() string

String implements stringer

type BankKeeper added in v0.16.0

type BankKeeper interface {
	SendCoinsFromModuleToAccount(ctx sdk.Context, senderModule string, recipientAddr sdk.AccAddress, amt sdk.Coins) error
	SendCoinsFromAccountToModule(ctx sdk.Context, senderAddr sdk.AccAddress, recipientModule string, amt sdk.Coins) error
	SendCoinsFromModuleToModule(ctx sdk.Context, senderModule, recipientModule string, amt sdk.Coins) error
	MintCoins(ctx sdk.Context, moduleName string, amt sdk.Coins) error
	BurnCoins(ctx sdk.Context, moduleName string, amt sdk.Coins) error

	GetSupply(ctx sdk.Context, denom string) sdk.Coin
	GetBalance(ctx sdk.Context, addr sdk.AccAddress, denom string) sdk.Coin
	GetAllBalances(ctx sdk.Context, addr sdk.AccAddress) sdk.Coins
	SpendableCoins(ctx sdk.Context, addr sdk.AccAddress) sdk.Coins
}

BankKeeper defines the expected bank keeper for module accounts

type CDP

type CDP struct {
	ID              uint64                                        `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
	Owner           github_com_cosmos_cosmos_sdk_types.AccAddress `protobuf:"bytes,2,opt,name=owner,proto3,casttype=github.com/cosmos/cosmos-sdk/types.AccAddress" json:"owner,omitempty"`
	Type            string                                        `protobuf:"bytes,3,opt,name=type,proto3" json:"type,omitempty"`
	Collateral      types.Coin                                    `protobuf:"bytes,4,opt,name=collateral,proto3" json:"collateral"`
	Principal       types.Coin                                    `protobuf:"bytes,5,opt,name=principal,proto3" json:"principal"`
	AccumulatedFees types.Coin                                    `protobuf:"bytes,6,opt,name=accumulated_fees,json=accumulatedFees,proto3" json:"accumulated_fees"`
	FeesUpdated     time.Time                                     `protobuf:"bytes,7,opt,name=fees_updated,json=feesUpdated,proto3,stdtime" json:"fees_updated"`
	InterestFactor  github_com_cosmos_cosmos_sdk_types.Dec        `` /* 143-byte string literal not displayed */
}

CDP defines the state of a single collateralized debt position.

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 added in v0.11.0

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 added in v0.16.0

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

func (CDP) GetNormalizedPrincipal added in v0.15.0

func (cdp CDP) GetNormalizedPrincipal() (sdk.Dec, error)

GetNormalizedPrincipal returns the total cdp principal divided by the interest factor.

Multiplying the normalized principal by the current global factor gives the current debt (ie including all interest, ie a synced cdp). The normalized principal is effectively how big the principal would have been if it had been borrowed at time 0 and not touched since.

An error is returned if the cdp interest factor is in an invalid state.

func (CDP) GetTotalPrincipal added in v0.11.0

func (cdp CDP) GetTotalPrincipal() sdk.Coin

GetTotalPrincipal returns the total principle for the cdp

func (*CDP) Marshal added in v0.16.0

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

func (*CDP) MarshalTo added in v0.16.0

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

func (*CDP) MarshalToSizedBuffer added in v0.16.0

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

func (*CDP) ProtoMessage added in v0.16.0

func (*CDP) ProtoMessage()

func (*CDP) Reset added in v0.16.0

func (m *CDP) Reset()

func (*CDP) Size added in v0.16.0

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

func (*CDP) String

func (m *CDP) String() string

func (*CDP) Unmarshal added in v0.16.0

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

func (CDP) Validate added in v0.8.0

func (cdp CDP) Validate() error

Validate performs a basic validation of the CDP fields.

func (*CDP) XXX_DiscardUnknown added in v0.16.0

func (m *CDP) XXX_DiscardUnknown()

func (*CDP) XXX_Marshal added in v0.16.0

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

func (*CDP) XXX_Merge added in v0.16.0

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

func (*CDP) XXX_Size added in v0.16.0

func (m *CDP) XXX_Size() int

func (*CDP) XXX_Unmarshal added in v0.16.0

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

type CDPHooks added in v0.13.0

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 CDPResponse added in v0.16.0

type CDPResponse struct {
	ID                     uint64      `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
	Owner                  string      `protobuf:"bytes,2,opt,name=owner,proto3" json:"owner,omitempty"`
	Type                   string      `protobuf:"bytes,3,opt,name=type,proto3" json:"type,omitempty"`
	Collateral             types1.Coin `protobuf:"bytes,4,opt,name=collateral,proto3" json:"collateral"`
	Principal              types1.Coin `protobuf:"bytes,5,opt,name=principal,proto3" json:"principal"`
	AccumulatedFees        types1.Coin `protobuf:"bytes,6,opt,name=accumulated_fees,json=accumulatedFees,proto3" json:"accumulated_fees"`
	FeesUpdated            time.Time   `protobuf:"bytes,7,opt,name=fees_updated,json=feesUpdated,proto3,stdtime" json:"fees_updated"`
	InterestFactor         string      `protobuf:"bytes,8,opt,name=interest_factor,json=interestFactor,proto3" json:"interest_factor,omitempty"`
	CollateralValue        types1.Coin `protobuf:"bytes,9,opt,name=collateral_value,json=collateralValue,proto3" json:"collateral_value"`
	CollateralizationRatio string      `` /* 128-byte string literal not displayed */
}

CDPResponse defines the state of a single collateralized debt position.

func NewCDPResponse added in v0.16.0

func NewCDPResponse(cdp CDP, collateralValue sdk.Coin, collateralizationRatio sdk.Dec) CDPResponse

NewCDPResponse creates a new CDPResponse object

func (*CDPResponse) Descriptor added in v0.16.0

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

func (*CDPResponse) GetAccumulatedFees added in v0.16.0

func (m *CDPResponse) GetAccumulatedFees() types1.Coin

func (*CDPResponse) GetCollateral added in v0.16.0

func (m *CDPResponse) GetCollateral() types1.Coin

func (*CDPResponse) GetCollateralValue added in v0.16.0

func (m *CDPResponse) GetCollateralValue() types1.Coin

func (*CDPResponse) GetCollateralizationRatio added in v0.16.0

func (m *CDPResponse) GetCollateralizationRatio() string

func (*CDPResponse) GetFeesUpdated added in v0.16.0

func (m *CDPResponse) GetFeesUpdated() time.Time

func (*CDPResponse) GetID added in v0.16.0

func (m *CDPResponse) GetID() uint64

func (*CDPResponse) GetInterestFactor added in v0.16.0

func (m *CDPResponse) GetInterestFactor() string

func (*CDPResponse) GetOwner added in v0.16.0

func (m *CDPResponse) GetOwner() string

func (*CDPResponse) GetPrincipal added in v0.16.0

func (m *CDPResponse) GetPrincipal() types1.Coin

func (*CDPResponse) GetType added in v0.16.0

func (m *CDPResponse) GetType() string

func (*CDPResponse) Marshal added in v0.16.0

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

func (*CDPResponse) MarshalTo added in v0.16.0

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

func (*CDPResponse) MarshalToSizedBuffer added in v0.16.0

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

func (*CDPResponse) ProtoMessage added in v0.16.0

func (*CDPResponse) ProtoMessage()

func (*CDPResponse) Reset added in v0.16.0

func (m *CDPResponse) Reset()

func (*CDPResponse) Size added in v0.16.0

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

func (*CDPResponse) String added in v0.16.0

func (m *CDPResponse) String() string

func (*CDPResponse) Unmarshal added in v0.16.0

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

func (*CDPResponse) XXX_DiscardUnknown added in v0.16.0

func (m *CDPResponse) XXX_DiscardUnknown()

func (*CDPResponse) XXX_Marshal added in v0.16.0

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

func (*CDPResponse) XXX_Merge added in v0.16.0

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

func (*CDPResponse) XXX_Size added in v0.16.0

func (m *CDPResponse) XXX_Size() int

func (*CDPResponse) XXX_Unmarshal added in v0.16.0

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

type CDPResponses added in v0.16.0

type CDPResponses []CDPResponse

CDPResponses a collection of CDPResponse objects

type CDPs

type CDPs []CDP

CDPs a collection of CDP objects

func (CDPs) Validate added in v0.8.0

func (cdps CDPs) Validate() error

Validate validates each CDP

type CollateralParam

type CollateralParam struct {
	Denom                            string                                 `protobuf:"bytes,1,opt,name=denom,proto3" json:"denom,omitempty"`
	Type                             string                                 `protobuf:"bytes,2,opt,name=type,proto3" json:"type,omitempty"`
	LiquidationRatio                 github_com_cosmos_cosmos_sdk_types.Dec `` /* 149-byte string literal not displayed */
	DebtLimit                        types.Coin                             `protobuf:"bytes,4,opt,name=debt_limit,json=debtLimit,proto3" json:"debt_limit"`
	StabilityFee                     github_com_cosmos_cosmos_sdk_types.Dec `` /* 137-byte string literal not displayed */
	AuctionSize                      github_com_cosmos_cosmos_sdk_types.Int `` /* 134-byte string literal not displayed */
	LiquidationPenalty               github_com_cosmos_cosmos_sdk_types.Dec `` /* 155-byte string literal not displayed */
	SpotMarketID                     string                                 `protobuf:"bytes,8,opt,name=spot_market_id,json=spotMarketId,proto3" json:"spot_market_id,omitempty"`
	LiquidationMarketID              string                                 `protobuf:"bytes,9,opt,name=liquidation_market_id,json=liquidationMarketId,proto3" json:"liquidation_market_id,omitempty"`
	KeeperRewardPercentage           github_com_cosmos_cosmos_sdk_types.Dec `` /* 170-byte string literal not displayed */
	CheckCollateralizationIndexCount github_com_cosmos_cosmos_sdk_types.Int `` /* 202-byte string literal not displayed */
	ConversionFactor                 github_com_cosmos_cosmos_sdk_types.Int `` /* 150-byte string literal not displayed */
}

CollateralParam defines governance parameters for each collateral type within the cdp module

func NewCollateralParam added in v0.11.0

func NewCollateralParam(
	denom, ctype string, liqRatio sdk.Dec, debtLimit sdk.Coin, stabilityFee sdk.Dec, auctionSize sdk.Int,
	liqPenalty sdk.Dec, spotMarketID, liquidationMarketID string, keeperReward sdk.Dec, checkIndexCount sdk.Int, conversionFactor sdk.Int) CollateralParam

NewCollateralParam returns a new CollateralParam

func (*CollateralParam) Descriptor added in v0.16.0

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

func (*CollateralParam) GetDebtLimit added in v0.16.0

func (m *CollateralParam) GetDebtLimit() types.Coin

func (*CollateralParam) GetDenom added in v0.16.0

func (m *CollateralParam) GetDenom() string

func (*CollateralParam) GetLiquidationMarketID added in v0.16.0

func (m *CollateralParam) GetLiquidationMarketID() string

func (*CollateralParam) GetSpotMarketID added in v0.16.0

func (m *CollateralParam) GetSpotMarketID() string

func (*CollateralParam) GetType added in v0.16.0

func (m *CollateralParam) GetType() string

func (*CollateralParam) Marshal added in v0.16.0

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

func (*CollateralParam) MarshalTo added in v0.16.0

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

func (*CollateralParam) MarshalToSizedBuffer added in v0.16.0

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

func (*CollateralParam) ProtoMessage added in v0.16.0

func (*CollateralParam) ProtoMessage()

func (*CollateralParam) Reset added in v0.16.0

func (m *CollateralParam) Reset()

func (*CollateralParam) Size added in v0.16.0

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

func (*CollateralParam) String

func (m *CollateralParam) String() string

func (*CollateralParam) Unmarshal added in v0.16.0

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

func (*CollateralParam) XXX_DiscardUnknown added in v0.16.0

func (m *CollateralParam) XXX_DiscardUnknown()

func (*CollateralParam) XXX_Marshal added in v0.16.0

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

func (*CollateralParam) XXX_Merge added in v0.16.0

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

func (*CollateralParam) XXX_Size added in v0.16.0

func (m *CollateralParam) XXX_Size() int

func (*CollateralParam) XXX_Unmarshal added in v0.16.0

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

type CollateralParams

type CollateralParams []CollateralParam

CollateralParams array of CollateralParam

type DebtParam

type DebtParam struct {
	Denom            string                                 `protobuf:"bytes,1,opt,name=denom,proto3" json:"denom,omitempty"`
	ReferenceAsset   string                                 `protobuf:"bytes,2,opt,name=reference_asset,json=referenceAsset,proto3" json:"reference_asset,omitempty"`
	ConversionFactor github_com_cosmos_cosmos_sdk_types.Int `` /* 149-byte string literal not displayed */
	DebtFloor        github_com_cosmos_cosmos_sdk_types.Int `` /* 128-byte string literal not displayed */
}

DebtParam defines governance params for debt assets

func NewDebtParam added in v0.11.0

func NewDebtParam(denom, refAsset string, conversionFactor, debtFloor sdk.Int) DebtParam

NewDebtParam returns a new DebtParam

func (*DebtParam) Descriptor added in v0.16.0

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

func (*DebtParam) GetDenom added in v0.16.0

func (m *DebtParam) GetDenom() string

func (*DebtParam) GetReferenceAsset added in v0.16.0

func (m *DebtParam) GetReferenceAsset() string

func (*DebtParam) Marshal added in v0.16.0

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

func (*DebtParam) MarshalTo added in v0.16.0

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

func (*DebtParam) MarshalToSizedBuffer added in v0.16.0

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

func (*DebtParam) ProtoMessage added in v0.16.0

func (*DebtParam) ProtoMessage()

func (*DebtParam) Reset added in v0.16.0

func (m *DebtParam) Reset()

func (*DebtParam) Size added in v0.16.0

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

func (*DebtParam) String

func (m *DebtParam) String() string

func (*DebtParam) Unmarshal added in v0.16.0

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

func (*DebtParam) XXX_DiscardUnknown added in v0.16.0

func (m *DebtParam) XXX_DiscardUnknown()

func (*DebtParam) XXX_Marshal added in v0.16.0

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

func (*DebtParam) XXX_Merge added in v0.16.0

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

func (*DebtParam) XXX_Size added in v0.16.0

func (m *DebtParam) XXX_Size() int

func (*DebtParam) XXX_Unmarshal added in v0.16.0

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

type DebtParams

type DebtParams []DebtParam

DebtParams array of DebtParam

type Deposit

type Deposit struct {
	CdpID     uint64                                        `protobuf:"varint,1,opt,name=cdp_id,json=cdpId,proto3" json:"cdp_id,omitempty"`
	Depositor github_com_cosmos_cosmos_sdk_types.AccAddress `` /* 126-byte string literal not displayed */
	Amount    types.Coin                                    `protobuf:"bytes,3,opt,name=amount,proto3" json:"amount"`
}

Deposit defines an amount of coins deposited by an account to a cdp

func NewDeposit

func NewDeposit(cdpID uint64, depositor sdk.AccAddress, amount sdk.Coin) Deposit

NewDeposit creates a new Deposit object

func (*Deposit) Descriptor added in v0.16.0

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

func (Deposit) Empty

func (d Deposit) Empty() bool

Empty returns whether a deposit is empty.

func (Deposit) Equals

func (d Deposit) Equals(comp Deposit) bool

Equals returns whether two deposits are equal.

func (*Deposit) Marshal added in v0.16.0

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

func (*Deposit) MarshalTo added in v0.16.0

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

func (*Deposit) MarshalToSizedBuffer added in v0.16.0

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

func (*Deposit) ProtoMessage added in v0.16.0

func (*Deposit) ProtoMessage()

func (*Deposit) Reset added in v0.16.0

func (m *Deposit) Reset()

func (*Deposit) Size added in v0.16.0

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

func (*Deposit) String

func (m *Deposit) String() string

func (*Deposit) Unmarshal added in v0.16.0

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

func (Deposit) Validate added in v0.8.0

func (d Deposit) Validate() error

Validate performs a basic validation of the deposit fields.

func (*Deposit) XXX_DiscardUnknown added in v0.16.0

func (m *Deposit) XXX_DiscardUnknown()

func (*Deposit) XXX_Marshal added in v0.16.0

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

func (*Deposit) XXX_Merge added in v0.16.0

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

func (*Deposit) XXX_Size added in v0.16.0

func (m *Deposit) XXX_Size() int

func (*Deposit) XXX_Unmarshal added in v0.16.0

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

type Deposits

type Deposits []Deposit

Deposits a collection of Deposit objects

func (Deposits) SumCollateral

func (ds Deposits) SumCollateral() (sum sdk.Int)

SumCollateral returns the total amount of collateral in the input deposits

func (Deposits) Validate added in v0.8.0

func (ds Deposits) Validate() error

Validate validates each deposit

type GenesisAccumulationTime added in v0.13.0

type GenesisAccumulationTime struct {
	CollateralType           string                                 `protobuf:"bytes,1,opt,name=collateral_type,json=collateralType,proto3" json:"collateral_type,omitempty"`
	PreviousAccumulationTime time.Time                              `` /* 133-byte string literal not displayed */
	InterestFactor           github_com_cosmos_cosmos_sdk_types.Dec `` /* 143-byte string literal not displayed */
}

GenesisAccumulationTime defines the previous distribution time and its corresponding denom

func NewGenesisAccumulationTime added in v0.13.0

func NewGenesisAccumulationTime(ctype string, prevTime time.Time, factor sdk.Dec) GenesisAccumulationTime

NewGenesisAccumulationTime returns a new GenesisAccumulationTime

func (*GenesisAccumulationTime) Descriptor added in v0.16.0

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

func (*GenesisAccumulationTime) GetCollateralType added in v0.16.0

func (m *GenesisAccumulationTime) GetCollateralType() string

func (*GenesisAccumulationTime) GetPreviousAccumulationTime added in v0.16.0

func (m *GenesisAccumulationTime) GetPreviousAccumulationTime() time.Time

func (*GenesisAccumulationTime) Marshal added in v0.16.0

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

func (*GenesisAccumulationTime) MarshalTo added in v0.16.0

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

func (*GenesisAccumulationTime) MarshalToSizedBuffer added in v0.16.0

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

func (*GenesisAccumulationTime) ProtoMessage added in v0.16.0

func (*GenesisAccumulationTime) ProtoMessage()

func (*GenesisAccumulationTime) Reset added in v0.16.0

func (m *GenesisAccumulationTime) Reset()

func (*GenesisAccumulationTime) Size added in v0.16.0

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

func (*GenesisAccumulationTime) String added in v0.16.0

func (m *GenesisAccumulationTime) String() string

func (*GenesisAccumulationTime) Unmarshal added in v0.16.0

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

func (GenesisAccumulationTime) Validate added in v0.13.0

func (gat GenesisAccumulationTime) Validate() error

Validate performs validation of GenesisAccumulationTime

func (*GenesisAccumulationTime) XXX_DiscardUnknown added in v0.16.0

func (m *GenesisAccumulationTime) XXX_DiscardUnknown()

func (*GenesisAccumulationTime) XXX_Marshal added in v0.16.0

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

func (*GenesisAccumulationTime) XXX_Merge added in v0.16.0

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

func (*GenesisAccumulationTime) XXX_Size added in v0.16.0

func (m *GenesisAccumulationTime) XXX_Size() int

func (*GenesisAccumulationTime) XXX_Unmarshal added in v0.16.0

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

type GenesisAccumulationTimes added in v0.13.0

type GenesisAccumulationTimes []GenesisAccumulationTime

GenesisAccumulationTimes slice of GenesisAccumulationTime

func (GenesisAccumulationTimes) Validate added in v0.13.0

func (gats GenesisAccumulationTimes) Validate() error

Validate performs validation of GenesisAccumulationTimes

type GenesisState

type GenesisState struct {
	// params defines all the paramaters of the module.
	Params                    Params                   `protobuf:"bytes,1,opt,name=params,proto3" json:"params"`
	CDPs                      CDPs                     `protobuf:"bytes,2,rep,name=cdps,proto3,castrepeated=CDPs" json:"cdps"`
	Deposits                  Deposits                 `protobuf:"bytes,3,rep,name=deposits,proto3,castrepeated=Deposits" json:"deposits"`
	StartingCdpID             uint64                   `protobuf:"varint,4,opt,name=starting_cdp_id,json=startingCdpId,proto3" json:"starting_cdp_id,omitempty"`
	DebtDenom                 string                   `protobuf:"bytes,5,opt,name=debt_denom,json=debtDenom,proto3" json:"debt_denom,omitempty"`
	GovDenom                  string                   `protobuf:"bytes,6,opt,name=gov_denom,json=govDenom,proto3" json:"gov_denom,omitempty"`
	PreviousAccumulationTimes GenesisAccumulationTimes `` /* 166-byte string literal not displayed */
	TotalPrincipals           GenesisTotalPrincipals   `` /* 132-byte string literal not displayed */
}

GenesisState defines the cdp module's genesis state.

func DefaultGenesisState

func DefaultGenesisState() GenesisState

DefaultGenesisState returns a default genesis state

func NewGenesisState added in v0.5.0

func NewGenesisState(params Params, cdps CDPs, deposits Deposits, startingCdpID uint64,
	debtDenom, govDenom string, prevAccumTimes GenesisAccumulationTimes,
	totalPrincipals GenesisTotalPrincipals) GenesisState

NewGenesisState returns a new genesis state

func (*GenesisState) Descriptor added in v0.16.0

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

func (*GenesisState) GetCDPs added in v0.16.0

func (m *GenesisState) GetCDPs() CDPs

func (*GenesisState) GetDebtDenom added in v0.16.0

func (m *GenesisState) GetDebtDenom() string

func (*GenesisState) GetDeposits added in v0.16.0

func (m *GenesisState) GetDeposits() Deposits

func (*GenesisState) GetGovDenom added in v0.16.0

func (m *GenesisState) GetGovDenom() string

func (*GenesisState) GetParams added in v0.16.0

func (m *GenesisState) GetParams() Params

func (*GenesisState) GetPreviousAccumulationTimes added in v0.16.0

func (m *GenesisState) GetPreviousAccumulationTimes() GenesisAccumulationTimes

func (*GenesisState) GetStartingCdpID added in v0.16.0

func (m *GenesisState) GetStartingCdpID() uint64

func (*GenesisState) GetTotalPrincipals added in v0.16.0

func (m *GenesisState) GetTotalPrincipals() GenesisTotalPrincipals

func (*GenesisState) Marshal added in v0.16.0

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

func (*GenesisState) MarshalTo added in v0.16.0

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

func (*GenesisState) MarshalToSizedBuffer added in v0.16.0

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

func (*GenesisState) ProtoMessage added in v0.16.0

func (*GenesisState) ProtoMessage()

func (*GenesisState) Reset added in v0.16.0

func (m *GenesisState) Reset()

func (*GenesisState) Size added in v0.16.0

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

func (*GenesisState) String added in v0.16.0

func (m *GenesisState) String() string

func (*GenesisState) Unmarshal added in v0.16.0

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

func (GenesisState) Validate

func (gs GenesisState) Validate() error

Validate performs basic validation of genesis data returning an error for any failed validation criteria.

func (*GenesisState) XXX_DiscardUnknown added in v0.16.0

func (m *GenesisState) XXX_DiscardUnknown()

func (*GenesisState) XXX_Marshal added in v0.16.0

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

func (*GenesisState) XXX_Merge added in v0.16.0

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

func (*GenesisState) XXX_Size added in v0.16.0

func (m *GenesisState) XXX_Size() int

func (*GenesisState) XXX_Unmarshal added in v0.16.0

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

type GenesisTotalPrincipal added in v0.13.0

type GenesisTotalPrincipal struct {
	CollateralType string                                 `protobuf:"bytes,1,opt,name=collateral_type,json=collateralType,proto3" json:"collateral_type,omitempty"`
	TotalPrincipal github_com_cosmos_cosmos_sdk_types.Int `` /* 143-byte string literal not displayed */
}

GenesisTotalPrincipal defines the total principal and its corresponding collateral type

func NewGenesisTotalPrincipal added in v0.13.0

func NewGenesisTotalPrincipal(ctype string, principal sdk.Int) GenesisTotalPrincipal

NewGenesisTotalPrincipal returns a new GenesisTotalPrincipal

func (*GenesisTotalPrincipal) Descriptor added in v0.16.0

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

func (*GenesisTotalPrincipal) GetCollateralType added in v0.16.0

func (m *GenesisTotalPrincipal) GetCollateralType() string

func (*GenesisTotalPrincipal) Marshal added in v0.16.0

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

func (*GenesisTotalPrincipal) MarshalTo added in v0.16.0

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

func (*GenesisTotalPrincipal) MarshalToSizedBuffer added in v0.16.0

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

func (*GenesisTotalPrincipal) ProtoMessage added in v0.16.0

func (*GenesisTotalPrincipal) ProtoMessage()

func (*GenesisTotalPrincipal) Reset added in v0.16.0

func (m *GenesisTotalPrincipal) Reset()

func (*GenesisTotalPrincipal) Size added in v0.16.0

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

func (*GenesisTotalPrincipal) String added in v0.16.0

func (m *GenesisTotalPrincipal) String() string

func (*GenesisTotalPrincipal) Unmarshal added in v0.16.0

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

func (GenesisTotalPrincipal) Validate added in v0.13.0

func (gtp GenesisTotalPrincipal) Validate() error

Validate performs validation of GenesisTotalPrincipal

func (*GenesisTotalPrincipal) XXX_DiscardUnknown added in v0.16.0

func (m *GenesisTotalPrincipal) XXX_DiscardUnknown()

func (*GenesisTotalPrincipal) XXX_Marshal added in v0.16.0

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

func (*GenesisTotalPrincipal) XXX_Merge added in v0.16.0

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

func (*GenesisTotalPrincipal) XXX_Size added in v0.16.0

func (m *GenesisTotalPrincipal) XXX_Size() int

func (*GenesisTotalPrincipal) XXX_Unmarshal added in v0.16.0

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

type GenesisTotalPrincipals added in v0.13.0

type GenesisTotalPrincipals []GenesisTotalPrincipal

GenesisTotalPrincipals slice of GenesisTotalPrincipal

func (GenesisTotalPrincipals) Validate added in v0.13.0

func (gtps GenesisTotalPrincipals) Validate() error

Validate performs validation of GenesisTotalPrincipals

type MsgClient added in v0.16.0

type MsgClient interface {
	// CreateCDP defines a method to create a new CDP.
	CreateCDP(ctx context.Context, in *MsgCreateCDP, opts ...grpc.CallOption) (*MsgCreateCDPResponse, error)
	// Deposit defines a method to deposit to a CDP.
	Deposit(ctx context.Context, in *MsgDeposit, opts ...grpc.CallOption) (*MsgDepositResponse, error)
	// Withdraw defines a method to withdraw collateral from a CDP.
	Withdraw(ctx context.Context, in *MsgWithdraw, opts ...grpc.CallOption) (*MsgWithdrawResponse, error)
	// DrawDebt defines a method to draw debt from a CDP.
	DrawDebt(ctx context.Context, in *MsgDrawDebt, opts ...grpc.CallOption) (*MsgDrawDebtResponse, error)
	// RepayDebt defines a method to repay debt from a CDP.
	RepayDebt(ctx context.Context, in *MsgRepayDebt, opts ...grpc.CallOption) (*MsgRepayDebtResponse, error)
	// Liquidate defines a method to attempt to liquidate a CDP whos
	// collateralization ratio is under its liquidation ratio.
	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 added in v0.16.0

func NewMsgClient(cc grpc1.ClientConn) MsgClient

type MsgCreateCDP

type MsgCreateCDP struct {
	Sender         string     `protobuf:"bytes,1,opt,name=sender,proto3" json:"sender,omitempty"`
	Collateral     types.Coin `protobuf:"bytes,2,opt,name=collateral,proto3" json:"collateral"`
	Principal      types.Coin `protobuf:"bytes,3,opt,name=principal,proto3" json:"principal"`
	CollateralType string     `protobuf:"bytes,4,opt,name=collateral_type,json=collateralType,proto3" json:"collateral_type,omitempty"`
}

MsgCreateCDP defines a message to create a new CDP.

func NewMsgCreateCDP

func NewMsgCreateCDP(sender sdk.AccAddress, collateral sdk.Coin, principal sdk.Coin, collateralType string) MsgCreateCDP

NewMsgCreateCDP returns a new MsgPlaceBid.

func (*MsgCreateCDP) Descriptor added in v0.16.0

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

func (*MsgCreateCDP) GetCollateral added in v0.16.0

func (m *MsgCreateCDP) GetCollateral() types.Coin

func (*MsgCreateCDP) GetCollateralType added in v0.16.0

func (m *MsgCreateCDP) GetCollateralType() string

func (*MsgCreateCDP) GetPrincipal added in v0.16.0

func (m *MsgCreateCDP) GetPrincipal() types.Coin

func (*MsgCreateCDP) GetSender added in v0.16.0

func (m *MsgCreateCDP) GetSender() string

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 added in v0.16.0

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

func (*MsgCreateCDP) MarshalTo added in v0.16.0

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

func (*MsgCreateCDP) MarshalToSizedBuffer added in v0.16.0

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

func (*MsgCreateCDP) ProtoMessage added in v0.16.0

func (*MsgCreateCDP) ProtoMessage()

func (*MsgCreateCDP) Reset added in v0.16.0

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 added in v0.16.0

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 added in v0.16.0

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 added in v0.16.0

func (m *MsgCreateCDP) XXX_DiscardUnknown()

func (*MsgCreateCDP) XXX_Marshal added in v0.16.0

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

func (*MsgCreateCDP) XXX_Merge added in v0.16.0

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

func (*MsgCreateCDP) XXX_Size added in v0.16.0

func (m *MsgCreateCDP) XXX_Size() int

func (*MsgCreateCDP) XXX_Unmarshal added in v0.16.0

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

type MsgCreateCDPResponse added in v0.16.0

type MsgCreateCDPResponse struct {
	CdpID uint64 `protobuf:"varint,1,opt,name=cdp_id,json=cdpId,proto3" json:"cdp_id,omitempty"`
}

MsgCreateCDPResponse defines the Msg/CreateCDP response type.

func (*MsgCreateCDPResponse) Descriptor added in v0.16.0

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

func (*MsgCreateCDPResponse) GetCdpID added in v0.16.0

func (m *MsgCreateCDPResponse) GetCdpID() uint64

func (*MsgCreateCDPResponse) Marshal added in v0.16.0

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

func (*MsgCreateCDPResponse) MarshalTo added in v0.16.0

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

func (*MsgCreateCDPResponse) MarshalToSizedBuffer added in v0.16.0

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

func (*MsgCreateCDPResponse) ProtoMessage added in v0.16.0

func (*MsgCreateCDPResponse) ProtoMessage()

func (*MsgCreateCDPResponse) Reset added in v0.16.0

func (m *MsgCreateCDPResponse) Reset()

func (*MsgCreateCDPResponse) Size added in v0.16.0

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

func (*MsgCreateCDPResponse) String added in v0.16.0

func (m *MsgCreateCDPResponse) String() string

func (*MsgCreateCDPResponse) Unmarshal added in v0.16.0

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

func (*MsgCreateCDPResponse) XXX_DiscardUnknown added in v0.16.0

func (m *MsgCreateCDPResponse) XXX_DiscardUnknown()

func (*MsgCreateCDPResponse) XXX_Marshal added in v0.16.0

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

func (*MsgCreateCDPResponse) XXX_Merge added in v0.16.0

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

func (*MsgCreateCDPResponse) XXX_Size added in v0.16.0

func (m *MsgCreateCDPResponse) XXX_Size() int

func (*MsgCreateCDPResponse) XXX_Unmarshal added in v0.16.0

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

type MsgDeposit

type MsgDeposit struct {
	Depositor      string     `protobuf:"bytes,1,opt,name=depositor,proto3" json:"depositor,omitempty"`
	Owner          string     `protobuf:"bytes,2,opt,name=owner,proto3" json:"owner,omitempty"`
	Collateral     types.Coin `protobuf:"bytes,3,opt,name=collateral,proto3" json:"collateral"`
	CollateralType string     `protobuf:"bytes,4,opt,name=collateral_type,json=collateralType,proto3" json:"collateral_type,omitempty"`
}

MsgDeposit defines a message to deposit to a CDP.

func NewMsgDeposit

func NewMsgDeposit(owner sdk.AccAddress, depositor sdk.AccAddress, collateral sdk.Coin, collateralType string) MsgDeposit

NewMsgDeposit returns a new MsgDeposit

func (*MsgDeposit) Descriptor added in v0.16.0

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

func (*MsgDeposit) GetCollateral added in v0.16.0

func (m *MsgDeposit) GetCollateral() types.Coin

func (*MsgDeposit) GetCollateralType added in v0.16.0

func (m *MsgDeposit) GetCollateralType() string

func (*MsgDeposit) GetDepositor added in v0.16.0

func (m *MsgDeposit) GetDepositor() string

func (*MsgDeposit) GetOwner added in v0.16.0

func (m *MsgDeposit) GetOwner() 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 added in v0.16.0

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

func (*MsgDeposit) MarshalTo added in v0.16.0

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

func (*MsgDeposit) MarshalToSizedBuffer added in v0.16.0

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

func (*MsgDeposit) ProtoMessage added in v0.16.0

func (*MsgDeposit) ProtoMessage()

func (*MsgDeposit) Reset added in v0.16.0

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 added in v0.16.0

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 added in v0.16.0

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 added in v0.16.0

func (m *MsgDeposit) XXX_DiscardUnknown()

func (*MsgDeposit) XXX_Marshal added in v0.16.0

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

func (*MsgDeposit) XXX_Merge added in v0.16.0

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

func (*MsgDeposit) XXX_Size added in v0.16.0

func (m *MsgDeposit) XXX_Size() int

func (*MsgDeposit) XXX_Unmarshal added in v0.16.0

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

type MsgDepositResponse added in v0.16.0

type MsgDepositResponse struct {
}

MsgDepositResponse defines the Msg/Deposit response type.

func (*MsgDepositResponse) Descriptor added in v0.16.0

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

func (*MsgDepositResponse) Marshal added in v0.16.0

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

func (*MsgDepositResponse) MarshalTo added in v0.16.0

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

func (*MsgDepositResponse) MarshalToSizedBuffer added in v0.16.0

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

func (*MsgDepositResponse) ProtoMessage added in v0.16.0

func (*MsgDepositResponse) ProtoMessage()

func (*MsgDepositResponse) Reset added in v0.16.0

func (m *MsgDepositResponse) Reset()

func (*MsgDepositResponse) Size added in v0.16.0

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

func (*MsgDepositResponse) String added in v0.16.0

func (m *MsgDepositResponse) String() string

func (*MsgDepositResponse) Unmarshal added in v0.16.0

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

func (*MsgDepositResponse) XXX_DiscardUnknown added in v0.16.0

func (m *MsgDepositResponse) XXX_DiscardUnknown()

func (*MsgDepositResponse) XXX_Marshal added in v0.16.0

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

func (*MsgDepositResponse) XXX_Merge added in v0.16.0

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

func (*MsgDepositResponse) XXX_Size added in v0.16.0

func (m *MsgDepositResponse) XXX_Size() int

func (*MsgDepositResponse) XXX_Unmarshal added in v0.16.0

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

type MsgDrawDebt

type MsgDrawDebt struct {
	Sender         string     `protobuf:"bytes,1,opt,name=sender,proto3" json:"sender,omitempty"`
	CollateralType string     `protobuf:"bytes,2,opt,name=collateral_type,json=collateralType,proto3" json:"collateral_type,omitempty"`
	Principal      types.Coin `protobuf:"bytes,3,opt,name=principal,proto3" json:"principal"`
}

MsgDrawDebt defines a message to draw debt from a CDP.

func NewMsgDrawDebt

func NewMsgDrawDebt(sender sdk.AccAddress, collateralType string, principal sdk.Coin) MsgDrawDebt

NewMsgDrawDebt returns a new MsgDrawDebt

func (*MsgDrawDebt) Descriptor added in v0.16.0

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

func (*MsgDrawDebt) GetCollateralType added in v0.16.0

func (m *MsgDrawDebt) GetCollateralType() string

func (*MsgDrawDebt) GetPrincipal added in v0.16.0

func (m *MsgDrawDebt) GetPrincipal() types.Coin

func (*MsgDrawDebt) GetSender added in v0.16.0

func (m *MsgDrawDebt) GetSender() string

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 added in v0.16.0

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

func (*MsgDrawDebt) MarshalTo added in v0.16.0

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

func (*MsgDrawDebt) MarshalToSizedBuffer added in v0.16.0

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

func (*MsgDrawDebt) ProtoMessage added in v0.16.0

func (*MsgDrawDebt) ProtoMessage()

func (*MsgDrawDebt) Reset added in v0.16.0

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 added in v0.16.0

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 added in v0.16.0

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 added in v0.16.0

func (m *MsgDrawDebt) XXX_DiscardUnknown()

func (*MsgDrawDebt) XXX_Marshal added in v0.16.0

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

func (*MsgDrawDebt) XXX_Merge added in v0.16.0

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

func (*MsgDrawDebt) XXX_Size added in v0.16.0

func (m *MsgDrawDebt) XXX_Size() int

func (*MsgDrawDebt) XXX_Unmarshal added in v0.16.0

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

type MsgDrawDebtResponse added in v0.16.0

type MsgDrawDebtResponse struct {
}

MsgDrawDebtResponse defines the Msg/DrawDebt response type.

func (*MsgDrawDebtResponse) Descriptor added in v0.16.0

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

func (*MsgDrawDebtResponse) Marshal added in v0.16.0

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

func (*MsgDrawDebtResponse) MarshalTo added in v0.16.0

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

func (*MsgDrawDebtResponse) MarshalToSizedBuffer added in v0.16.0

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

func (*MsgDrawDebtResponse) ProtoMessage added in v0.16.0

func (*MsgDrawDebtResponse) ProtoMessage()

func (*MsgDrawDebtResponse) Reset added in v0.16.0

func (m *MsgDrawDebtResponse) Reset()

func (*MsgDrawDebtResponse) Size added in v0.16.0

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

func (*MsgDrawDebtResponse) String added in v0.16.0

func (m *MsgDrawDebtResponse) String() string

func (*MsgDrawDebtResponse) Unmarshal added in v0.16.0

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

func (*MsgDrawDebtResponse) XXX_DiscardUnknown added in v0.16.0

func (m *MsgDrawDebtResponse) XXX_DiscardUnknown()

func (*MsgDrawDebtResponse) XXX_Marshal added in v0.16.0

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

func (*MsgDrawDebtResponse) XXX_Merge added in v0.16.0

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

func (*MsgDrawDebtResponse) XXX_Size added in v0.16.0

func (m *MsgDrawDebtResponse) XXX_Size() int

func (*MsgDrawDebtResponse) XXX_Unmarshal added in v0.16.0

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

type MsgLiquidate added in v0.13.0

type MsgLiquidate struct {
	Keeper         string `protobuf:"bytes,1,opt,name=keeper,proto3" json:"keeper,omitempty"`
	Borrower       string `protobuf:"bytes,2,opt,name=borrower,proto3" json:"borrower,omitempty"`
	CollateralType string `protobuf:"bytes,3,opt,name=collateral_type,json=collateralType,proto3" json:"collateral_type,omitempty"`
}

MsgLiquidate defines a message to attempt to liquidate a CDP whos collateralization ratio is under its liquidation ratio.

func NewMsgLiquidate added in v0.13.0

func NewMsgLiquidate(keeper, borrower sdk.AccAddress, ctype string) MsgLiquidate

NewMsgLiquidate returns a new MsgLiquidate

func (*MsgLiquidate) Descriptor added in v0.16.0

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

func (*MsgLiquidate) GetBorrower added in v0.16.0

func (m *MsgLiquidate) GetBorrower() string

func (*MsgLiquidate) GetCollateralType added in v0.16.0

func (m *MsgLiquidate) GetCollateralType() string

func (*MsgLiquidate) GetKeeper added in v0.16.0

func (m *MsgLiquidate) GetKeeper() string

func (MsgLiquidate) GetSignBytes added in v0.13.0

func (msg MsgLiquidate) GetSignBytes() []byte

GetSignBytes gets the canonical byte representation of the Msg.

func (MsgLiquidate) GetSigners added in v0.13.0

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

GetSigners returns the addresses of signers that must sign.

func (*MsgLiquidate) Marshal added in v0.16.0

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

func (*MsgLiquidate) MarshalTo added in v0.16.0

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

func (*MsgLiquidate) MarshalToSizedBuffer added in v0.16.0

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

func (*MsgLiquidate) ProtoMessage added in v0.16.0

func (*MsgLiquidate) ProtoMessage()

func (*MsgLiquidate) Reset added in v0.16.0

func (m *MsgLiquidate) Reset()

func (MsgLiquidate) Route added in v0.13.0

func (msg MsgLiquidate) Route() string

Route return the message type used for routing the message.

func (*MsgLiquidate) Size added in v0.16.0

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

func (*MsgLiquidate) String added in v0.13.0

func (m *MsgLiquidate) String() string

func (MsgLiquidate) Type added in v0.13.0

func (msg MsgLiquidate) Type() string

Type returns a human-readable string for the message, intended for utilization within tags.

func (*MsgLiquidate) Unmarshal added in v0.16.0

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

func (MsgLiquidate) ValidateBasic added in v0.13.0

func (msg MsgLiquidate) ValidateBasic() error

ValidateBasic does a simple validation check that doesn't require access to any other information.

func (*MsgLiquidate) XXX_DiscardUnknown added in v0.16.0

func (m *MsgLiquidate) XXX_DiscardUnknown()

func (*MsgLiquidate) XXX_Marshal added in v0.16.0

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

func (*MsgLiquidate) XXX_Merge added in v0.16.0

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

func (*MsgLiquidate) XXX_Size added in v0.16.0

func (m *MsgLiquidate) XXX_Size() int

func (*MsgLiquidate) XXX_Unmarshal added in v0.16.0

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

type MsgLiquidateResponse added in v0.16.0

type MsgLiquidateResponse struct {
}

MsgLiquidateResponse defines the Msg/Liquidate response type.

func (*MsgLiquidateResponse) Descriptor added in v0.16.0

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

func (*MsgLiquidateResponse) Marshal added in v0.16.0

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

func (*MsgLiquidateResponse) MarshalTo added in v0.16.0

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

func (*MsgLiquidateResponse) MarshalToSizedBuffer added in v0.16.0

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

func (*MsgLiquidateResponse) ProtoMessage added in v0.16.0

func (*MsgLiquidateResponse) ProtoMessage()

func (*MsgLiquidateResponse) Reset added in v0.16.0

func (m *MsgLiquidateResponse) Reset()

func (*MsgLiquidateResponse) Size added in v0.16.0

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

func (*MsgLiquidateResponse) String added in v0.16.0

func (m *MsgLiquidateResponse) String() string

func (*MsgLiquidateResponse) Unmarshal added in v0.16.0

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

func (*MsgLiquidateResponse) XXX_DiscardUnknown added in v0.16.0

func (m *MsgLiquidateResponse) XXX_DiscardUnknown()

func (*MsgLiquidateResponse) XXX_Marshal added in v0.16.0

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

func (*MsgLiquidateResponse) XXX_Merge added in v0.16.0

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

func (*MsgLiquidateResponse) XXX_Size added in v0.16.0

func (m *MsgLiquidateResponse) XXX_Size() int

func (*MsgLiquidateResponse) XXX_Unmarshal added in v0.16.0

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

type MsgRepayDebt

type MsgRepayDebt struct {
	Sender         string     `protobuf:"bytes,1,opt,name=sender,proto3" json:"sender,omitempty"`
	CollateralType string     `protobuf:"bytes,2,opt,name=collateral_type,json=collateralType,proto3" json:"collateral_type,omitempty"`
	Payment        types.Coin `protobuf:"bytes,3,opt,name=payment,proto3" json:"payment"`
}

MsgRepayDebt defines a message to repay debt from a CDP.

func NewMsgRepayDebt

func NewMsgRepayDebt(sender sdk.AccAddress, collateralType string, payment sdk.Coin) MsgRepayDebt

NewMsgRepayDebt returns a new MsgRepayDebt

func (*MsgRepayDebt) Descriptor added in v0.16.0

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

func (*MsgRepayDebt) GetCollateralType added in v0.16.0

func (m *MsgRepayDebt) GetCollateralType() string

func (*MsgRepayDebt) GetPayment added in v0.16.0

func (m *MsgRepayDebt) GetPayment() types.Coin

func (*MsgRepayDebt) GetSender added in v0.16.0

func (m *MsgRepayDebt) GetSender() string

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 added in v0.16.0

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

func (*MsgRepayDebt) MarshalTo added in v0.16.0

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

func (*MsgRepayDebt) MarshalToSizedBuffer added in v0.16.0

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

func (*MsgRepayDebt) ProtoMessage added in v0.16.0

func (*MsgRepayDebt) ProtoMessage()

func (*MsgRepayDebt) Reset added in v0.16.0

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 added in v0.16.0

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 added in v0.16.0

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 added in v0.16.0

func (m *MsgRepayDebt) XXX_DiscardUnknown()

func (*MsgRepayDebt) XXX_Marshal added in v0.16.0

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

func (*MsgRepayDebt) XXX_Merge added in v0.16.0

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

func (*MsgRepayDebt) XXX_Size added in v0.16.0

func (m *MsgRepayDebt) XXX_Size() int

func (*MsgRepayDebt) XXX_Unmarshal added in v0.16.0

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

type MsgRepayDebtResponse added in v0.16.0

type MsgRepayDebtResponse struct {
}

MsgRepayDebtResponse defines the Msg/RepayDebt response type.

func (*MsgRepayDebtResponse) Descriptor added in v0.16.0

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

func (*MsgRepayDebtResponse) Marshal added in v0.16.0

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

func (*MsgRepayDebtResponse) MarshalTo added in v0.16.0

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

func (*MsgRepayDebtResponse) MarshalToSizedBuffer added in v0.16.0

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

func (*MsgRepayDebtResponse) ProtoMessage added in v0.16.0

func (*MsgRepayDebtResponse) ProtoMessage()

func (*MsgRepayDebtResponse) Reset added in v0.16.0

func (m *MsgRepayDebtResponse) Reset()

func (*MsgRepayDebtResponse) Size added in v0.16.0

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

func (*MsgRepayDebtResponse) String added in v0.16.0

func (m *MsgRepayDebtResponse) String() string

func (*MsgRepayDebtResponse) Unmarshal added in v0.16.0

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

func (*MsgRepayDebtResponse) XXX_DiscardUnknown added in v0.16.0

func (m *MsgRepayDebtResponse) XXX_DiscardUnknown()

func (*MsgRepayDebtResponse) XXX_Marshal added in v0.16.0

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

func (*MsgRepayDebtResponse) XXX_Merge added in v0.16.0

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

func (*MsgRepayDebtResponse) XXX_Size added in v0.16.0

func (m *MsgRepayDebtResponse) XXX_Size() int

func (*MsgRepayDebtResponse) XXX_Unmarshal added in v0.16.0

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

type MsgServer added in v0.16.0

type MsgServer interface {
	// CreateCDP defines a method to create a new CDP.
	CreateCDP(context.Context, *MsgCreateCDP) (*MsgCreateCDPResponse, error)
	// Deposit defines a method to deposit to a CDP.
	Deposit(context.Context, *MsgDeposit) (*MsgDepositResponse, error)
	// Withdraw defines a method to withdraw collateral from a CDP.
	Withdraw(context.Context, *MsgWithdraw) (*MsgWithdrawResponse, error)
	// DrawDebt defines a method to draw debt from a CDP.
	DrawDebt(context.Context, *MsgDrawDebt) (*MsgDrawDebtResponse, error)
	// RepayDebt defines a method to repay debt from a CDP.
	RepayDebt(context.Context, *MsgRepayDebt) (*MsgRepayDebtResponse, error)
	// Liquidate defines a method to attempt to liquidate a CDP whos
	// collateralization ratio is under its liquidation ratio.
	Liquidate(context.Context, *MsgLiquidate) (*MsgLiquidateResponse, error)
}

MsgServer is the server API for Msg service.

type MsgWithdraw

type MsgWithdraw struct {
	Depositor      string     `protobuf:"bytes,1,opt,name=depositor,proto3" json:"depositor,omitempty"`
	Owner          string     `protobuf:"bytes,2,opt,name=owner,proto3" json:"owner,omitempty"`
	Collateral     types.Coin `protobuf:"bytes,3,opt,name=collateral,proto3" json:"collateral"`
	CollateralType string     `protobuf:"bytes,4,opt,name=collateral_type,json=collateralType,proto3" json:"collateral_type,omitempty"`
}

MsgWithdraw defines a message to withdraw collateral from a CDP.

func NewMsgWithdraw

func NewMsgWithdraw(owner sdk.AccAddress, depositor sdk.AccAddress, collateral sdk.Coin, collateralType string) MsgWithdraw

NewMsgWithdraw returns a new MsgDeposit

func (*MsgWithdraw) Descriptor added in v0.16.0

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

func (*MsgWithdraw) GetCollateral added in v0.16.0

func (m *MsgWithdraw) GetCollateral() types.Coin

func (*MsgWithdraw) GetCollateralType added in v0.16.0

func (m *MsgWithdraw) GetCollateralType() string

func (*MsgWithdraw) GetDepositor added in v0.16.0

func (m *MsgWithdraw) GetDepositor() string

func (*MsgWithdraw) GetOwner added in v0.16.0

func (m *MsgWithdraw) GetOwner() 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 added in v0.16.0

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

func (*MsgWithdraw) MarshalTo added in v0.16.0

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

func (*MsgWithdraw) MarshalToSizedBuffer added in v0.16.0

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

func (*MsgWithdraw) ProtoMessage added in v0.16.0

func (*MsgWithdraw) ProtoMessage()

func (*MsgWithdraw) Reset added in v0.16.0

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 added in v0.16.0

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 added in v0.16.0

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 added in v0.16.0

func (m *MsgWithdraw) XXX_DiscardUnknown()

func (*MsgWithdraw) XXX_Marshal added in v0.16.0

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

func (*MsgWithdraw) XXX_Merge added in v0.16.0

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

func (*MsgWithdraw) XXX_Size added in v0.16.0

func (m *MsgWithdraw) XXX_Size() int

func (*MsgWithdraw) XXX_Unmarshal added in v0.16.0

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

type MsgWithdrawResponse added in v0.16.0

type MsgWithdrawResponse struct {
}

MsgWithdrawResponse defines the Msg/Withdraw response type.

func (*MsgWithdrawResponse) Descriptor added in v0.16.0

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

func (*MsgWithdrawResponse) Marshal added in v0.16.0

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

func (*MsgWithdrawResponse) MarshalTo added in v0.16.0

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

func (*MsgWithdrawResponse) MarshalToSizedBuffer added in v0.16.0

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

func (*MsgWithdrawResponse) ProtoMessage added in v0.16.0

func (*MsgWithdrawResponse) ProtoMessage()

func (*MsgWithdrawResponse) Reset added in v0.16.0

func (m *MsgWithdrawResponse) Reset()

func (*MsgWithdrawResponse) Size added in v0.16.0

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

func (*MsgWithdrawResponse) String added in v0.16.0

func (m *MsgWithdrawResponse) String() string

func (*MsgWithdrawResponse) Unmarshal added in v0.16.0

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

func (*MsgWithdrawResponse) XXX_DiscardUnknown added in v0.16.0

func (m *MsgWithdrawResponse) XXX_DiscardUnknown()

func (*MsgWithdrawResponse) XXX_Marshal added in v0.16.0

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

func (*MsgWithdrawResponse) XXX_Merge added in v0.16.0

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

func (*MsgWithdrawResponse) XXX_Size added in v0.16.0

func (m *MsgWithdrawResponse) XXX_Size() int

func (*MsgWithdrawResponse) XXX_Unmarshal added in v0.16.0

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

type MultiCDPHooks added in v0.13.0

type MultiCDPHooks []CDPHooks

MultiCDPHooks combine multiple cdp hooks, all hook functions are run in array sequence

func NewMultiCDPHooks added in v0.13.0

func NewMultiCDPHooks(hooks ...CDPHooks) MultiCDPHooks

NewMultiCDPHooks returns a new MultiCDPHooks

func (MultiCDPHooks) AfterCDPCreated added in v0.13.0

func (h MultiCDPHooks) AfterCDPCreated(ctx sdk.Context, cdp CDP)

AfterCDPCreated runs before a cdp is created

func (MultiCDPHooks) BeforeCDPModified added in v0.13.0

func (h MultiCDPHooks) BeforeCDPModified(ctx sdk.Context, cdp CDP)

BeforeCDPModified runs before a cdp is modified

type OwnerCDPIndex added in v0.16.0

type OwnerCDPIndex struct {
	CdpIDs []uint64 `protobuf:"varint,1,rep,packed,name=cdp_ids,json=cdpIds,proto3" json:"cdp_ids,omitempty"`
}

OwnerCDPIndex defines the cdp ids for a single cdp owner

func (*OwnerCDPIndex) Descriptor added in v0.16.0

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

func (*OwnerCDPIndex) Marshal added in v0.16.0

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

func (*OwnerCDPIndex) MarshalTo added in v0.16.0

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

func (*OwnerCDPIndex) MarshalToSizedBuffer added in v0.16.0

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

func (*OwnerCDPIndex) ProtoMessage added in v0.16.0

func (*OwnerCDPIndex) ProtoMessage()

func (*OwnerCDPIndex) Reset added in v0.16.0

func (m *OwnerCDPIndex) Reset()

func (*OwnerCDPIndex) Size added in v0.16.0

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

func (*OwnerCDPIndex) String added in v0.16.0

func (m *OwnerCDPIndex) String() string

func (*OwnerCDPIndex) Unmarshal added in v0.16.0

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

func (*OwnerCDPIndex) XXX_DiscardUnknown added in v0.16.0

func (m *OwnerCDPIndex) XXX_DiscardUnknown()

func (*OwnerCDPIndex) XXX_Marshal added in v0.16.0

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

func (*OwnerCDPIndex) XXX_Merge added in v0.16.0

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

func (*OwnerCDPIndex) XXX_Size added in v0.16.0

func (m *OwnerCDPIndex) XXX_Size() int

func (*OwnerCDPIndex) XXX_Unmarshal added in v0.16.0

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

type Params

type Params struct {
	CollateralParams        CollateralParams                       `` /* 129-byte string literal not displayed */
	DebtParam               DebtParam                              `protobuf:"bytes,2,opt,name=debt_param,json=debtParam,proto3" json:"debt_param"`
	GlobalDebtLimit         types.Coin                             `protobuf:"bytes,3,opt,name=global_debt_limit,json=globalDebtLimit,proto3" json:"global_debt_limit"`
	SurplusAuctionThreshold github_com_cosmos_cosmos_sdk_types.Int `` /* 172-byte string literal not displayed */
	SurplusAuctionLot       github_com_cosmos_cosmos_sdk_types.Int `` /* 154-byte string literal not displayed */
	DebtAuctionThreshold    github_com_cosmos_cosmos_sdk_types.Int `` /* 163-byte string literal not displayed */
	DebtAuctionLot          github_com_cosmos_cosmos_sdk_types.Int `` /* 145-byte string literal not displayed */
	CircuitBreaker          bool                                   `protobuf:"varint,8,opt,name=circuit_breaker,json=circuitBreaker,proto3" json:"circuit_breaker,omitempty"`
}

Params defines the parameters for the cdp module.

func DefaultParams

func DefaultParams() Params

DefaultParams returns default params for cdp module

func NewParams

func NewParams(
	debtLimit sdk.Coin, collateralParams CollateralParams, debtParam DebtParam, surplusThreshold,
	surplusLot, debtThreshold, debtLot sdk.Int, breaker bool,
) Params

NewParams returns a new params object

func (*Params) Descriptor added in v0.16.0

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

func (*Params) GetCircuitBreaker added in v0.16.0

func (m *Params) GetCircuitBreaker() bool

func (*Params) GetCollateralParams added in v0.16.0

func (m *Params) GetCollateralParams() CollateralParams

func (*Params) GetDebtParam added in v0.16.0

func (m *Params) GetDebtParam() DebtParam

func (*Params) GetGlobalDebtLimit added in v0.16.0

func (m *Params) GetGlobalDebtLimit() types.Coin

func (*Params) Marshal added in v0.16.0

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

func (*Params) MarshalTo added in v0.16.0

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

func (*Params) MarshalToSizedBuffer added in v0.16.0

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

func (*Params) ParamSetPairs

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

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

func (*Params) ProtoMessage added in v0.16.0

func (*Params) ProtoMessage()

func (*Params) Reset added in v0.16.0

func (m *Params) Reset()

func (*Params) Size added in v0.16.0

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

func (*Params) String

func (m *Params) String() string

func (*Params) Unmarshal added in v0.16.0

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

func (Params) Validate

func (p Params) Validate() error

Validate checks that the parameters have valid values.

func (*Params) XXX_DiscardUnknown added in v0.16.0

func (m *Params) XXX_DiscardUnknown()

func (*Params) XXX_Marshal added in v0.16.0

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

func (*Params) XXX_Merge added in v0.16.0

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

func (*Params) XXX_Size added in v0.16.0

func (m *Params) XXX_Size() int

func (*Params) XXX_Unmarshal added in v0.16.0

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

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

type QueryAccountsRequest added in v0.16.0

type QueryAccountsRequest struct {
}

QueryAccountsRequest defines the request type for the Query/Accounts RPC method.

func (*QueryAccountsRequest) Descriptor added in v0.16.0

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

func (*QueryAccountsRequest) Marshal added in v0.16.0

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

func (*QueryAccountsRequest) MarshalTo added in v0.16.0

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

func (*QueryAccountsRequest) MarshalToSizedBuffer added in v0.16.0

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

func (*QueryAccountsRequest) ProtoMessage added in v0.16.0

func (*QueryAccountsRequest) ProtoMessage()

func (*QueryAccountsRequest) Reset added in v0.16.0

func (m *QueryAccountsRequest) Reset()

func (*QueryAccountsRequest) Size added in v0.16.0

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

func (*QueryAccountsRequest) String added in v0.16.0

func (m *QueryAccountsRequest) String() string

func (*QueryAccountsRequest) Unmarshal added in v0.16.0

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

func (*QueryAccountsRequest) XXX_DiscardUnknown added in v0.16.0

func (m *QueryAccountsRequest) XXX_DiscardUnknown()

func (*QueryAccountsRequest) XXX_Marshal added in v0.16.0

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

func (*QueryAccountsRequest) XXX_Merge added in v0.16.0

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

func (*QueryAccountsRequest) XXX_Size added in v0.16.0

func (m *QueryAccountsRequest) XXX_Size() int

func (*QueryAccountsRequest) XXX_Unmarshal added in v0.16.0

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

type QueryAccountsResponse added in v0.16.0

type QueryAccountsResponse struct {
	Accounts []types.ModuleAccount `protobuf:"bytes,1,rep,name=accounts,proto3" json:"accounts"`
}

QueryAccountsResponse defines the response type for the Query/Accounts RPC method.

func (*QueryAccountsResponse) Descriptor added in v0.16.0

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

func (*QueryAccountsResponse) GetAccounts added in v0.16.0

func (m *QueryAccountsResponse) GetAccounts() []types.ModuleAccount

func (*QueryAccountsResponse) Marshal added in v0.16.0

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

func (*QueryAccountsResponse) MarshalTo added in v0.16.0

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

func (*QueryAccountsResponse) MarshalToSizedBuffer added in v0.16.0

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

func (*QueryAccountsResponse) ProtoMessage added in v0.16.0

func (*QueryAccountsResponse) ProtoMessage()

func (*QueryAccountsResponse) Reset added in v0.16.0

func (m *QueryAccountsResponse) Reset()

func (*QueryAccountsResponse) Size added in v0.16.0

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

func (*QueryAccountsResponse) String added in v0.16.0

func (m *QueryAccountsResponse) String() string

func (*QueryAccountsResponse) Unmarshal added in v0.16.0

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

func (*QueryAccountsResponse) XXX_DiscardUnknown added in v0.16.0

func (m *QueryAccountsResponse) XXX_DiscardUnknown()

func (*QueryAccountsResponse) XXX_Marshal added in v0.16.0

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

func (*QueryAccountsResponse) XXX_Merge added in v0.16.0

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

func (*QueryAccountsResponse) XXX_Size added in v0.16.0

func (m *QueryAccountsResponse) XXX_Size() int

func (*QueryAccountsResponse) XXX_Unmarshal added in v0.16.0

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

type QueryCdpDeposits

type QueryCdpDeposits struct {
	CollateralType string         // get CDPs with this collateral type
	Owner          sdk.AccAddress // get CDPs belonging to this owner
}

QueryCdpDeposits params for query /cdp/deposits

func NewQueryCdpDeposits

func NewQueryCdpDeposits(owner sdk.AccAddress, collateralType string) QueryCdpDeposits

NewQueryCdpDeposits returns QueryCdpDeposits

type QueryCdpParams

type QueryCdpParams struct {
	CollateralType string         // get CDPs with this collateral type
	Owner          sdk.AccAddress // get CDPs belonging to this owner
}

QueryCdpParams params for query /cdp/cdp

func NewQueryCdpParams

func NewQueryCdpParams(owner sdk.AccAddress, collateralType string) QueryCdpParams

NewQueryCdpParams returns QueryCdpParams

type QueryCdpRequest added in v0.16.0

type QueryCdpRequest struct {
	CollateralType string `protobuf:"bytes,1,opt,name=collateral_type,json=collateralType,proto3" json:"collateral_type,omitempty"`
	Owner          string `protobuf:"bytes,2,opt,name=owner,proto3" json:"owner,omitempty"`
}

QueryCdpRequest defines the request type for the Query/Cdp RPC method.

func (*QueryCdpRequest) Descriptor added in v0.16.0

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

func (*QueryCdpRequest) GetCollateralType added in v0.16.0

func (m *QueryCdpRequest) GetCollateralType() string

func (*QueryCdpRequest) GetOwner added in v0.16.0

func (m *QueryCdpRequest) GetOwner() string

func (*QueryCdpRequest) Marshal added in v0.16.0

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

func (*QueryCdpRequest) MarshalTo added in v0.16.0

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

func (*QueryCdpRequest) MarshalToSizedBuffer added in v0.16.0

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

func (*QueryCdpRequest) ProtoMessage added in v0.16.0

func (*QueryCdpRequest) ProtoMessage()

func (*QueryCdpRequest) Reset added in v0.16.0

func (m *QueryCdpRequest) Reset()

func (*QueryCdpRequest) Size added in v0.16.0

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

func (*QueryCdpRequest) String added in v0.16.0

func (m *QueryCdpRequest) String() string

func (*QueryCdpRequest) Unmarshal added in v0.16.0

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

func (*QueryCdpRequest) XXX_DiscardUnknown added in v0.16.0

func (m *QueryCdpRequest) XXX_DiscardUnknown()

func (*QueryCdpRequest) XXX_Marshal added in v0.16.0

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

func (*QueryCdpRequest) XXX_Merge added in v0.16.0

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

func (*QueryCdpRequest) XXX_Size added in v0.16.0

func (m *QueryCdpRequest) XXX_Size() int

func (*QueryCdpRequest) XXX_Unmarshal added in v0.16.0

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

type QueryCdpResponse added in v0.16.0

type QueryCdpResponse struct {
	Cdp CDPResponse `protobuf:"bytes,1,opt,name=cdp,proto3" json:"cdp"`
}

QueryCdpResponse defines the response type for the Query/Cdp RPC method.

func (*QueryCdpResponse) Descriptor added in v0.16.0

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

func (*QueryCdpResponse) GetCdp added in v0.16.0

func (m *QueryCdpResponse) GetCdp() CDPResponse

func (*QueryCdpResponse) Marshal added in v0.16.0

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

func (*QueryCdpResponse) MarshalTo added in v0.16.0

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

func (*QueryCdpResponse) MarshalToSizedBuffer added in v0.16.0

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

func (*QueryCdpResponse) ProtoMessage added in v0.16.0

func (*QueryCdpResponse) ProtoMessage()

func (*QueryCdpResponse) Reset added in v0.16.0

func (m *QueryCdpResponse) Reset()

func (*QueryCdpResponse) Size added in v0.16.0

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

func (*QueryCdpResponse) String added in v0.16.0

func (m *QueryCdpResponse) String() string

func (*QueryCdpResponse) Unmarshal added in v0.16.0

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

func (*QueryCdpResponse) XXX_DiscardUnknown added in v0.16.0

func (m *QueryCdpResponse) XXX_DiscardUnknown()

func (*QueryCdpResponse) XXX_Marshal added in v0.16.0

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

func (*QueryCdpResponse) XXX_Merge added in v0.16.0

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

func (*QueryCdpResponse) XXX_Size added in v0.16.0

func (m *QueryCdpResponse) XXX_Size() int

func (*QueryCdpResponse) XXX_Unmarshal added in v0.16.0

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

type QueryCdpsByCollateralTypeParams added in v0.11.0

type QueryCdpsByCollateralTypeParams struct {
	CollateralType string // get CDPs with this collateral type
}

QueryCdpsByCollateralTypeParams params for query /cdp/cdps/{denom}

func NewQueryCdpsByCollateralTypeParams added in v0.11.0

func NewQueryCdpsByCollateralTypeParams(collateralType string) QueryCdpsByCollateralTypeParams

NewQueryCdpsByCollateralTypeParams returns QueryCdpsByCollateralTypeParams

type QueryCdpsByRatioParams

type QueryCdpsByRatioParams struct {
	CollateralType string
	Ratio          sdk.Dec // get CDPs below this collateral:debt ratio
}

QueryCdpsByRatioParams params for query /cdp/cdps/ratio

func NewQueryCdpsByRatioParams

func NewQueryCdpsByRatioParams(collateralType string, ratio sdk.Dec) QueryCdpsByRatioParams

NewQueryCdpsByRatioParams returns QueryCdpsByRatioParams

type QueryCdpsParams

type QueryCdpsParams struct {
	Page           int            `json:"page" yaml:"page"`
	Limit          int            `json:"limit" yaml:"limit"`
	CollateralType string         `json:"collateral_type" yaml:"collateral_type"`
	Owner          sdk.AccAddress `json:"owner" yaml:"owner"`
	ID             uint64         `json:"id" yaml:"id"`
	Ratio          sdk.Dec        `json:"ratio" yaml:"ratio"`
}

QueryCdpsParams is the params for a filtered CDP query

func NewQueryCdpsParams

func NewQueryCdpsParams(page, limit int, collateralType string, owner sdk.AccAddress, id uint64, ratio sdk.Dec) QueryCdpsParams

NewQueryCdpsParams creates a new QueryCdpsParams

type QueryCdpsRequest added in v0.16.0

type QueryCdpsRequest struct {
	CollateralType string `protobuf:"bytes,1,opt,name=collateral_type,json=collateralType,proto3" json:"collateral_type,omitempty"`
	Owner          string `protobuf:"bytes,2,opt,name=owner,proto3" json:"owner,omitempty"`
	ID             uint64 `protobuf:"varint,3,opt,name=id,proto3" json:"id,omitempty"`
	// sdk.Dec as a string
	Ratio      string             `protobuf:"bytes,4,opt,name=ratio,proto3" json:"ratio,omitempty"`
	Pagination *query.PageRequest `protobuf:"bytes,5,opt,name=pagination,proto3" json:"pagination,omitempty"`
}

QueryCdpsRequest is the params for a filtered CDP query, the request type for the Query/Cdps RPC method.

func (*QueryCdpsRequest) Descriptor added in v0.16.0

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

func (*QueryCdpsRequest) GetCollateralType added in v0.16.0

func (m *QueryCdpsRequest) GetCollateralType() string

func (*QueryCdpsRequest) GetID added in v0.16.0

func (m *QueryCdpsRequest) GetID() uint64

func (*QueryCdpsRequest) GetOwner added in v0.16.0

func (m *QueryCdpsRequest) GetOwner() string

func (*QueryCdpsRequest) GetPagination added in v0.16.0

func (m *QueryCdpsRequest) GetPagination() *query.PageRequest

func (*QueryCdpsRequest) GetRatio added in v0.16.0

func (m *QueryCdpsRequest) GetRatio() string

func (*QueryCdpsRequest) Marshal added in v0.16.0

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

func (*QueryCdpsRequest) MarshalTo added in v0.16.0

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

func (*QueryCdpsRequest) MarshalToSizedBuffer added in v0.16.0

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

func (*QueryCdpsRequest) ProtoMessage added in v0.16.0

func (*QueryCdpsRequest) ProtoMessage()

func (*QueryCdpsRequest) Reset added in v0.16.0

func (m *QueryCdpsRequest) Reset()

func (*QueryCdpsRequest) Size added in v0.16.0

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

func (*QueryCdpsRequest) String added in v0.16.0

func (m *QueryCdpsRequest) String() string

func (*QueryCdpsRequest) Unmarshal added in v0.16.0

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

func (*QueryCdpsRequest) XXX_DiscardUnknown added in v0.16.0

func (m *QueryCdpsRequest) XXX_DiscardUnknown()

func (*QueryCdpsRequest) XXX_Marshal added in v0.16.0

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

func (*QueryCdpsRequest) XXX_Merge added in v0.16.0

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

func (*QueryCdpsRequest) XXX_Size added in v0.16.0

func (m *QueryCdpsRequest) XXX_Size() int

func (*QueryCdpsRequest) XXX_Unmarshal added in v0.16.0

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

type QueryCdpsResponse added in v0.16.0

type QueryCdpsResponse struct {
	Cdps       CDPResponses        `protobuf:"bytes,1,rep,name=cdps,proto3,castrepeated=CDPResponses" json:"cdps"`
	Pagination *query.PageResponse `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"`
}

QueryCdpsResponse defines the response type for the Query/Cdps RPC method.

func (*QueryCdpsResponse) Descriptor added in v0.16.0

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

func (*QueryCdpsResponse) GetCdps added in v0.16.0

func (m *QueryCdpsResponse) GetCdps() CDPResponses

func (*QueryCdpsResponse) GetPagination added in v0.16.0

func (m *QueryCdpsResponse) GetPagination() *query.PageResponse

func (*QueryCdpsResponse) Marshal added in v0.16.0

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

func (*QueryCdpsResponse) MarshalTo added in v0.16.0

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

func (*QueryCdpsResponse) MarshalToSizedBuffer added in v0.16.0

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

func (*QueryCdpsResponse) ProtoMessage added in v0.16.0

func (*QueryCdpsResponse) ProtoMessage()

func (*QueryCdpsResponse) Reset added in v0.16.0

func (m *QueryCdpsResponse) Reset()

func (*QueryCdpsResponse) Size added in v0.16.0

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

func (*QueryCdpsResponse) String added in v0.16.0

func (m *QueryCdpsResponse) String() string

func (*QueryCdpsResponse) Unmarshal added in v0.16.0

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

func (*QueryCdpsResponse) XXX_DiscardUnknown added in v0.16.0

func (m *QueryCdpsResponse) XXX_DiscardUnknown()

func (*QueryCdpsResponse) XXX_Marshal added in v0.16.0

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

func (*QueryCdpsResponse) XXX_Merge added in v0.16.0

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

func (*QueryCdpsResponse) XXX_Size added in v0.16.0

func (m *QueryCdpsResponse) XXX_Size() int

func (*QueryCdpsResponse) XXX_Unmarshal added in v0.16.0

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

type QueryClient added in v0.16.0

type QueryClient interface {
	// Params queries all parameters of the cdp module.
	Params(ctx context.Context, in *QueryParamsRequest, opts ...grpc.CallOption) (*QueryParamsResponse, error)
	// Accounts queries the CDP module accounts.
	Accounts(ctx context.Context, in *QueryAccountsRequest, opts ...grpc.CallOption) (*QueryAccountsResponse, error)
	// TotalPrincipal queries the total principal of a given collateral type.
	TotalPrincipal(ctx context.Context, in *QueryTotalPrincipalRequest, opts ...grpc.CallOption) (*QueryTotalPrincipalResponse, error)
	// TotalCollateral queries the total collateral of a given collateral type.
	TotalCollateral(ctx context.Context, in *QueryTotalCollateralRequest, opts ...grpc.CallOption) (*QueryTotalCollateralResponse, error)
	// Cdps queries all active CDPs.
	Cdps(ctx context.Context, in *QueryCdpsRequest, opts ...grpc.CallOption) (*QueryCdpsResponse, error)
	// Cdp queries a CDP with the input owner address and collateral type.
	Cdp(ctx context.Context, in *QueryCdpRequest, opts ...grpc.CallOption) (*QueryCdpResponse, error)
	// Deposits queries deposits associated with the CDP owned by an address for a collateral type.
	Deposits(ctx context.Context, in *QueryDepositsRequest, opts ...grpc.CallOption) (*QueryDepositsResponse, 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 added in v0.16.0

func NewQueryClient(cc grpc1.ClientConn) QueryClient

type QueryDepositsRequest added in v0.16.0

type QueryDepositsRequest struct {
	CollateralType string `protobuf:"bytes,1,opt,name=collateral_type,json=collateralType,proto3" json:"collateral_type,omitempty"`
	Owner          string `protobuf:"bytes,2,opt,name=owner,proto3" json:"owner,omitempty"`
}

QueryDepositsRequest defines the request type for the Query/Deposits RPC method.

func (*QueryDepositsRequest) Descriptor added in v0.16.0

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

func (*QueryDepositsRequest) GetCollateralType added in v0.16.0

func (m *QueryDepositsRequest) GetCollateralType() string

func (*QueryDepositsRequest) GetOwner added in v0.16.0

func (m *QueryDepositsRequest) GetOwner() string

func (*QueryDepositsRequest) Marshal added in v0.16.0

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

func (*QueryDepositsRequest) MarshalTo added in v0.16.0

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

func (*QueryDepositsRequest) MarshalToSizedBuffer added in v0.16.0

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

func (*QueryDepositsRequest) ProtoMessage added in v0.16.0

func (*QueryDepositsRequest) ProtoMessage()

func (*QueryDepositsRequest) Reset added in v0.16.0

func (m *QueryDepositsRequest) Reset()

func (*QueryDepositsRequest) Size added in v0.16.0

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

func (*QueryDepositsRequest) String added in v0.16.0

func (m *QueryDepositsRequest) String() string

func (*QueryDepositsRequest) Unmarshal added in v0.16.0

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

func (*QueryDepositsRequest) XXX_DiscardUnknown added in v0.16.0

func (m *QueryDepositsRequest) XXX_DiscardUnknown()

func (*QueryDepositsRequest) XXX_Marshal added in v0.16.0

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

func (*QueryDepositsRequest) XXX_Merge added in v0.16.0

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

func (*QueryDepositsRequest) XXX_Size added in v0.16.0

func (m *QueryDepositsRequest) XXX_Size() int

func (*QueryDepositsRequest) XXX_Unmarshal added in v0.16.0

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

type QueryDepositsResponse added in v0.16.0

type QueryDepositsResponse struct {
	Deposits Deposits `protobuf:"bytes,1,rep,name=deposits,proto3,castrepeated=Deposits" json:"deposits"`
}

QueryDepositsResponse defines the response type for the Query/Deposits RPC method.

func (*QueryDepositsResponse) Descriptor added in v0.16.0

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

func (*QueryDepositsResponse) GetDeposits added in v0.16.0

func (m *QueryDepositsResponse) GetDeposits() Deposits

func (*QueryDepositsResponse) Marshal added in v0.16.0

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

func (*QueryDepositsResponse) MarshalTo added in v0.16.0

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

func (*QueryDepositsResponse) MarshalToSizedBuffer added in v0.16.0

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

func (*QueryDepositsResponse) ProtoMessage added in v0.16.0

func (*QueryDepositsResponse) ProtoMessage()

func (*QueryDepositsResponse) Reset added in v0.16.0

func (m *QueryDepositsResponse) Reset()

func (*QueryDepositsResponse) Size added in v0.16.0

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

func (*QueryDepositsResponse) String added in v0.16.0

func (m *QueryDepositsResponse) String() string

func (*QueryDepositsResponse) Unmarshal added in v0.16.0

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

func (*QueryDepositsResponse) XXX_DiscardUnknown added in v0.16.0

func (m *QueryDepositsResponse) XXX_DiscardUnknown()

func (*QueryDepositsResponse) XXX_Marshal added in v0.16.0

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

func (*QueryDepositsResponse) XXX_Merge added in v0.16.0

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

func (*QueryDepositsResponse) XXX_Size added in v0.16.0

func (m *QueryDepositsResponse) XXX_Size() int

func (*QueryDepositsResponse) XXX_Unmarshal added in v0.16.0

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

type QueryGetTotalCollateralParams added in v0.15.2

type QueryGetTotalCollateralParams struct {
	CollateralType string
}

QueryGetTotalCollateralParams params for query /cdp/totalCollateral

func NewQueryGetTotalCollateralParams added in v0.15.2

func NewQueryGetTotalCollateralParams(collateralType string) QueryGetTotalCollateralParams

NewQueryGetTotalCollateralParams returns QueryGetTotalCollateralParams

type QueryGetTotalPrincipalParams added in v0.15.2

type QueryGetTotalPrincipalParams struct {
	CollateralType string
}

QueryGetTotalPrincipalParams params for query /cdp/totalPrincipal

func NewQueryGetTotalPrincipalParams added in v0.15.2

func NewQueryGetTotalPrincipalParams(collateralType string) QueryGetTotalPrincipalParams

NewQueryGetTotalPrincipalParams returns QueryGetTotalPrincipalParams

type QueryParamsRequest added in v0.16.0

type QueryParamsRequest struct {
}

QueryParamsRequest defines the request type for the Query/Params RPC method.

func (*QueryParamsRequest) Descriptor added in v0.16.0

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

func (*QueryParamsRequest) Marshal added in v0.16.0

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

func (*QueryParamsRequest) MarshalTo added in v0.16.0

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

func (*QueryParamsRequest) MarshalToSizedBuffer added in v0.16.0

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

func (*QueryParamsRequest) ProtoMessage added in v0.16.0

func (*QueryParamsRequest) ProtoMessage()

func (*QueryParamsRequest) Reset added in v0.16.0

func (m *QueryParamsRequest) Reset()

func (*QueryParamsRequest) Size added in v0.16.0

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

func (*QueryParamsRequest) String added in v0.16.0

func (m *QueryParamsRequest) String() string

func (*QueryParamsRequest) Unmarshal added in v0.16.0

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

func (*QueryParamsRequest) XXX_DiscardUnknown added in v0.16.0

func (m *QueryParamsRequest) XXX_DiscardUnknown()

func (*QueryParamsRequest) XXX_Marshal added in v0.16.0

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

func (*QueryParamsRequest) XXX_Merge added in v0.16.0

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

func (*QueryParamsRequest) XXX_Size added in v0.16.0

func (m *QueryParamsRequest) XXX_Size() int

func (*QueryParamsRequest) XXX_Unmarshal added in v0.16.0

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

type QueryParamsResponse added in v0.16.0

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

QueryParamsResponse defines the response type for the Query/Params RPC method.

func (*QueryParamsResponse) Descriptor added in v0.16.0

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

func (*QueryParamsResponse) Marshal added in v0.16.0

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

func (*QueryParamsResponse) MarshalTo added in v0.16.0

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

func (*QueryParamsResponse) MarshalToSizedBuffer added in v0.16.0

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

func (*QueryParamsResponse) ProtoMessage added in v0.16.0

func (*QueryParamsResponse) ProtoMessage()

func (*QueryParamsResponse) Reset added in v0.16.0

func (m *QueryParamsResponse) Reset()

func (*QueryParamsResponse) Size added in v0.16.0

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

func (*QueryParamsResponse) String added in v0.16.0

func (m *QueryParamsResponse) String() string

func (*QueryParamsResponse) Unmarshal added in v0.16.0

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

func (*QueryParamsResponse) XXX_DiscardUnknown added in v0.16.0

func (m *QueryParamsResponse) XXX_DiscardUnknown()

func (*QueryParamsResponse) XXX_Marshal added in v0.16.0

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

func (*QueryParamsResponse) XXX_Merge added in v0.16.0

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

func (*QueryParamsResponse) XXX_Size added in v0.16.0

func (m *QueryParamsResponse) XXX_Size() int

func (*QueryParamsResponse) XXX_Unmarshal added in v0.16.0

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

type QueryServer added in v0.16.0

type QueryServer interface {
	// Params queries all parameters of the cdp module.
	Params(context.Context, *QueryParamsRequest) (*QueryParamsResponse, error)
	// Accounts queries the CDP module accounts.
	Accounts(context.Context, *QueryAccountsRequest) (*QueryAccountsResponse, error)
	// TotalPrincipal queries the total principal of a given collateral type.
	TotalPrincipal(context.Context, *QueryTotalPrincipalRequest) (*QueryTotalPrincipalResponse, error)
	// TotalCollateral queries the total collateral of a given collateral type.
	TotalCollateral(context.Context, *QueryTotalCollateralRequest) (*QueryTotalCollateralResponse, error)
	// Cdps queries all active CDPs.
	Cdps(context.Context, *QueryCdpsRequest) (*QueryCdpsResponse, error)
	// Cdp queries a CDP with the input owner address and collateral type.
	Cdp(context.Context, *QueryCdpRequest) (*QueryCdpResponse, error)
	// Deposits queries deposits associated with the CDP owned by an address for a collateral type.
	Deposits(context.Context, *QueryDepositsRequest) (*QueryDepositsResponse, error)
}

QueryServer is the server API for Query service.

type QueryTotalCollateralRequest added in v0.16.0

type QueryTotalCollateralRequest struct {
	CollateralType string `protobuf:"bytes,1,opt,name=collateral_type,json=collateralType,proto3" json:"collateral_type,omitempty"`
}

QueryTotalCollateralRequest defines the request type for the Query/TotalCollateral RPC method.

func (*QueryTotalCollateralRequest) Descriptor added in v0.16.0

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

func (*QueryTotalCollateralRequest) GetCollateralType added in v0.16.0

func (m *QueryTotalCollateralRequest) GetCollateralType() string

func (*QueryTotalCollateralRequest) Marshal added in v0.16.0

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

func (*QueryTotalCollateralRequest) MarshalTo added in v0.16.0

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

func (*QueryTotalCollateralRequest) MarshalToSizedBuffer added in v0.16.0

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

func (*QueryTotalCollateralRequest) ProtoMessage added in v0.16.0

func (*QueryTotalCollateralRequest) ProtoMessage()

func (*QueryTotalCollateralRequest) Reset added in v0.16.0

func (m *QueryTotalCollateralRequest) Reset()

func (*QueryTotalCollateralRequest) Size added in v0.16.0

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

func (*QueryTotalCollateralRequest) String added in v0.16.0

func (m *QueryTotalCollateralRequest) String() string

func (*QueryTotalCollateralRequest) Unmarshal added in v0.16.0

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

func (*QueryTotalCollateralRequest) XXX_DiscardUnknown added in v0.16.0

func (m *QueryTotalCollateralRequest) XXX_DiscardUnknown()

func (*QueryTotalCollateralRequest) XXX_Marshal added in v0.16.0

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

func (*QueryTotalCollateralRequest) XXX_Merge added in v0.16.0

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

func (*QueryTotalCollateralRequest) XXX_Size added in v0.16.0

func (m *QueryTotalCollateralRequest) XXX_Size() int

func (*QueryTotalCollateralRequest) XXX_Unmarshal added in v0.16.0

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

type QueryTotalCollateralResponse added in v0.16.0

type QueryTotalCollateralResponse struct {
	TotalCollateral TotalCollaterals `` /* 126-byte string literal not displayed */
}

QueryTotalCollateralResponse defines the response type for the Query/TotalCollateral RPC method.

func (*QueryTotalCollateralResponse) Descriptor added in v0.16.0

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

func (*QueryTotalCollateralResponse) GetTotalCollateral added in v0.16.0

func (m *QueryTotalCollateralResponse) GetTotalCollateral() TotalCollaterals

func (*QueryTotalCollateralResponse) Marshal added in v0.16.0

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

func (*QueryTotalCollateralResponse) MarshalTo added in v0.16.0

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

func (*QueryTotalCollateralResponse) MarshalToSizedBuffer added in v0.16.0

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

func (*QueryTotalCollateralResponse) ProtoMessage added in v0.16.0

func (*QueryTotalCollateralResponse) ProtoMessage()

func (*QueryTotalCollateralResponse) Reset added in v0.16.0

func (m *QueryTotalCollateralResponse) Reset()

func (*QueryTotalCollateralResponse) Size added in v0.16.0

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

func (*QueryTotalCollateralResponse) String added in v0.16.0

func (*QueryTotalCollateralResponse) Unmarshal added in v0.16.0

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

func (*QueryTotalCollateralResponse) XXX_DiscardUnknown added in v0.16.0

func (m *QueryTotalCollateralResponse) XXX_DiscardUnknown()

func (*QueryTotalCollateralResponse) XXX_Marshal added in v0.16.0

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

func (*QueryTotalCollateralResponse) XXX_Merge added in v0.16.0

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

func (*QueryTotalCollateralResponse) XXX_Size added in v0.16.0

func (m *QueryTotalCollateralResponse) XXX_Size() int

func (*QueryTotalCollateralResponse) XXX_Unmarshal added in v0.16.0

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

type QueryTotalPrincipalRequest added in v0.16.0

type QueryTotalPrincipalRequest struct {
	CollateralType string `protobuf:"bytes,1,opt,name=collateral_type,json=collateralType,proto3" json:"collateral_type,omitempty"`
}

QueryTotalPrincipalRequest defines the request type for the Query/TotalPrincipal RPC method.

func (*QueryTotalPrincipalRequest) Descriptor added in v0.16.0

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

func (*QueryTotalPrincipalRequest) GetCollateralType added in v0.16.0

func (m *QueryTotalPrincipalRequest) GetCollateralType() string

func (*QueryTotalPrincipalRequest) Marshal added in v0.16.0

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

func (*QueryTotalPrincipalRequest) MarshalTo added in v0.16.0

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

func (*QueryTotalPrincipalRequest) MarshalToSizedBuffer added in v0.16.0

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

func (*QueryTotalPrincipalRequest) ProtoMessage added in v0.16.0

func (*QueryTotalPrincipalRequest) ProtoMessage()

func (*QueryTotalPrincipalRequest) Reset added in v0.16.0

func (m *QueryTotalPrincipalRequest) Reset()

func (*QueryTotalPrincipalRequest) Size added in v0.16.0

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

func (*QueryTotalPrincipalRequest) String added in v0.16.0

func (m *QueryTotalPrincipalRequest) String() string

func (*QueryTotalPrincipalRequest) Unmarshal added in v0.16.0

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

func (*QueryTotalPrincipalRequest) XXX_DiscardUnknown added in v0.16.0

func (m *QueryTotalPrincipalRequest) XXX_DiscardUnknown()

func (*QueryTotalPrincipalRequest) XXX_Marshal added in v0.16.0

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

func (*QueryTotalPrincipalRequest) XXX_Merge added in v0.16.0

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

func (*QueryTotalPrincipalRequest) XXX_Size added in v0.16.0

func (m *QueryTotalPrincipalRequest) XXX_Size() int

func (*QueryTotalPrincipalRequest) XXX_Unmarshal added in v0.16.0

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

type QueryTotalPrincipalResponse added in v0.16.0

type QueryTotalPrincipalResponse struct {
	TotalPrincipal TotalPrincipals `protobuf:"bytes,1,rep,name=total_principal,json=totalPrincipal,proto3,castrepeated=TotalPrincipals" json:"total_principal"`
}

QueryTotalPrincipalResponse defines the response type for the Query/TotalPrincipal RPC method.

func (*QueryTotalPrincipalResponse) Descriptor added in v0.16.0

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

func (*QueryTotalPrincipalResponse) GetTotalPrincipal added in v0.16.0

func (m *QueryTotalPrincipalResponse) GetTotalPrincipal() TotalPrincipals

func (*QueryTotalPrincipalResponse) Marshal added in v0.16.0

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

func (*QueryTotalPrincipalResponse) MarshalTo added in v0.16.0

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

func (*QueryTotalPrincipalResponse) MarshalToSizedBuffer added in v0.16.0

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

func (*QueryTotalPrincipalResponse) ProtoMessage added in v0.16.0

func (*QueryTotalPrincipalResponse) ProtoMessage()

func (*QueryTotalPrincipalResponse) Reset added in v0.16.0

func (m *QueryTotalPrincipalResponse) Reset()

func (*QueryTotalPrincipalResponse) Size added in v0.16.0

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

func (*QueryTotalPrincipalResponse) String added in v0.16.0

func (m *QueryTotalPrincipalResponse) String() string

func (*QueryTotalPrincipalResponse) Unmarshal added in v0.16.0

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

func (*QueryTotalPrincipalResponse) XXX_DiscardUnknown added in v0.16.0

func (m *QueryTotalPrincipalResponse) XXX_DiscardUnknown()

func (*QueryTotalPrincipalResponse) XXX_Marshal added in v0.16.0

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

func (*QueryTotalPrincipalResponse) XXX_Merge added in v0.16.0

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

func (*QueryTotalPrincipalResponse) XXX_Size added in v0.16.0

func (m *QueryTotalPrincipalResponse) XXX_Size() int

func (*QueryTotalPrincipalResponse) XXX_Unmarshal added in v0.16.0

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

type TotalCollateral added in v0.16.0

type TotalCollateral struct {
	CollateralType string     `protobuf:"bytes,1,opt,name=collateral_type,json=collateralType,proto3" json:"collateral_type,omitempty"`
	Amount         types.Coin `protobuf:"bytes,2,opt,name=amount,proto3" json:"amount"`
}

TotalCollateral defines the total collateral of a given collateral type

func NewTotalCollateral added in v0.16.0

func NewTotalCollateral(collateralType string, amount sdk.Coin) TotalCollateral

TotalCollateral returns a new TotalCollateral

func (*TotalCollateral) Descriptor added in v0.16.0

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

func (*TotalCollateral) Marshal added in v0.16.0

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

func (*TotalCollateral) MarshalTo added in v0.16.0

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

func (*TotalCollateral) MarshalToSizedBuffer added in v0.16.0

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

func (*TotalCollateral) ProtoMessage added in v0.16.0

func (*TotalCollateral) ProtoMessage()

func (*TotalCollateral) Reset added in v0.16.0

func (m *TotalCollateral) Reset()

func (*TotalCollateral) Size added in v0.16.0

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

func (*TotalCollateral) String added in v0.16.0

func (m *TotalCollateral) String() string

func (*TotalCollateral) Unmarshal added in v0.16.0

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

func (*TotalCollateral) XXX_DiscardUnknown added in v0.16.0

func (m *TotalCollateral) XXX_DiscardUnknown()

func (*TotalCollateral) XXX_Marshal added in v0.16.0

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

func (*TotalCollateral) XXX_Merge added in v0.16.0

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

func (*TotalCollateral) XXX_Size added in v0.16.0

func (m *TotalCollateral) XXX_Size() int

func (*TotalCollateral) XXX_Unmarshal added in v0.16.0

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

type TotalCollaterals added in v0.16.0

type TotalCollaterals []TotalCollateral

TotalCollaterals a collection of TotalCollateral objects

type TotalPrincipal added in v0.16.0

type TotalPrincipal struct {
	CollateralType string     `protobuf:"bytes,1,opt,name=collateral_type,json=collateralType,proto3" json:"collateral_type,omitempty"`
	Amount         types.Coin `protobuf:"bytes,2,opt,name=amount,proto3" json:"amount"`
}

TotalPrincipal defines the total principal of a given collateral type

func NewTotalPrincipal added in v0.16.0

func NewTotalPrincipal(collateralType string, amount sdk.Coin) TotalPrincipal

TotalPrincipal returns a new TotalPrincipal

func (*TotalPrincipal) Descriptor added in v0.16.0

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

func (*TotalPrincipal) Marshal added in v0.16.0

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

func (*TotalPrincipal) MarshalTo added in v0.16.0

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

func (*TotalPrincipal) MarshalToSizedBuffer added in v0.16.0

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

func (*TotalPrincipal) ProtoMessage added in v0.16.0

func (*TotalPrincipal) ProtoMessage()

func (*TotalPrincipal) Reset added in v0.16.0

func (m *TotalPrincipal) Reset()

func (*TotalPrincipal) Size added in v0.16.0

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

func (*TotalPrincipal) String added in v0.16.0

func (m *TotalPrincipal) String() string

func (*TotalPrincipal) Unmarshal added in v0.16.0

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

func (*TotalPrincipal) XXX_DiscardUnknown added in v0.16.0

func (m *TotalPrincipal) XXX_DiscardUnknown()

func (*TotalPrincipal) XXX_Marshal added in v0.16.0

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

func (*TotalPrincipal) XXX_Merge added in v0.16.0

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

func (*TotalPrincipal) XXX_Size added in v0.16.0

func (m *TotalPrincipal) XXX_Size() int

func (*TotalPrincipal) XXX_Unmarshal added in v0.16.0

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

type TotalPrincipals added in v0.16.0

type TotalPrincipals []TotalPrincipal

TotalPrincipals a collection of TotalPrincipal objects

type UnimplementedMsgServer added in v0.16.0

type UnimplementedMsgServer struct {
}

UnimplementedMsgServer can be embedded to have forward compatible implementations.

func (*UnimplementedMsgServer) CreateCDP added in v0.16.0

func (*UnimplementedMsgServer) Deposit added in v0.16.0

func (*UnimplementedMsgServer) DrawDebt added in v0.16.0

func (*UnimplementedMsgServer) Liquidate added in v0.16.0

func (*UnimplementedMsgServer) RepayDebt added in v0.16.0

func (*UnimplementedMsgServer) Withdraw added in v0.16.0

type UnimplementedQueryServer added in v0.16.0

type UnimplementedQueryServer struct {
}

UnimplementedQueryServer can be embedded to have forward compatible implementations.

func (*UnimplementedQueryServer) Accounts added in v0.16.0

func (*UnimplementedQueryServer) Cdp added in v0.16.0

func (*UnimplementedQueryServer) Cdps added in v0.16.0

func (*UnimplementedQueryServer) Deposits added in v0.16.0

func (*UnimplementedQueryServer) Params added in v0.16.0

func (*UnimplementedQueryServer) TotalCollateral added in v0.16.0

func (*UnimplementedQueryServer) TotalPrincipal added in v0.16.0

Jump to

Keyboard shortcuts

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