types

package
v0.3.1 Latest Latest
Warning

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

Go to latest
Published: Jul 6, 2023 License: Apache-2.0 Imports: 41 Imported by: 0

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 = errorsmod.Register(ModuleName, 2, "cdp already exists")
	// ErrInvalidCollateralLength error for invalid collateral input length
	ErrInvalidCollateralLength = errorsmod.Register(ModuleName, 3, "only one collateral type per cdp")
	// ErrCollateralNotSupported error for unsupported collateral
	ErrCollateralNotSupported = errorsmod.Register(ModuleName, 4, "collateral not supported")
	// ErrDebtNotSupported error for unsupported debt
	ErrDebtNotSupported = errorsmod.Register(ModuleName, 5, "debt not supported")
	// ErrExceedsDebtLimit error for attempted draws that exceed debt limit
	ErrExceedsDebtLimit = errorsmod.Register(ModuleName, 6, "proposed debt increase would exceed debt limit")
	// ErrInvalidCollateralRatio error for attempted draws that are below liquidation ratio
	ErrInvalidCollateralRatio = errorsmod.Register(ModuleName, 7, "proposed collateral ratio is below liquidation ratio")
	// ErrCdpNotFound error cdp not found
	ErrCdpNotFound = errorsmod.Register(ModuleName, 8, "cdp not found")
	// ErrDepositNotFound error for deposit not found
	ErrDepositNotFound = errorsmod.Register(ModuleName, 9, "deposit not found")
	// ErrInvalidDeposit error for invalid deposit
	ErrInvalidDeposit = errorsmod.Register(ModuleName, 10, "invalid deposit")
	// ErrInvalidPayment error for invalid payment
	ErrInvalidPayment = errorsmod.Register(ModuleName, 11, "invalid payment")
	// ErrDepositNotAvailable error for withdrawing deposits in liquidation
	ErrDepositNotAvailable = errorsmod.Register(ModuleName, 12, "deposit in liquidation")
	// ErrInvalidWithdrawAmount error for invalid withdrawal amount
	ErrInvalidWithdrawAmount = errorsmod.Register(ModuleName, 13, "withdrawal amount exceeds deposit")
	// ErrCdpNotAvailable error for depositing to a CDP in liquidation
	ErrCdpNotAvailable = errorsmod.Register(ModuleName, 14, "cannot modify cdp in liquidation")
	// ErrBelowDebtFloor error for creating a cdp with debt below the minimum
	ErrBelowDebtFloor = errorsmod.Register(ModuleName, 15, "proposed cdp debt is below minimum")
	// ErrLoadingAugmentedCDP error loading augmented cdp
	ErrLoadingAugmentedCDP = errorsmod.Register(ModuleName, 16, "augmented cdp could not be loaded from cdp")
	// ErrInvalidDebtRequest error for invalid principal input length
	ErrInvalidDebtRequest = errorsmod.Register(ModuleName, 17, "only one principal type per cdp")
	// ErrDenomPrefixNotFound error for denom prefix not found
	ErrDenomPrefixNotFound = errorsmod.Register(ModuleName, 18, "denom prefix not found")
	// ErrPricefeedDown error for when a price for the input denom is not found
	ErrPricefeedDown = errorsmod.Register(ModuleName, 19, "no price found for collateral")
	// ErrInvalidCollateral error for when the input collateral denom does not match the expected collateral denom
	ErrInvalidCollateral = errorsmod.Register(ModuleName, 20, "invalid collateral for input collateral type")
	// ErrAccountNotFound error for when no account is found for an input address
	ErrAccountNotFound = errorsmod.Register(ModuleName, 21, "account not found")
	// ErrInsufficientBalance error for when an account does not have enough funds
	ErrInsufficientBalance = errorsmod.Register(ModuleName, 22, "insufficient balance")
	// ErrNotLiquidatable error for when an cdp is not liquidatable
	ErrNotLiquidatable = errorsmod.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:            "usdf",
		ReferenceAsset:   "usd",
		ConversionFactor: sdkmath.NewInt(6),
		DebtFloor:        sdkmath.NewInt(10000000),
	}
	DefaultCdpStartingID    = uint64(1)
	DefaultDebtDenom        = "debt"
	DefaultGovDenom         = "ufury"
	DefaultStableDenom      = "usdf"
	DefaultSurplusThreshold = sdkmath.NewInt(500000000000)
	DefaultDebtThreshold    = sdkmath.NewInt(100000000000)
	DefaultSurplusLot       = sdkmath.NewInt(10000000000)
	DefaultDebtLot          = sdkmath.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 ¶

func RegisterInterfaces(registry types.InterfaceRegistry)

func RegisterLegacyAminoCodec ¶

func RegisterLegacyAminoCodec(cdc *codec.LegacyAmino)

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

func RegisterMsgServer ¶

func RegisterMsgServer(s grpc1.Server, srv MsgServer)

func RegisterQueryHandler ¶

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

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

func RegisterQueryHandlerClient ¶

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

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

func RegisterQueryHandlerFromEndpoint ¶

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

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

func RegisterQueryHandlerServer ¶

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

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

func RegisterQueryServer ¶

func RegisterQueryServer(s grpc1.Server, srv QueryServer)

func RelativePow ¶

func RelativePow(x sdkmath.Int, n sdkmath.Int, b sdkmath.Int) (z sdkmath.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 ¶

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 []sdkmath.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 ¶

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 ¶

func NewCDPWithFees(id uint64, owner sdk.AccAddress, collateral sdk.Coin, collateralType string, principal, fees sdk.Coin, time time.Time, interestFactor sdk.Dec) CDP

NewCDPWithFees creates a new CDP object, for use during migration

func (*CDP) Descriptor ¶

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

func (CDP) GetNormalizedPrincipal ¶

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 ¶

func (cdp CDP) GetTotalPrincipal() sdk.Coin

GetTotalPrincipal returns the total principle for the cdp

func (*CDP) Marshal ¶

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

func (*CDP) MarshalTo ¶

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

func (*CDP) MarshalToSizedBuffer ¶

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

func (*CDP) ProtoMessage ¶

func (*CDP) ProtoMessage()

func (*CDP) Reset ¶

func (m *CDP) Reset()

func (*CDP) Size ¶

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

func (*CDP) String ¶

func (m *CDP) String() string

func (*CDP) Unmarshal ¶

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

func (CDP) Validate ¶

func (cdp CDP) Validate() error

Validate performs a basic validation of the CDP fields.

func (*CDP) XXX_DiscardUnknown ¶

func (m *CDP) XXX_DiscardUnknown()

func (*CDP) XXX_Marshal ¶

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

func (*CDP) XXX_Merge ¶

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

func (*CDP) XXX_Size ¶

func (m *CDP) XXX_Size() int

func (*CDP) XXX_Unmarshal ¶

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

type CDPHooks ¶

type CDPHooks interface {
	AfterCDPCreated(ctx sdk.Context, cdp CDP)
	BeforeCDPModified(ctx sdk.Context, cdp CDP)
}

CDPHooks event hooks for other keepers to run code in response to CDP modifications

type CDPResponse ¶

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 ¶

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

NewCDPResponse creates a new CDPResponse object

func (*CDPResponse) Descriptor ¶

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

func (*CDPResponse) GetAccumulatedFees ¶

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

func (*CDPResponse) GetCollateral ¶

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

func (*CDPResponse) GetCollateralValue ¶

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

func (*CDPResponse) GetCollateralizationRatio ¶

func (m *CDPResponse) GetCollateralizationRatio() string

func (*CDPResponse) GetFeesUpdated ¶

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

func (*CDPResponse) GetID ¶

func (m *CDPResponse) GetID() uint64

func (*CDPResponse) GetInterestFactor ¶

func (m *CDPResponse) GetInterestFactor() string

func (*CDPResponse) GetOwner ¶

func (m *CDPResponse) GetOwner() string

func (*CDPResponse) GetPrincipal ¶

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

func (*CDPResponse) GetType ¶

func (m *CDPResponse) GetType() string

func (*CDPResponse) Marshal ¶

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

func (*CDPResponse) MarshalTo ¶

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

func (*CDPResponse) MarshalToSizedBuffer ¶

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

func (*CDPResponse) ProtoMessage ¶

func (*CDPResponse) ProtoMessage()

func (*CDPResponse) Reset ¶

func (m *CDPResponse) Reset()

func (*CDPResponse) Size ¶

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

func (*CDPResponse) String ¶

func (m *CDPResponse) String() string

func (*CDPResponse) Unmarshal ¶

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

func (*CDPResponse) XXX_DiscardUnknown ¶

func (m *CDPResponse) XXX_DiscardUnknown()

func (*CDPResponse) XXX_Marshal ¶

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

func (*CDPResponse) XXX_Merge ¶

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

func (*CDPResponse) XXX_Size ¶

func (m *CDPResponse) XXX_Size() int

func (*CDPResponse) XXX_Unmarshal ¶

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

type CDPResponses ¶

type CDPResponses []CDPResponse

CDPResponses a collection of CDPResponse objects

type CDPs ¶

type CDPs []CDP

CDPs a collection of CDP objects

func (CDPs) Validate ¶

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 ¶

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

NewCollateralParam returns a new CollateralParam

func (*CollateralParam) Descriptor ¶

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

func (*CollateralParam) GetDebtLimit ¶

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

func (*CollateralParam) GetDenom ¶

func (m *CollateralParam) GetDenom() string

func (*CollateralParam) GetLiquidationMarketID ¶

func (m *CollateralParam) GetLiquidationMarketID() string

func (*CollateralParam) GetSpotMarketID ¶

func (m *CollateralParam) GetSpotMarketID() string

func (*CollateralParam) GetType ¶

func (m *CollateralParam) GetType() string

func (*CollateralParam) Marshal ¶

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

func (*CollateralParam) MarshalTo ¶

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

func (*CollateralParam) MarshalToSizedBuffer ¶

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

func (*CollateralParam) ProtoMessage ¶

func (*CollateralParam) ProtoMessage()

func (*CollateralParam) Reset ¶

func (m *CollateralParam) Reset()

func (*CollateralParam) Size ¶

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

func (*CollateralParam) String ¶

func (m *CollateralParam) String() string

func (*CollateralParam) Unmarshal ¶

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

func (*CollateralParam) XXX_DiscardUnknown ¶

func (m *CollateralParam) XXX_DiscardUnknown()

func (*CollateralParam) XXX_Marshal ¶

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

func (*CollateralParam) XXX_Merge ¶

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

func (*CollateralParam) XXX_Size ¶

func (m *CollateralParam) XXX_Size() int

func (*CollateralParam) XXX_Unmarshal ¶

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

type CollateralParams ¶

type CollateralParams []CollateralParam

CollateralParams array of CollateralParam

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 ¶

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

NewDebtParam returns a new DebtParam

func (*DebtParam) Descriptor ¶

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

func (*DebtParam) GetDenom ¶

func (m *DebtParam) GetDenom() string

func (*DebtParam) GetReferenceAsset ¶

func (m *DebtParam) GetReferenceAsset() string

func (*DebtParam) Marshal ¶

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

func (*DebtParam) MarshalTo ¶

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

func (*DebtParam) MarshalToSizedBuffer ¶

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

func (*DebtParam) ProtoMessage ¶

func (*DebtParam) ProtoMessage()

func (*DebtParam) Reset ¶

func (m *DebtParam) Reset()

func (*DebtParam) Size ¶

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

func (*DebtParam) String ¶

func (m *DebtParam) String() string

func (*DebtParam) Unmarshal ¶

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

func (*DebtParam) XXX_DiscardUnknown ¶

func (m *DebtParam) XXX_DiscardUnknown()

func (*DebtParam) XXX_Marshal ¶

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

func (*DebtParam) XXX_Merge ¶

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

func (*DebtParam) XXX_Size ¶

func (m *DebtParam) XXX_Size() int

func (*DebtParam) XXX_Unmarshal ¶

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 ¶

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 ¶

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

func (*Deposit) MarshalTo ¶

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

func (*Deposit) MarshalToSizedBuffer ¶

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

func (*Deposit) ProtoMessage ¶

func (*Deposit) ProtoMessage()

func (*Deposit) Reset ¶

func (m *Deposit) Reset()

func (*Deposit) Size ¶

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

func (*Deposit) String ¶

func (m *Deposit) String() string

func (*Deposit) Unmarshal ¶

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

func (Deposit) Validate ¶

func (d Deposit) Validate() error

Validate performs a basic validation of the deposit fields.

func (*Deposit) XXX_DiscardUnknown ¶

func (m *Deposit) XXX_DiscardUnknown()

func (*Deposit) XXX_Marshal ¶

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

func (*Deposit) XXX_Merge ¶

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

func (*Deposit) XXX_Size ¶

func (m *Deposit) XXX_Size() int

func (*Deposit) XXX_Unmarshal ¶

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 sdkmath.Int)

SumCollateral returns the total amount of collateral in the input deposits

func (Deposits) Validate ¶

func (ds Deposits) Validate() error

Validate validates each deposit

type GenesisAccumulationTime ¶

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 ¶

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

NewGenesisAccumulationTime returns a new GenesisAccumulationTime

func (*GenesisAccumulationTime) Descriptor ¶

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

func (*GenesisAccumulationTime) GetCollateralType ¶

func (m *GenesisAccumulationTime) GetCollateralType() string

func (*GenesisAccumulationTime) GetPreviousAccumulationTime ¶

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

func (*GenesisAccumulationTime) Marshal ¶

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

func (*GenesisAccumulationTime) MarshalTo ¶

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

func (*GenesisAccumulationTime) MarshalToSizedBuffer ¶

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

func (*GenesisAccumulationTime) ProtoMessage ¶

func (*GenesisAccumulationTime) ProtoMessage()

func (*GenesisAccumulationTime) Reset ¶

func (m *GenesisAccumulationTime) Reset()

func (*GenesisAccumulationTime) Size ¶

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

func (*GenesisAccumulationTime) String ¶

func (m *GenesisAccumulationTime) String() string

func (*GenesisAccumulationTime) Unmarshal ¶

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

func (GenesisAccumulationTime) Validate ¶

func (gat GenesisAccumulationTime) Validate() error

Validate performs validation of GenesisAccumulationTime

func (*GenesisAccumulationTime) XXX_DiscardUnknown ¶

func (m *GenesisAccumulationTime) XXX_DiscardUnknown()

func (*GenesisAccumulationTime) XXX_Marshal ¶

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

func (*GenesisAccumulationTime) XXX_Merge ¶

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

func (*GenesisAccumulationTime) XXX_Size ¶

func (m *GenesisAccumulationTime) XXX_Size() int

func (*GenesisAccumulationTime) XXX_Unmarshal ¶

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

type GenesisAccumulationTimes ¶

type GenesisAccumulationTimes []GenesisAccumulationTime

GenesisAccumulationTimes slice of GenesisAccumulationTime

func (GenesisAccumulationTimes) Validate ¶

func (gats GenesisAccumulationTimes) Validate() error

Validate performs validation of GenesisAccumulationTimes

type GenesisState ¶

type GenesisState struct {
	// params 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 ¶

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 ¶

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

func (*GenesisState) GetCDPs ¶

func (m *GenesisState) GetCDPs() CDPs

func (*GenesisState) GetDebtDenom ¶

func (m *GenesisState) GetDebtDenom() string

func (*GenesisState) GetDeposits ¶

func (m *GenesisState) GetDeposits() Deposits

func (*GenesisState) GetGovDenom ¶

func (m *GenesisState) GetGovDenom() string

func (*GenesisState) GetParams ¶

func (m *GenesisState) GetParams() Params

func (*GenesisState) GetPreviousAccumulationTimes ¶

func (m *GenesisState) GetPreviousAccumulationTimes() GenesisAccumulationTimes

func (*GenesisState) GetStartingCdpID ¶

func (m *GenesisState) GetStartingCdpID() uint64

func (*GenesisState) GetTotalPrincipals ¶

func (m *GenesisState) GetTotalPrincipals() GenesisTotalPrincipals

func (*GenesisState) Marshal ¶

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

func (*GenesisState) MarshalTo ¶

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

func (*GenesisState) MarshalToSizedBuffer ¶

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

func (*GenesisState) ProtoMessage ¶

func (*GenesisState) ProtoMessage()

func (*GenesisState) Reset ¶

func (m *GenesisState) Reset()

func (*GenesisState) Size ¶

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

func (*GenesisState) String ¶

func (m *GenesisState) String() string

func (*GenesisState) Unmarshal ¶

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

func (GenesisState) Validate ¶

func (gs GenesisState) Validate() error

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

func (*GenesisState) XXX_DiscardUnknown ¶

func (m *GenesisState) XXX_DiscardUnknown()

func (*GenesisState) XXX_Marshal ¶

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

func (*GenesisState) XXX_Merge ¶

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

func (*GenesisState) XXX_Size ¶

func (m *GenesisState) XXX_Size() int

func (*GenesisState) XXX_Unmarshal ¶

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

type GenesisTotalPrincipal ¶

type GenesisTotalPrincipal struct {
	CollateralType string                                 `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 ¶

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

NewGenesisTotalPrincipal returns a new GenesisTotalPrincipal

func (*GenesisTotalPrincipal) Descriptor ¶

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

func (*GenesisTotalPrincipal) GetCollateralType ¶

func (m *GenesisTotalPrincipal) GetCollateralType() string

func (*GenesisTotalPrincipal) Marshal ¶

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

func (*GenesisTotalPrincipal) MarshalTo ¶

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

func (*GenesisTotalPrincipal) MarshalToSizedBuffer ¶

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

func (*GenesisTotalPrincipal) ProtoMessage ¶

func (*GenesisTotalPrincipal) ProtoMessage()

func (*GenesisTotalPrincipal) Reset ¶

func (m *GenesisTotalPrincipal) Reset()

func (*GenesisTotalPrincipal) Size ¶

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

func (*GenesisTotalPrincipal) String ¶

func (m *GenesisTotalPrincipal) String() string

func (*GenesisTotalPrincipal) Unmarshal ¶

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

func (GenesisTotalPrincipal) Validate ¶

func (gtp GenesisTotalPrincipal) Validate() error

Validate performs validation of GenesisTotalPrincipal

func (*GenesisTotalPrincipal) XXX_DiscardUnknown ¶

func (m *GenesisTotalPrincipal) XXX_DiscardUnknown()

func (*GenesisTotalPrincipal) XXX_Marshal ¶

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

func (*GenesisTotalPrincipal) XXX_Merge ¶

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

func (*GenesisTotalPrincipal) XXX_Size ¶

func (m *GenesisTotalPrincipal) XXX_Size() int

func (*GenesisTotalPrincipal) XXX_Unmarshal ¶

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

type GenesisTotalPrincipals ¶

type GenesisTotalPrincipals []GenesisTotalPrincipal

GenesisTotalPrincipals slice of GenesisTotalPrincipal

func (GenesisTotalPrincipals) Validate ¶

func (gtps GenesisTotalPrincipals) Validate() error

Validate performs validation of GenesisTotalPrincipals

type MsgClient ¶

type MsgClient interface {
	// CreateCDP 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 ¶

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 ¶

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

func (*MsgCreateCDP) GetCollateral ¶

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

func (*MsgCreateCDP) GetCollateralType ¶

func (m *MsgCreateCDP) GetCollateralType() string

func (*MsgCreateCDP) GetPrincipal ¶

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

func (*MsgCreateCDP) GetSender ¶

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 ¶

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

func (*MsgCreateCDP) MarshalTo ¶

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

func (*MsgCreateCDP) MarshalToSizedBuffer ¶

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

func (*MsgCreateCDP) ProtoMessage ¶

func (*MsgCreateCDP) ProtoMessage()

func (*MsgCreateCDP) Reset ¶

func (m *MsgCreateCDP) Reset()

func (MsgCreateCDP) Route ¶

func (msg MsgCreateCDP) Route() string

Route return the message type used for routing the message.

func (*MsgCreateCDP) Size ¶

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

func (*MsgCreateCDP) String ¶

func (m *MsgCreateCDP) String() string

func (MsgCreateCDP) Type ¶

func (msg MsgCreateCDP) Type() string

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

func (*MsgCreateCDP) Unmarshal ¶

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

func (MsgCreateCDP) ValidateBasic ¶

func (msg MsgCreateCDP) ValidateBasic() error

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

func (*MsgCreateCDP) XXX_DiscardUnknown ¶

func (m *MsgCreateCDP) XXX_DiscardUnknown()

func (*MsgCreateCDP) XXX_Marshal ¶

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

func (*MsgCreateCDP) XXX_Merge ¶

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

func (*MsgCreateCDP) XXX_Size ¶

func (m *MsgCreateCDP) XXX_Size() int

func (*MsgCreateCDP) XXX_Unmarshal ¶

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

type MsgCreateCDPResponse ¶

type MsgCreateCDPResponse struct {
	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 ¶

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

func (*MsgCreateCDPResponse) GetCdpID ¶

func (m *MsgCreateCDPResponse) GetCdpID() uint64

func (*MsgCreateCDPResponse) Marshal ¶

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

func (*MsgCreateCDPResponse) MarshalTo ¶

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

func (*MsgCreateCDPResponse) MarshalToSizedBuffer ¶

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

func (*MsgCreateCDPResponse) ProtoMessage ¶

func (*MsgCreateCDPResponse) ProtoMessage()

func (*MsgCreateCDPResponse) Reset ¶

func (m *MsgCreateCDPResponse) Reset()

func (*MsgCreateCDPResponse) Size ¶

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

func (*MsgCreateCDPResponse) String ¶

func (m *MsgCreateCDPResponse) String() string

func (*MsgCreateCDPResponse) Unmarshal ¶

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

func (*MsgCreateCDPResponse) XXX_DiscardUnknown ¶

func (m *MsgCreateCDPResponse) XXX_DiscardUnknown()

func (*MsgCreateCDPResponse) XXX_Marshal ¶

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

func (*MsgCreateCDPResponse) XXX_Merge ¶

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

func (*MsgCreateCDPResponse) XXX_Size ¶

func (m *MsgCreateCDPResponse) XXX_Size() int

func (*MsgCreateCDPResponse) XXX_Unmarshal ¶

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

type MsgDeposit ¶

type MsgDeposit struct {
	Depositor      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 ¶

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

func (*MsgDeposit) GetCollateral ¶

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

func (*MsgDeposit) GetCollateralType ¶

func (m *MsgDeposit) GetCollateralType() string

func (*MsgDeposit) GetDepositor ¶

func (m *MsgDeposit) GetDepositor() string

func (*MsgDeposit) GetOwner ¶

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 ¶

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

func (*MsgDeposit) MarshalTo ¶

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

func (*MsgDeposit) MarshalToSizedBuffer ¶

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

func (*MsgDeposit) ProtoMessage ¶

func (*MsgDeposit) ProtoMessage()

func (*MsgDeposit) Reset ¶

func (m *MsgDeposit) Reset()

func (MsgDeposit) Route ¶

func (msg MsgDeposit) Route() string

Route return the message type used for routing the message.

func (*MsgDeposit) Size ¶

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

func (*MsgDeposit) String ¶

func (m *MsgDeposit) String() string

func (MsgDeposit) Type ¶

func (msg MsgDeposit) Type() string

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

func (*MsgDeposit) Unmarshal ¶

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

func (MsgDeposit) ValidateBasic ¶

func (msg MsgDeposit) ValidateBasic() error

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

func (*MsgDeposit) XXX_DiscardUnknown ¶

func (m *MsgDeposit) XXX_DiscardUnknown()

func (*MsgDeposit) XXX_Marshal ¶

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

func (*MsgDeposit) XXX_Merge ¶

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

func (*MsgDeposit) XXX_Size ¶

func (m *MsgDeposit) XXX_Size() int

func (*MsgDeposit) XXX_Unmarshal ¶

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

type MsgDepositResponse ¶

type MsgDepositResponse struct {
}

MsgDepositResponse defines the Msg/Deposit response type.

func (*MsgDepositResponse) Descriptor ¶

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

func (*MsgDepositResponse) Marshal ¶

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

func (*MsgDepositResponse) MarshalTo ¶

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

func (*MsgDepositResponse) MarshalToSizedBuffer ¶

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

func (*MsgDepositResponse) ProtoMessage ¶

func (*MsgDepositResponse) ProtoMessage()

func (*MsgDepositResponse) Reset ¶

func (m *MsgDepositResponse) Reset()

func (*MsgDepositResponse) Size ¶

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

func (*MsgDepositResponse) String ¶

func (m *MsgDepositResponse) String() string

func (*MsgDepositResponse) Unmarshal ¶

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

func (*MsgDepositResponse) XXX_DiscardUnknown ¶

func (m *MsgDepositResponse) XXX_DiscardUnknown()

func (*MsgDepositResponse) XXX_Marshal ¶

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

func (*MsgDepositResponse) XXX_Merge ¶

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

func (*MsgDepositResponse) XXX_Size ¶

func (m *MsgDepositResponse) XXX_Size() int

func (*MsgDepositResponse) XXX_Unmarshal ¶

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

type MsgDrawDebt ¶

type MsgDrawDebt struct {
	Sender         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 ¶

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

func (*MsgDrawDebt) GetCollateralType ¶

func (m *MsgDrawDebt) GetCollateralType() string

func (*MsgDrawDebt) GetPrincipal ¶

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

func (*MsgDrawDebt) GetSender ¶

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 ¶

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

func (*MsgDrawDebt) MarshalTo ¶

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

func (*MsgDrawDebt) MarshalToSizedBuffer ¶

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

func (*MsgDrawDebt) ProtoMessage ¶

func (*MsgDrawDebt) ProtoMessage()

func (*MsgDrawDebt) Reset ¶

func (m *MsgDrawDebt) Reset()

func (MsgDrawDebt) Route ¶

func (msg MsgDrawDebt) Route() string

Route return the message type used for routing the message.

func (*MsgDrawDebt) Size ¶

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

func (*MsgDrawDebt) String ¶

func (m *MsgDrawDebt) String() string

func (MsgDrawDebt) Type ¶

func (msg MsgDrawDebt) Type() string

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

func (*MsgDrawDebt) Unmarshal ¶

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

func (MsgDrawDebt) ValidateBasic ¶

func (msg MsgDrawDebt) ValidateBasic() error

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

func (*MsgDrawDebt) XXX_DiscardUnknown ¶

func (m *MsgDrawDebt) XXX_DiscardUnknown()

func (*MsgDrawDebt) XXX_Marshal ¶

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

func (*MsgDrawDebt) XXX_Merge ¶

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

func (*MsgDrawDebt) XXX_Size ¶

func (m *MsgDrawDebt) XXX_Size() int

func (*MsgDrawDebt) XXX_Unmarshal ¶

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

type MsgDrawDebtResponse ¶

type MsgDrawDebtResponse struct {
}

MsgDrawDebtResponse defines the Msg/DrawDebt response type.

func (*MsgDrawDebtResponse) Descriptor ¶

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

func (*MsgDrawDebtResponse) Marshal ¶

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

func (*MsgDrawDebtResponse) MarshalTo ¶

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

func (*MsgDrawDebtResponse) MarshalToSizedBuffer ¶

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

func (*MsgDrawDebtResponse) ProtoMessage ¶

func (*MsgDrawDebtResponse) ProtoMessage()

func (*MsgDrawDebtResponse) Reset ¶

func (m *MsgDrawDebtResponse) Reset()

func (*MsgDrawDebtResponse) Size ¶

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

func (*MsgDrawDebtResponse) String ¶

func (m *MsgDrawDebtResponse) String() string

func (*MsgDrawDebtResponse) Unmarshal ¶

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

func (*MsgDrawDebtResponse) XXX_DiscardUnknown ¶

func (m *MsgDrawDebtResponse) XXX_DiscardUnknown()

func (*MsgDrawDebtResponse) XXX_Marshal ¶

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

func (*MsgDrawDebtResponse) XXX_Merge ¶

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

func (*MsgDrawDebtResponse) XXX_Size ¶

func (m *MsgDrawDebtResponse) XXX_Size() int

func (*MsgDrawDebtResponse) XXX_Unmarshal ¶

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

type MsgLiquidate ¶

type MsgLiquidate struct {
	Keeper         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 ¶

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

NewMsgLiquidate returns a new MsgLiquidate

func (*MsgLiquidate) Descriptor ¶

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

func (*MsgLiquidate) GetBorrower ¶

func (m *MsgLiquidate) GetBorrower() string

func (*MsgLiquidate) GetCollateralType ¶

func (m *MsgLiquidate) GetCollateralType() string

func (*MsgLiquidate) GetKeeper ¶

func (m *MsgLiquidate) GetKeeper() string

func (MsgLiquidate) GetSignBytes ¶

func (msg MsgLiquidate) GetSignBytes() []byte

GetSignBytes gets the canonical byte representation of the Msg.

func (MsgLiquidate) GetSigners ¶

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

GetSigners returns the addresses of signers that must sign.

func (*MsgLiquidate) Marshal ¶

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

func (*MsgLiquidate) MarshalTo ¶

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

func (*MsgLiquidate) MarshalToSizedBuffer ¶

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

func (*MsgLiquidate) ProtoMessage ¶

func (*MsgLiquidate) ProtoMessage()

func (*MsgLiquidate) Reset ¶

func (m *MsgLiquidate) Reset()

func (MsgLiquidate) Route ¶

func (msg MsgLiquidate) Route() string

Route return the message type used for routing the message.

func (*MsgLiquidate) Size ¶

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

func (*MsgLiquidate) String ¶

func (m *MsgLiquidate) String() string

func (MsgLiquidate) Type ¶

func (msg MsgLiquidate) Type() string

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

func (*MsgLiquidate) Unmarshal ¶

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

func (MsgLiquidate) ValidateBasic ¶

func (msg MsgLiquidate) ValidateBasic() error

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

func (*MsgLiquidate) XXX_DiscardUnknown ¶

func (m *MsgLiquidate) XXX_DiscardUnknown()

func (*MsgLiquidate) XXX_Marshal ¶

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

func (*MsgLiquidate) XXX_Merge ¶

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

func (*MsgLiquidate) XXX_Size ¶

func (m *MsgLiquidate) XXX_Size() int

func (*MsgLiquidate) XXX_Unmarshal ¶

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

type MsgLiquidateResponse ¶

type MsgLiquidateResponse struct {
}

MsgLiquidateResponse defines the Msg/Liquidate response type.

func (*MsgLiquidateResponse) Descriptor ¶

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

func (*MsgLiquidateResponse) Marshal ¶

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

func (*MsgLiquidateResponse) MarshalTo ¶

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

func (*MsgLiquidateResponse) MarshalToSizedBuffer ¶

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

func (*MsgLiquidateResponse) ProtoMessage ¶

func (*MsgLiquidateResponse) ProtoMessage()

func (*MsgLiquidateResponse) Reset ¶

func (m *MsgLiquidateResponse) Reset()

func (*MsgLiquidateResponse) Size ¶

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

func (*MsgLiquidateResponse) String ¶

func (m *MsgLiquidateResponse) String() string

func (*MsgLiquidateResponse) Unmarshal ¶

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

func (*MsgLiquidateResponse) XXX_DiscardUnknown ¶

func (m *MsgLiquidateResponse) XXX_DiscardUnknown()

func (*MsgLiquidateResponse) XXX_Marshal ¶

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

func (*MsgLiquidateResponse) XXX_Merge ¶

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

func (*MsgLiquidateResponse) XXX_Size ¶

func (m *MsgLiquidateResponse) XXX_Size() int

func (*MsgLiquidateResponse) XXX_Unmarshal ¶

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

type MsgRepayDebt ¶

type MsgRepayDebt struct {
	Sender         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 ¶

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

func (*MsgRepayDebt) GetCollateralType ¶

func (m *MsgRepayDebt) GetCollateralType() string

func (*MsgRepayDebt) GetPayment ¶

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

func (*MsgRepayDebt) GetSender ¶

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 ¶

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

func (*MsgRepayDebt) MarshalTo ¶

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

func (*MsgRepayDebt) MarshalToSizedBuffer ¶

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

func (*MsgRepayDebt) ProtoMessage ¶

func (*MsgRepayDebt) ProtoMessage()

func (*MsgRepayDebt) Reset ¶

func (m *MsgRepayDebt) Reset()

func (MsgRepayDebt) Route ¶

func (msg MsgRepayDebt) Route() string

Route return the message type used for routing the message.

func (*MsgRepayDebt) Size ¶

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

func (*MsgRepayDebt) String ¶

func (m *MsgRepayDebt) String() string

func (MsgRepayDebt) Type ¶

func (msg MsgRepayDebt) Type() string

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

func (*MsgRepayDebt) Unmarshal ¶

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

func (MsgRepayDebt) ValidateBasic ¶

func (msg MsgRepayDebt) ValidateBasic() error

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

func (*MsgRepayDebt) XXX_DiscardUnknown ¶

func (m *MsgRepayDebt) XXX_DiscardUnknown()

func (*MsgRepayDebt) XXX_Marshal ¶

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

func (*MsgRepayDebt) XXX_Merge ¶

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

func (*MsgRepayDebt) XXX_Size ¶

func (m *MsgRepayDebt) XXX_Size() int

func (*MsgRepayDebt) XXX_Unmarshal ¶

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

type MsgRepayDebtResponse ¶

type MsgRepayDebtResponse struct {
}

MsgRepayDebtResponse defines the Msg/RepayDebt response type.

func (*MsgRepayDebtResponse) Descriptor ¶

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

func (*MsgRepayDebtResponse) Marshal ¶

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

func (*MsgRepayDebtResponse) MarshalTo ¶

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

func (*MsgRepayDebtResponse) MarshalToSizedBuffer ¶

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

func (*MsgRepayDebtResponse) ProtoMessage ¶

func (*MsgRepayDebtResponse) ProtoMessage()

func (*MsgRepayDebtResponse) Reset ¶

func (m *MsgRepayDebtResponse) Reset()

func (*MsgRepayDebtResponse) Size ¶

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

func (*MsgRepayDebtResponse) String ¶

func (m *MsgRepayDebtResponse) String() string

func (*MsgRepayDebtResponse) Unmarshal ¶

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

func (*MsgRepayDebtResponse) XXX_DiscardUnknown ¶

func (m *MsgRepayDebtResponse) XXX_DiscardUnknown()

func (*MsgRepayDebtResponse) XXX_Marshal ¶

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

func (*MsgRepayDebtResponse) XXX_Merge ¶

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

func (*MsgRepayDebtResponse) XXX_Size ¶

func (m *MsgRepayDebtResponse) XXX_Size() int

func (*MsgRepayDebtResponse) XXX_Unmarshal ¶

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

type MsgServer ¶

type MsgServer interface {
	// CreateCDP 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 ¶

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

func (*MsgWithdraw) GetCollateral ¶

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

func (*MsgWithdraw) GetCollateralType ¶

func (m *MsgWithdraw) GetCollateralType() string

func (*MsgWithdraw) GetDepositor ¶

func (m *MsgWithdraw) GetDepositor() string

func (*MsgWithdraw) GetOwner ¶

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 ¶

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

func (*MsgWithdraw) MarshalTo ¶

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

func (*MsgWithdraw) MarshalToSizedBuffer ¶

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

func (*MsgWithdraw) ProtoMessage ¶

func (*MsgWithdraw) ProtoMessage()

func (*MsgWithdraw) Reset ¶

func (m *MsgWithdraw) Reset()

func (MsgWithdraw) Route ¶

func (msg MsgWithdraw) Route() string

Route return the message type used for routing the message.

func (*MsgWithdraw) Size ¶

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

func (*MsgWithdraw) String ¶

func (m *MsgWithdraw) String() string

func (MsgWithdraw) Type ¶

func (msg MsgWithdraw) Type() string

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

func (*MsgWithdraw) Unmarshal ¶

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

func (MsgWithdraw) ValidateBasic ¶

func (msg MsgWithdraw) ValidateBasic() error

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

func (*MsgWithdraw) XXX_DiscardUnknown ¶

func (m *MsgWithdraw) XXX_DiscardUnknown()

func (*MsgWithdraw) XXX_Marshal ¶

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

func (*MsgWithdraw) XXX_Merge ¶

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

func (*MsgWithdraw) XXX_Size ¶

func (m *MsgWithdraw) XXX_Size() int

func (*MsgWithdraw) XXX_Unmarshal ¶

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

type MsgWithdrawResponse ¶

type MsgWithdrawResponse struct {
}

MsgWithdrawResponse defines the Msg/Withdraw response type.

func (*MsgWithdrawResponse) Descriptor ¶

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

func (*MsgWithdrawResponse) Marshal ¶

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

func (*MsgWithdrawResponse) MarshalTo ¶

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

func (*MsgWithdrawResponse) MarshalToSizedBuffer ¶

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

func (*MsgWithdrawResponse) ProtoMessage ¶

func (*MsgWithdrawResponse) ProtoMessage()

func (*MsgWithdrawResponse) Reset ¶

func (m *MsgWithdrawResponse) Reset()

func (*MsgWithdrawResponse) Size ¶

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

func (*MsgWithdrawResponse) String ¶

func (m *MsgWithdrawResponse) String() string

func (*MsgWithdrawResponse) Unmarshal ¶

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

func (*MsgWithdrawResponse) XXX_DiscardUnknown ¶

func (m *MsgWithdrawResponse) XXX_DiscardUnknown()

func (*MsgWithdrawResponse) XXX_Marshal ¶

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

func (*MsgWithdrawResponse) XXX_Merge ¶

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

func (*MsgWithdrawResponse) XXX_Size ¶

func (m *MsgWithdrawResponse) XXX_Size() int

func (*MsgWithdrawResponse) XXX_Unmarshal ¶

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

type MultiCDPHooks ¶

type MultiCDPHooks []CDPHooks

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

func NewMultiCDPHooks ¶

func NewMultiCDPHooks(hooks ...CDPHooks) MultiCDPHooks

NewMultiCDPHooks returns a new MultiCDPHooks

func (MultiCDPHooks) AfterCDPCreated ¶

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

AfterCDPCreated runs before a cdp is created

func (MultiCDPHooks) BeforeCDPModified ¶

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

BeforeCDPModified runs before a cdp is modified

type OwnerCDPIndex ¶

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 ¶

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

func (*OwnerCDPIndex) Marshal ¶

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

func (*OwnerCDPIndex) MarshalTo ¶

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

func (*OwnerCDPIndex) MarshalToSizedBuffer ¶

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

func (*OwnerCDPIndex) ProtoMessage ¶

func (*OwnerCDPIndex) ProtoMessage()

func (*OwnerCDPIndex) Reset ¶

func (m *OwnerCDPIndex) Reset()

func (*OwnerCDPIndex) Size ¶

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

func (*OwnerCDPIndex) String ¶

func (m *OwnerCDPIndex) String() string

func (*OwnerCDPIndex) Unmarshal ¶

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

func (*OwnerCDPIndex) XXX_DiscardUnknown ¶

func (m *OwnerCDPIndex) XXX_DiscardUnknown()

func (*OwnerCDPIndex) XXX_Marshal ¶

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

func (*OwnerCDPIndex) XXX_Merge ¶

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

func (*OwnerCDPIndex) XXX_Size ¶

func (m *OwnerCDPIndex) XXX_Size() int

func (*OwnerCDPIndex) XXX_Unmarshal ¶

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 sdkmath.Int, breaker bool,
) Params

NewParams returns a new params object

func (*Params) Descriptor ¶

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

func (*Params) GetCircuitBreaker ¶

func (m *Params) GetCircuitBreaker() bool

func (*Params) GetCollateralParams ¶

func (m *Params) GetCollateralParams() CollateralParams

func (*Params) GetDebtParam ¶

func (m *Params) GetDebtParam() DebtParam

func (*Params) GetGlobalDebtLimit ¶

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

func (*Params) Marshal ¶

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

func (*Params) MarshalTo ¶

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

func (*Params) MarshalToSizedBuffer ¶

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

func (*Params) ParamSetPairs ¶

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

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

func (*Params) ProtoMessage ¶

func (*Params) ProtoMessage()

func (*Params) Reset ¶

func (m *Params) Reset()

func (*Params) Size ¶

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

func (*Params) String ¶

func (m *Params) String() string

func (*Params) Unmarshal ¶

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 ¶

func (m *Params) XXX_DiscardUnknown()

func (*Params) XXX_Marshal ¶

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

func (*Params) XXX_Merge ¶

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

func (*Params) XXX_Size ¶

func (m *Params) XXX_Size() int

func (*Params) XXX_Unmarshal ¶

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

type 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 ¶

type QueryAccountsRequest struct {
}

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

func (*QueryAccountsRequest) Descriptor ¶

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

func (*QueryAccountsRequest) Marshal ¶

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

func (*QueryAccountsRequest) MarshalTo ¶

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

func (*QueryAccountsRequest) MarshalToSizedBuffer ¶

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

func (*QueryAccountsRequest) ProtoMessage ¶

func (*QueryAccountsRequest) ProtoMessage()

func (*QueryAccountsRequest) Reset ¶

func (m *QueryAccountsRequest) Reset()

func (*QueryAccountsRequest) Size ¶

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

func (*QueryAccountsRequest) String ¶

func (m *QueryAccountsRequest) String() string

func (*QueryAccountsRequest) Unmarshal ¶

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

func (*QueryAccountsRequest) XXX_DiscardUnknown ¶

func (m *QueryAccountsRequest) XXX_DiscardUnknown()

func (*QueryAccountsRequest) XXX_Marshal ¶

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

func (*QueryAccountsRequest) XXX_Merge ¶

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

func (*QueryAccountsRequest) XXX_Size ¶

func (m *QueryAccountsRequest) XXX_Size() int

func (*QueryAccountsRequest) XXX_Unmarshal ¶

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

type QueryAccountsResponse ¶

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 ¶

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

func (*QueryAccountsResponse) GetAccounts ¶

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

func (*QueryAccountsResponse) Marshal ¶

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

func (*QueryAccountsResponse) MarshalTo ¶

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

func (*QueryAccountsResponse) MarshalToSizedBuffer ¶

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

func (*QueryAccountsResponse) ProtoMessage ¶

func (*QueryAccountsResponse) ProtoMessage()

func (*QueryAccountsResponse) Reset ¶

func (m *QueryAccountsResponse) Reset()

func (*QueryAccountsResponse) Size ¶

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

func (*QueryAccountsResponse) String ¶

func (m *QueryAccountsResponse) String() string

func (*QueryAccountsResponse) Unmarshal ¶

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

func (*QueryAccountsResponse) XXX_DiscardUnknown ¶

func (m *QueryAccountsResponse) XXX_DiscardUnknown()

func (*QueryAccountsResponse) XXX_Marshal ¶

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

func (*QueryAccountsResponse) XXX_Merge ¶

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

func (*QueryAccountsResponse) XXX_Size ¶

func (m *QueryAccountsResponse) XXX_Size() int

func (*QueryAccountsResponse) XXX_Unmarshal ¶

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 ¶

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 ¶

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

func (*QueryCdpRequest) GetCollateralType ¶

func (m *QueryCdpRequest) GetCollateralType() string

func (*QueryCdpRequest) GetOwner ¶

func (m *QueryCdpRequest) GetOwner() string

func (*QueryCdpRequest) Marshal ¶

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

func (*QueryCdpRequest) MarshalTo ¶

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

func (*QueryCdpRequest) MarshalToSizedBuffer ¶

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

func (*QueryCdpRequest) ProtoMessage ¶

func (*QueryCdpRequest) ProtoMessage()

func (*QueryCdpRequest) Reset ¶

func (m *QueryCdpRequest) Reset()

func (*QueryCdpRequest) Size ¶

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

func (*QueryCdpRequest) String ¶

func (m *QueryCdpRequest) String() string

func (*QueryCdpRequest) Unmarshal ¶

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

func (*QueryCdpRequest) XXX_DiscardUnknown ¶

func (m *QueryCdpRequest) XXX_DiscardUnknown()

func (*QueryCdpRequest) XXX_Marshal ¶

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

func (*QueryCdpRequest) XXX_Merge ¶

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

func (*QueryCdpRequest) XXX_Size ¶

func (m *QueryCdpRequest) XXX_Size() int

func (*QueryCdpRequest) XXX_Unmarshal ¶

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

type QueryCdpResponse ¶

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 ¶

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

func (*QueryCdpResponse) GetCdp ¶

func (m *QueryCdpResponse) GetCdp() CDPResponse

func (*QueryCdpResponse) Marshal ¶

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

func (*QueryCdpResponse) MarshalTo ¶

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

func (*QueryCdpResponse) MarshalToSizedBuffer ¶

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

func (*QueryCdpResponse) ProtoMessage ¶

func (*QueryCdpResponse) ProtoMessage()

func (*QueryCdpResponse) Reset ¶

func (m *QueryCdpResponse) Reset()

func (*QueryCdpResponse) Size ¶

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

func (*QueryCdpResponse) String ¶

func (m *QueryCdpResponse) String() string

func (*QueryCdpResponse) Unmarshal ¶

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

func (*QueryCdpResponse) XXX_DiscardUnknown ¶

func (m *QueryCdpResponse) XXX_DiscardUnknown()

func (*QueryCdpResponse) XXX_Marshal ¶

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

func (*QueryCdpResponse) XXX_Merge ¶

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

func (*QueryCdpResponse) XXX_Size ¶

func (m *QueryCdpResponse) XXX_Size() int

func (*QueryCdpResponse) XXX_Unmarshal ¶

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

type QueryCdpsByCollateralTypeParams ¶

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

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

func NewQueryCdpsByCollateralTypeParams ¶

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 ¶

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 ¶

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

func (*QueryCdpsRequest) GetCollateralType ¶

func (m *QueryCdpsRequest) GetCollateralType() string

func (*QueryCdpsRequest) GetID ¶

func (m *QueryCdpsRequest) GetID() uint64

func (*QueryCdpsRequest) GetOwner ¶

func (m *QueryCdpsRequest) GetOwner() string

func (*QueryCdpsRequest) GetPagination ¶

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

func (*QueryCdpsRequest) GetRatio ¶

func (m *QueryCdpsRequest) GetRatio() string

func (*QueryCdpsRequest) Marshal ¶

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

func (*QueryCdpsRequest) MarshalTo ¶

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

func (*QueryCdpsRequest) MarshalToSizedBuffer ¶

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

func (*QueryCdpsRequest) ProtoMessage ¶

func (*QueryCdpsRequest) ProtoMessage()

func (*QueryCdpsRequest) Reset ¶

func (m *QueryCdpsRequest) Reset()

func (*QueryCdpsRequest) Size ¶

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

func (*QueryCdpsRequest) String ¶

func (m *QueryCdpsRequest) String() string

func (*QueryCdpsRequest) Unmarshal ¶

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

func (*QueryCdpsRequest) XXX_DiscardUnknown ¶

func (m *QueryCdpsRequest) XXX_DiscardUnknown()

func (*QueryCdpsRequest) XXX_Marshal ¶

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

func (*QueryCdpsRequest) XXX_Merge ¶

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

func (*QueryCdpsRequest) XXX_Size ¶

func (m *QueryCdpsRequest) XXX_Size() int

func (*QueryCdpsRequest) XXX_Unmarshal ¶

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

type QueryCdpsResponse ¶

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 ¶

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

func (*QueryCdpsResponse) GetCdps ¶

func (m *QueryCdpsResponse) GetCdps() CDPResponses

func (*QueryCdpsResponse) GetPagination ¶

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

func (*QueryCdpsResponse) Marshal ¶

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

func (*QueryCdpsResponse) MarshalTo ¶

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

func (*QueryCdpsResponse) MarshalToSizedBuffer ¶

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

func (*QueryCdpsResponse) ProtoMessage ¶

func (*QueryCdpsResponse) ProtoMessage()

func (*QueryCdpsResponse) Reset ¶

func (m *QueryCdpsResponse) Reset()

func (*QueryCdpsResponse) Size ¶

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

func (*QueryCdpsResponse) String ¶

func (m *QueryCdpsResponse) String() string

func (*QueryCdpsResponse) Unmarshal ¶

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

func (*QueryCdpsResponse) XXX_DiscardUnknown ¶

func (m *QueryCdpsResponse) XXX_DiscardUnknown()

func (*QueryCdpsResponse) XXX_Marshal ¶

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

func (*QueryCdpsResponse) XXX_Merge ¶

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

func (*QueryCdpsResponse) XXX_Size ¶

func (m *QueryCdpsResponse) XXX_Size() int

func (*QueryCdpsResponse) XXX_Unmarshal ¶

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

type QueryClient ¶

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 ¶

func NewQueryClient(cc grpc1.ClientConn) QueryClient

type QueryDepositsRequest ¶

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 ¶

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

func (*QueryDepositsRequest) GetCollateralType ¶

func (m *QueryDepositsRequest) GetCollateralType() string

func (*QueryDepositsRequest) GetOwner ¶

func (m *QueryDepositsRequest) GetOwner() string

func (*QueryDepositsRequest) Marshal ¶

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

func (*QueryDepositsRequest) MarshalTo ¶

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

func (*QueryDepositsRequest) MarshalToSizedBuffer ¶

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

func (*QueryDepositsRequest) ProtoMessage ¶

func (*QueryDepositsRequest) ProtoMessage()

func (*QueryDepositsRequest) Reset ¶

func (m *QueryDepositsRequest) Reset()

func (*QueryDepositsRequest) Size ¶

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

func (*QueryDepositsRequest) String ¶

func (m *QueryDepositsRequest) String() string

func (*QueryDepositsRequest) Unmarshal ¶

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

func (*QueryDepositsRequest) XXX_DiscardUnknown ¶

func (m *QueryDepositsRequest) XXX_DiscardUnknown()

func (*QueryDepositsRequest) XXX_Marshal ¶

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

func (*QueryDepositsRequest) XXX_Merge ¶

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

func (*QueryDepositsRequest) XXX_Size ¶

func (m *QueryDepositsRequest) XXX_Size() int

func (*QueryDepositsRequest) XXX_Unmarshal ¶

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

type QueryDepositsResponse ¶

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 ¶

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

func (*QueryDepositsResponse) GetDeposits ¶

func (m *QueryDepositsResponse) GetDeposits() Deposits

func (*QueryDepositsResponse) Marshal ¶

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

func (*QueryDepositsResponse) MarshalTo ¶

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

func (*QueryDepositsResponse) MarshalToSizedBuffer ¶

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

func (*QueryDepositsResponse) ProtoMessage ¶

func (*QueryDepositsResponse) ProtoMessage()

func (*QueryDepositsResponse) Reset ¶

func (m *QueryDepositsResponse) Reset()

func (*QueryDepositsResponse) Size ¶

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

func (*QueryDepositsResponse) String ¶

func (m *QueryDepositsResponse) String() string

func (*QueryDepositsResponse) Unmarshal ¶

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

func (*QueryDepositsResponse) XXX_DiscardUnknown ¶

func (m *QueryDepositsResponse) XXX_DiscardUnknown()

func (*QueryDepositsResponse) XXX_Marshal ¶

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

func (*QueryDepositsResponse) XXX_Merge ¶

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

func (*QueryDepositsResponse) XXX_Size ¶

func (m *QueryDepositsResponse) XXX_Size() int

func (*QueryDepositsResponse) XXX_Unmarshal ¶

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

type QueryGetTotalCollateralParams ¶

type QueryGetTotalCollateralParams struct {
	CollateralType string
}

QueryGetTotalCollateralParams params for query /cdp/totalCollateral

func NewQueryGetTotalCollateralParams ¶

func NewQueryGetTotalCollateralParams(collateralType string) QueryGetTotalCollateralParams

NewQueryGetTotalCollateralParams returns QueryGetTotalCollateralParams

type QueryGetTotalPrincipalParams ¶

type QueryGetTotalPrincipalParams struct {
	CollateralType string
}

QueryGetTotalPrincipalParams params for query /cdp/totalPrincipal

func NewQueryGetTotalPrincipalParams ¶

func NewQueryGetTotalPrincipalParams(collateralType string) QueryGetTotalPrincipalParams

NewQueryGetTotalPrincipalParams returns QueryGetTotalPrincipalParams

type QueryParamsRequest ¶

type QueryParamsRequest struct {
}

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

func (*QueryParamsRequest) Descriptor ¶

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

func (*QueryParamsRequest) Marshal ¶

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

func (*QueryParamsRequest) MarshalTo ¶

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

func (*QueryParamsRequest) MarshalToSizedBuffer ¶

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

func (*QueryParamsRequest) ProtoMessage ¶

func (*QueryParamsRequest) ProtoMessage()

func (*QueryParamsRequest) Reset ¶

func (m *QueryParamsRequest) Reset()

func (*QueryParamsRequest) Size ¶

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

func (*QueryParamsRequest) String ¶

func (m *QueryParamsRequest) String() string

func (*QueryParamsRequest) Unmarshal ¶

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

func (*QueryParamsRequest) XXX_DiscardUnknown ¶

func (m *QueryParamsRequest) XXX_DiscardUnknown()

func (*QueryParamsRequest) XXX_Marshal ¶

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

func (*QueryParamsRequest) XXX_Merge ¶

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

func (*QueryParamsRequest) XXX_Size ¶

func (m *QueryParamsRequest) XXX_Size() int

func (*QueryParamsRequest) XXX_Unmarshal ¶

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

type QueryParamsResponse ¶

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

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

func (*QueryParamsResponse) Descriptor ¶

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

func (*QueryParamsResponse) Marshal ¶

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

func (*QueryParamsResponse) MarshalTo ¶

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

func (*QueryParamsResponse) MarshalToSizedBuffer ¶

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

func (*QueryParamsResponse) ProtoMessage ¶

func (*QueryParamsResponse) ProtoMessage()

func (*QueryParamsResponse) Reset ¶

func (m *QueryParamsResponse) Reset()

func (*QueryParamsResponse) Size ¶

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

func (*QueryParamsResponse) String ¶

func (m *QueryParamsResponse) String() string

func (*QueryParamsResponse) Unmarshal ¶

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

func (*QueryParamsResponse) XXX_DiscardUnknown ¶

func (m *QueryParamsResponse) XXX_DiscardUnknown()

func (*QueryParamsResponse) XXX_Marshal ¶

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

func (*QueryParamsResponse) XXX_Merge ¶

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

func (*QueryParamsResponse) XXX_Size ¶

func (m *QueryParamsResponse) XXX_Size() int

func (*QueryParamsResponse) XXX_Unmarshal ¶

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

type QueryServer ¶

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 ¶

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 ¶

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

func (*QueryTotalCollateralRequest) GetCollateralType ¶

func (m *QueryTotalCollateralRequest) GetCollateralType() string

func (*QueryTotalCollateralRequest) Marshal ¶

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

func (*QueryTotalCollateralRequest) MarshalTo ¶

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

func (*QueryTotalCollateralRequest) MarshalToSizedBuffer ¶

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

func (*QueryTotalCollateralRequest) ProtoMessage ¶

func (*QueryTotalCollateralRequest) ProtoMessage()

func (*QueryTotalCollateralRequest) Reset ¶

func (m *QueryTotalCollateralRequest) Reset()

func (*QueryTotalCollateralRequest) Size ¶

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

func (*QueryTotalCollateralRequest) String ¶

func (m *QueryTotalCollateralRequest) String() string

func (*QueryTotalCollateralRequest) Unmarshal ¶

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

func (*QueryTotalCollateralRequest) XXX_DiscardUnknown ¶

func (m *QueryTotalCollateralRequest) XXX_DiscardUnknown()

func (*QueryTotalCollateralRequest) XXX_Marshal ¶

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

func (*QueryTotalCollateralRequest) XXX_Merge ¶

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

func (*QueryTotalCollateralRequest) XXX_Size ¶

func (m *QueryTotalCollateralRequest) XXX_Size() int

func (*QueryTotalCollateralRequest) XXX_Unmarshal ¶

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

type QueryTotalCollateralResponse ¶

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 ¶

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

func (*QueryTotalCollateralResponse) GetTotalCollateral ¶

func (m *QueryTotalCollateralResponse) GetTotalCollateral() TotalCollaterals

func (*QueryTotalCollateralResponse) Marshal ¶

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

func (*QueryTotalCollateralResponse) MarshalTo ¶

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

func (*QueryTotalCollateralResponse) MarshalToSizedBuffer ¶

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

func (*QueryTotalCollateralResponse) ProtoMessage ¶

func (*QueryTotalCollateralResponse) ProtoMessage()

func (*QueryTotalCollateralResponse) Reset ¶

func (m *QueryTotalCollateralResponse) Reset()

func (*QueryTotalCollateralResponse) Size ¶

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

func (*QueryTotalCollateralResponse) String ¶

func (*QueryTotalCollateralResponse) Unmarshal ¶

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

func (*QueryTotalCollateralResponse) XXX_DiscardUnknown ¶

func (m *QueryTotalCollateralResponse) XXX_DiscardUnknown()

func (*QueryTotalCollateralResponse) XXX_Marshal ¶

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

func (*QueryTotalCollateralResponse) XXX_Merge ¶

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

func (*QueryTotalCollateralResponse) XXX_Size ¶

func (m *QueryTotalCollateralResponse) XXX_Size() int

func (*QueryTotalCollateralResponse) XXX_Unmarshal ¶

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

type QueryTotalPrincipalRequest ¶

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 ¶

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

func (*QueryTotalPrincipalRequest) GetCollateralType ¶

func (m *QueryTotalPrincipalRequest) GetCollateralType() string

func (*QueryTotalPrincipalRequest) Marshal ¶

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

func (*QueryTotalPrincipalRequest) MarshalTo ¶

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

func (*QueryTotalPrincipalRequest) MarshalToSizedBuffer ¶

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

func (*QueryTotalPrincipalRequest) ProtoMessage ¶

func (*QueryTotalPrincipalRequest) ProtoMessage()

func (*QueryTotalPrincipalRequest) Reset ¶

func (m *QueryTotalPrincipalRequest) Reset()

func (*QueryTotalPrincipalRequest) Size ¶

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

func (*QueryTotalPrincipalRequest) String ¶

func (m *QueryTotalPrincipalRequest) String() string

func (*QueryTotalPrincipalRequest) Unmarshal ¶

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

func (*QueryTotalPrincipalRequest) XXX_DiscardUnknown ¶

func (m *QueryTotalPrincipalRequest) XXX_DiscardUnknown()

func (*QueryTotalPrincipalRequest) XXX_Marshal ¶

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

func (*QueryTotalPrincipalRequest) XXX_Merge ¶

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

func (*QueryTotalPrincipalRequest) XXX_Size ¶

func (m *QueryTotalPrincipalRequest) XXX_Size() int

func (*QueryTotalPrincipalRequest) XXX_Unmarshal ¶

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

type QueryTotalPrincipalResponse ¶

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 ¶

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

func (*QueryTotalPrincipalResponse) GetTotalPrincipal ¶

func (m *QueryTotalPrincipalResponse) GetTotalPrincipal() TotalPrincipals

func (*QueryTotalPrincipalResponse) Marshal ¶

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

func (*QueryTotalPrincipalResponse) MarshalTo ¶

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

func (*QueryTotalPrincipalResponse) MarshalToSizedBuffer ¶

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

func (*QueryTotalPrincipalResponse) ProtoMessage ¶

func (*QueryTotalPrincipalResponse) ProtoMessage()

func (*QueryTotalPrincipalResponse) Reset ¶

func (m *QueryTotalPrincipalResponse) Reset()

func (*QueryTotalPrincipalResponse) Size ¶

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

func (*QueryTotalPrincipalResponse) String ¶

func (m *QueryTotalPrincipalResponse) String() string

func (*QueryTotalPrincipalResponse) Unmarshal ¶

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

func (*QueryTotalPrincipalResponse) XXX_DiscardUnknown ¶

func (m *QueryTotalPrincipalResponse) XXX_DiscardUnknown()

func (*QueryTotalPrincipalResponse) XXX_Marshal ¶

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

func (*QueryTotalPrincipalResponse) XXX_Merge ¶

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

func (*QueryTotalPrincipalResponse) XXX_Size ¶

func (m *QueryTotalPrincipalResponse) XXX_Size() int

func (*QueryTotalPrincipalResponse) XXX_Unmarshal ¶

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

type TotalCollateral ¶

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 ¶

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

TotalCollateral returns a new TotalCollateral

func (*TotalCollateral) Descriptor ¶

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

func (*TotalCollateral) Marshal ¶

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

func (*TotalCollateral) MarshalTo ¶

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

func (*TotalCollateral) MarshalToSizedBuffer ¶

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

func (*TotalCollateral) ProtoMessage ¶

func (*TotalCollateral) ProtoMessage()

func (*TotalCollateral) Reset ¶

func (m *TotalCollateral) Reset()

func (*TotalCollateral) Size ¶

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

func (*TotalCollateral) String ¶

func (m *TotalCollateral) String() string

func (*TotalCollateral) Unmarshal ¶

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

func (*TotalCollateral) XXX_DiscardUnknown ¶

func (m *TotalCollateral) XXX_DiscardUnknown()

func (*TotalCollateral) XXX_Marshal ¶

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

func (*TotalCollateral) XXX_Merge ¶

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

func (*TotalCollateral) XXX_Size ¶

func (m *TotalCollateral) XXX_Size() int

func (*TotalCollateral) XXX_Unmarshal ¶

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

type TotalCollaterals ¶

type TotalCollaterals []TotalCollateral

TotalCollaterals a collection of TotalCollateral objects

type TotalPrincipal ¶

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 ¶

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

TotalPrincipal returns a new TotalPrincipal

func (*TotalPrincipal) Descriptor ¶

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

func (*TotalPrincipal) Marshal ¶

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

func (*TotalPrincipal) MarshalTo ¶

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

func (*TotalPrincipal) MarshalToSizedBuffer ¶

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

func (*TotalPrincipal) ProtoMessage ¶

func (*TotalPrincipal) ProtoMessage()

func (*TotalPrincipal) Reset ¶

func (m *TotalPrincipal) Reset()

func (*TotalPrincipal) Size ¶

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

func (*TotalPrincipal) String ¶

func (m *TotalPrincipal) String() string

func (*TotalPrincipal) Unmarshal ¶

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

func (*TotalPrincipal) XXX_DiscardUnknown ¶

func (m *TotalPrincipal) XXX_DiscardUnknown()

func (*TotalPrincipal) XXX_Marshal ¶

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

func (*TotalPrincipal) XXX_Merge ¶

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

func (*TotalPrincipal) XXX_Size ¶

func (m *TotalPrincipal) XXX_Size() int

func (*TotalPrincipal) XXX_Unmarshal ¶

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

type TotalPrincipals ¶

type TotalPrincipals []TotalPrincipal

TotalPrincipals a collection of TotalPrincipal objects

type UnimplementedMsgServer ¶

type UnimplementedMsgServer struct {
}

UnimplementedMsgServer can be embedded to have forward compatible implementations.

func (*UnimplementedMsgServer) CreateCDP ¶

func (*UnimplementedMsgServer) Deposit ¶

func (*UnimplementedMsgServer) DrawDebt ¶

func (*UnimplementedMsgServer) Liquidate ¶

func (*UnimplementedMsgServer) RepayDebt ¶

func (*UnimplementedMsgServer) Withdraw ¶

type UnimplementedQueryServer ¶

type UnimplementedQueryServer struct {
}

UnimplementedQueryServer can be embedded to have forward compatible implementations.

func (*UnimplementedQueryServer) Accounts ¶

func (*UnimplementedQueryServer) Cdp ¶

func (*UnimplementedQueryServer) Cdps ¶

func (*UnimplementedQueryServer) Deposits ¶

func (*UnimplementedQueryServer) Params ¶

func (*UnimplementedQueryServer) TotalCollateral ¶

func (*UnimplementedQueryServer) TotalPrincipal ¶

Jump to

Keyboard shortcuts

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