Documentation ¶
Index ¶
- Constants
- Variables
- func BeginBlocker(ctx sdk.Context, req abci.RequestBeginBlock, k Keeper)
- func InitGenesis(ctx sdk.Context, k Keeper, pk types.PricefeedKeeper, sk types.SupplyKeeper, ...)
- func NewHandler(k Keeper) sdk.Handler
- type AccountKeeper
- type AppModule
- func (am AppModule) BeginBlock(ctx sdk.Context, req abci.RequestBeginBlock)
- func (am AppModule) EndBlock(_ sdk.Context, _ abci.RequestEndBlock) []abci.ValidatorUpdate
- func (am AppModule) ExportGenesis(ctx sdk.Context) json.RawMessage
- func (am AppModule) InitGenesis(ctx sdk.Context, data json.RawMessage) []abci.ValidatorUpdate
- func (AppModule) Name() string
- func (am AppModule) NewHandler() sdk.Handler
- func (am AppModule) NewQuerierHandler() sdk.Querier
- func (AppModule) QuerierRoute() string
- func (AppModule) RegisterInvariants(_ sdk.InvariantRegistry)
- func (AppModule) Route() string
- func (am AppModule) WeightedOperations(simState module.SimulationState) []sim.WeightedOperation
- type AppModuleBasic
- func (AppModuleBasic) DefaultGenesis() json.RawMessage
- func (AppModuleBasic) GenerateGenesisState(simState *module.SimulationState)
- func (AppModuleBasic) GetQueryCmd(cdc *codec.Codec) *cobra.Command
- func (AppModuleBasic) GetTxCmd(cdc *codec.Codec) *cobra.Command
- func (AppModuleBasic) Name() string
- func (AppModuleBasic) ProposalContents(_ module.SimulationState) []sim.WeightedProposalContent
- func (AppModuleBasic) RandomizedParams(r *rand.Rand) []sim.ParamChange
- func (AppModuleBasic) RegisterCodec(cdc *codec.Codec)
- func (AppModuleBasic) RegisterRESTRoutes(ctx context.CLIContext, rtr *mux.Router)
- func (AppModuleBasic) RegisterStoreDecoder(sdr sdk.StoreDecoderRegistry)
- func (AppModuleBasic) ValidateGenesis(bz json.RawMessage) error
- type AuctionKeeper
- type AugmentedCDP
- type AugmentedCDPs
- type CDP
- type CDPs
- type CollateralParam
- type CollateralParams
- type DebtParam
- type DebtParams
- type Deposit
- type Deposits
- type GenesisState
- type Keeper
- type MsgCreateCDP
- type MsgDeposit
- type MsgDrawDebt
- type MsgRepayDebt
- type MsgWithdraw
- type Params
- type PricefeedKeeper
- type QueryCdpDeposits
- type QueryCdpParams
- type QueryCdpsByCollateralTypeParams
- type QueryCdpsByRatioParams
- type QueryCdpsParams
- type SupplyKeeper
Constants ¶
const ( BaseDigitFactor = keeper.BaseDigitFactor AttributeKeyCdpID = types.AttributeKeyCdpID AttributeKeyDeposit = types.AttributeKeyDeposit AttributeKeyError = types.AttributeKeyError AttributeValueCategory = types.AttributeValueCategory DefaultParamspace = types.DefaultParamspace EventTypeBeginBlockerFatal = types.EventTypeBeginBlockerFatal EventTypeCdpClose = types.EventTypeCdpClose EventTypeCdpDeposit = types.EventTypeCdpDeposit EventTypeCdpDraw = types.EventTypeCdpDraw EventTypeCdpLiquidation = types.EventTypeCdpLiquidation EventTypeCdpRepay = types.EventTypeCdpRepay EventTypeCdpWithdrawal = types.EventTypeCdpWithdrawal EventTypeCreateCdp = types.EventTypeCreateCdp LiquidatorMacc = types.LiquidatorMacc ModuleName = types.ModuleName QuerierRoute = types.QuerierRoute QueryGetAccounts = types.QueryGetAccounts QueryGetCdp = types.QueryGetCdp QueryGetCdpDeposits = types.QueryGetCdpDeposits QueryGetCdps = types.QueryGetCdps QueryGetCdpsByCollateralType = types.QueryGetCdpsByCollateralType QueryGetCdpsByCollateralization = types.QueryGetCdpsByCollateralization QueryGetParams = types.QueryGetParams QueryGetPreviousSavingsDistributionTime = types.QueryGetPreviousSavingsDistributionTime QueryGetSavingsRateDistributed = types.QueryGetSavingsRateDistributed RestCollateralType = types.RestCollateralType RestOwner = types.RestOwner RestRatio = types.RestRatio RouterKey = types.RouterKey SavingsRateMacc = types.SavingsRateMacc StoreKey = types.StoreKey )
Variables ¶
var ( // function aliases FilterCDPs = keeper.FilterCDPs FindIntersection = keeper.FindIntersection NewKeeper = keeper.NewKeeper NewQuerier = keeper.NewQuerier CdpKey = types.CdpKey CollateralRatioBytes = types.CollateralRatioBytes CollateralRatioIterKey = types.CollateralRatioIterKey CollateralRatioKey = types.CollateralRatioKey DefaultGenesisState = types.DefaultGenesisState DefaultParams = types.DefaultParams DenomIterKey = types.DenomIterKey DepositIterKey = types.DepositIterKey DepositKey = types.DepositKey GetCdpIDBytes = types.GetCdpIDBytes GetCdpIDFromBytes = types.GetCdpIDFromBytes NewAugmentedCDP = types.NewAugmentedCDP NewCDP = types.NewCDP NewCDPWithFees = types.NewCDPWithFees NewCollateralParam = types.NewCollateralParam NewDebtParam = types.NewDebtParam NewDeposit = types.NewDeposit NewGenesisState = types.NewGenesisState NewMsgCreateCDP = types.NewMsgCreateCDP NewMsgDeposit = types.NewMsgDeposit NewMsgDrawDebt = types.NewMsgDrawDebt NewMsgRepayDebt = types.NewMsgRepayDebt NewMsgWithdraw = types.NewMsgWithdraw NewParams = types.NewParams NewQueryCdpDeposits = types.NewQueryCdpDeposits NewQueryCdpParams = types.NewQueryCdpParams NewQueryCdpsByCollateralTypeParams = types.NewQueryCdpsByCollateralTypeParams NewQueryCdpsByRatioParams = types.NewQueryCdpsByRatioParams NewQueryCdpsParams = types.NewQueryCdpsParams ParamKeyTable = types.ParamKeyTable ParseDecBytes = types.ParseDecBytes RegisterCodec = types.RegisterCodec RelativePow = types.RelativePow SortableDecBytes = types.SortableDecBytes SplitCdpKey = types.SplitCdpKey SplitCollateralRatioIterKey = types.SplitCollateralRatioIterKey SplitCollateralRatioKey = types.SplitCollateralRatioKey SplitDenomIterKey = types.SplitDenomIterKey SplitDepositIterKey = types.SplitDepositIterKey SplitDepositKey = types.SplitDepositKey ValidSortableDec = types.ValidSortableDec // variable aliases CdpIDKey = types.CdpIDKey CdpIDKeyPrefix = types.CdpIDKeyPrefix CdpKeyPrefix = types.CdpKeyPrefix CollateralRatioIndexPrefix = types.CollateralRatioIndexPrefix DebtDenomKey = types.DebtDenomKey DefaultCdpStartingID = types.DefaultCdpStartingID DefaultCircuitBreaker = types.DefaultCircuitBreaker DefaultCollateralParams = types.DefaultCollateralParams DefaultDebtDenom = types.DefaultDebtDenom DefaultDebtLot = types.DefaultDebtLot DefaultDebtParam = types.DefaultDebtParam DefaultDebtThreshold = types.DefaultDebtThreshold DefaultGlobalDebt = types.DefaultGlobalDebt DefaultGovDenom = types.DefaultGovDenom DefaultPreviousDistributionTime = types.DefaultPreviousDistributionTime DefaultSavingsDistributionFrequency = types.DefaultSavingsDistributionFrequency DefaultSavingsRateDistributed = types.DefaultSavingsRateDistributed DefaultStableDenom = types.DefaultStableDenom DefaultSurplusLot = types.DefaultSurplusLot DefaultSurplusThreshold = types.DefaultSurplusThreshold DepositKeyPrefix = types.DepositKeyPrefix ErrBelowDebtFloor = types.ErrBelowDebtFloor ErrCdpAlreadyExists = types.ErrCdpAlreadyExists ErrCdpNotAvailable = types.ErrCdpNotAvailable ErrCdpNotFound = types.ErrCdpNotFound ErrCollateralNotSupported = types.ErrCollateralNotSupported ErrDebtNotSupported = types.ErrDebtNotSupported ErrDenomPrefixNotFound = types.ErrDenomPrefixNotFound ErrDepositNotAvailable = types.ErrDepositNotAvailable ErrDepositNotFound = types.ErrDepositNotFound ErrExceedsDebtLimit = types.ErrExceedsDebtLimit ErrInvalidCollateral = types.ErrInvalidCollateral ErrInvalidCollateralLength = types.ErrInvalidCollateralLength ErrInvalidCollateralRatio = types.ErrInvalidCollateralRatio ErrInvalidDebtRequest = types.ErrInvalidDebtRequest ErrInvalidDeposit = types.ErrInvalidDeposit ErrInvalidPayment = types.ErrInvalidPayment ErrInvalidWithdrawAmount = types.ErrInvalidWithdrawAmount ErrLoadingAugmentedCDP = types.ErrLoadingAugmentedCDP ErrPricefeedDown = types.ErrPricefeedDown GovDenomKey = types.GovDenomKey KeyCircuitBreaker = types.KeyCircuitBreaker KeyCollateralParams = types.KeyCollateralParams KeyDebtLot = types.KeyDebtLot KeyDebtParam = types.KeyDebtParam KeyDebtThreshold = types.KeyDebtThreshold KeyDistributionFrequency = types.KeyDistributionFrequency KeyGlobalDebtLimit = types.KeyGlobalDebtLimit KeySavingsRateDistributed = types.KeySavingsRateDistributed KeySurplusLot = types.KeySurplusLot KeySurplusThreshold = types.KeySurplusThreshold MaxSortableDec = types.MaxSortableDec ModuleCdc = types.ModuleCdc PreviousDistributionTimeKey = types.PreviousDistributionTimeKey PricefeedStatusKeyPrefix = types.PricefeedStatusKeyPrefix PrincipalKeyPrefix = types.PrincipalKeyPrefix SavingsRateDistributedKey = types.SavingsRateDistributedKey )
Functions ¶
func BeginBlocker ¶
func BeginBlocker(ctx sdk.Context, req abci.RequestBeginBlock, k Keeper)
BeginBlocker compounds the debt in outstanding cdps and liquidates cdps that are below the required collateralization ratio
func InitGenesis ¶
func InitGenesis(ctx sdk.Context, k Keeper, pk types.PricefeedKeeper, sk types.SupplyKeeper, gs GenesisState)
InitGenesis sets initial genesis state for cdp module
func NewHandler ¶
NewHandler creates an sdk.Handler for cdp messages
Types ¶
type AccountKeeper ¶ added in v0.11.0
type AccountKeeper = types.AccountKeeper
type AppModule ¶
type AppModule struct { AppModuleBasic // contains filtered or unexported fields }
AppModule app module type
func NewAppModule ¶
func NewAppModule(keeper Keeper, accountKeeper types.AccountKeeper, pricefeedKeeper types.PricefeedKeeper, supplyKeeper types.SupplyKeeper) AppModule
NewAppModule creates a new AppModule object
func (AppModule) BeginBlock ¶
func (am AppModule) BeginBlock(ctx sdk.Context, req abci.RequestBeginBlock)
BeginBlock module begin-block
func (AppModule) EndBlock ¶
func (am AppModule) EndBlock(_ sdk.Context, _ abci.RequestEndBlock) []abci.ValidatorUpdate
EndBlock module end-block
func (AppModule) ExportGenesis ¶
func (am AppModule) ExportGenesis(ctx sdk.Context) json.RawMessage
ExportGenesis module export genesis
func (AppModule) InitGenesis ¶
func (am AppModule) InitGenesis(ctx sdk.Context, data json.RawMessage) []abci.ValidatorUpdate
InitGenesis module init-genesis
func (AppModule) NewHandler ¶
NewHandler module handler
func (AppModule) NewQuerierHandler ¶
NewQuerierHandler module querier
func (AppModule) QuerierRoute ¶
QuerierRoute module querier route name
func (AppModule) RegisterInvariants ¶
func (AppModule) RegisterInvariants(_ sdk.InvariantRegistry)
RegisterInvariants register module invariants
func (AppModule) WeightedOperations ¶ added in v0.8.0
func (am AppModule) WeightedOperations(simState module.SimulationState) []sim.WeightedOperation
WeightedOperations returns the all the cdp module operations with their respective weights.
type AppModuleBasic ¶
type AppModuleBasic struct{}
AppModuleBasic app module basics object
func (AppModuleBasic) DefaultGenesis ¶
func (AppModuleBasic) DefaultGenesis() json.RawMessage
DefaultGenesis default genesis state
func (AppModuleBasic) GenerateGenesisState ¶ added in v0.8.0
func (AppModuleBasic) GenerateGenesisState(simState *module.SimulationState)
GenerateGenesisState creates a randomized GenState of the cdp module
func (AppModuleBasic) GetQueryCmd ¶
func (AppModuleBasic) GetQueryCmd(cdc *codec.Codec) *cobra.Command
GetQueryCmd returns the root query command for the auction module.
func (AppModuleBasic) GetTxCmd ¶
func (AppModuleBasic) GetTxCmd(cdc *codec.Codec) *cobra.Command
GetTxCmd returns the root tx command for the cdp module.
func (AppModuleBasic) ProposalContents ¶ added in v0.8.0
func (AppModuleBasic) ProposalContents(_ module.SimulationState) []sim.WeightedProposalContent
ProposalContents doesn't return any content functions for governance proposals.
func (AppModuleBasic) RandomizedParams ¶ added in v0.8.0
func (AppModuleBasic) RandomizedParams(r *rand.Rand) []sim.ParamChange
RandomizedParams returns nil because cdp has no params.
func (AppModuleBasic) RegisterCodec ¶
func (AppModuleBasic) RegisterCodec(cdc *codec.Codec)
RegisterCodec register module codec
func (AppModuleBasic) RegisterRESTRoutes ¶
func (AppModuleBasic) RegisterRESTRoutes(ctx context.CLIContext, rtr *mux.Router)
RegisterRESTRoutes registers the REST routes for the cdp module.
func (AppModuleBasic) RegisterStoreDecoder ¶ added in v0.8.0
func (AppModuleBasic) RegisterStoreDecoder(sdr sdk.StoreDecoderRegistry)
RegisterStoreDecoder registers a decoder for cdp module's types
func (AppModuleBasic) ValidateGenesis ¶
func (AppModuleBasic) ValidateGenesis(bz json.RawMessage) error
ValidateGenesis module validate genesis
type AuctionKeeper ¶ added in v0.11.0
type AuctionKeeper = types.AuctionKeeper
type AugmentedCDP ¶
type AugmentedCDP = types.AugmentedCDP
type AugmentedCDPs ¶
type AugmentedCDPs = types.AugmentedCDPs
type CollateralParam ¶
type CollateralParam = types.CollateralParam
type CollateralParams ¶
type CollateralParams = types.CollateralParams
type DebtParams ¶
type DebtParams = types.DebtParams
type GenesisState ¶
type GenesisState = types.GenesisState
func ExportGenesis ¶
func ExportGenesis(ctx sdk.Context, k Keeper) GenesisState
ExportGenesis export genesis state for cdp module
type MsgCreateCDP ¶
type MsgCreateCDP = types.MsgCreateCDP
type MsgDeposit ¶
type MsgDeposit = types.MsgDeposit
type MsgDrawDebt ¶
type MsgDrawDebt = types.MsgDrawDebt
type MsgRepayDebt ¶
type MsgRepayDebt = types.MsgRepayDebt
type MsgWithdraw ¶
type MsgWithdraw = types.MsgWithdraw
type PricefeedKeeper ¶
type PricefeedKeeper = types.PricefeedKeeper
type QueryCdpDeposits ¶ added in v0.5.0
type QueryCdpDeposits = types.QueryCdpDeposits
type QueryCdpParams ¶
type QueryCdpParams = types.QueryCdpParams
type QueryCdpsByCollateralTypeParams ¶ added in v0.11.0
type QueryCdpsByCollateralTypeParams = types.QueryCdpsByCollateralTypeParams
type QueryCdpsByRatioParams ¶
type QueryCdpsByRatioParams = types.QueryCdpsByRatioParams
type QueryCdpsParams ¶
type QueryCdpsParams = types.QueryCdpsParams
type SupplyKeeper ¶
type SupplyKeeper = types.SupplyKeeper