Documentation ¶
Index ¶
- Constants
- Variables
- func BeginBlocker(ctx sdk.Context, k Keeper)
- func InitGenesis(ctx sdk.Context, k Keeper, supplyKeeper types.SupplyKeeper, gs GenesisState)
- func NewHandler(k Keeper) sdk.Handler
- type AccountKeeper
- type AppModule
- func (am AppModule) BeginBlock(ctx sdk.Context, _ 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 Borrow
- type BorrowInterestFactor
- type BorrowInterestFactors
- type BorrowLimit
- type Borrows
- type Deposit
- type Deposits
- type GenesisAccumulationTime
- type GenesisAccumulationTimes
- type GenesisState
- type HARDHooks
- type InterestRateModel
- type InterestRateModels
- type Keeper
- type LiqData
- type MoneyMarket
- type MoneyMarkets
- type MsgBorrow
- type MsgDeposit
- type MsgLiquidate
- type MsgRepay
- type MsgWithdraw
- type MultiHARDHooks
- type Params
- type PricefeedKeeper
- type QueryAccountParams
- type QueryBorrowsParams
- type QueryDepositsParams
- type QueryTotalBorrowedParams
- type QueryTotalDepositedParams
- type StakingKeeper
- type SupplyInterestFactor
- type SupplyInterestFactors
- type SupplyKeeper
- type ValuationMap
Constants ¶
const ( AttributeKeyBlockHeight = types.AttributeKeyBlockHeight AttributeKeyBorrow = types.AttributeKeyBorrow AttributeKeyBorrowCoins = types.AttributeKeyBorrowCoins AttributeKeyBorrower = types.AttributeKeyBorrower AttributeKeyDeposit = types.AttributeKeyDeposit AttributeKeyDepositCoins = types.AttributeKeyDepositCoins AttributeKeyDepositDenom = types.AttributeKeyDepositDenom AttributeKeyDepositor = types.AttributeKeyDepositor AttributeKeyRepayCoins = types.AttributeKeyRepayCoins AttributeKeyRewardsDistribution = types.AttributeKeyRewardsDistribution AttributeKeySender = types.AttributeKeySender AttributeValueCategory = types.AttributeValueCategory DefaultParamspace = types.DefaultParamspace EventTypeDeleteHardDeposit = types.EventTypeDeleteHardDeposit EventTypeHardLiquidation = types.EventTypeHardLiquidation EventTypeHardBorrow = types.EventTypeHardBorrow EventTypeHardDelegatorDistribution = types.EventTypeHardDelegatorDistribution EventTypeHardDeposit = types.EventTypeHardDeposit EventTypeHardLPDistribution = types.EventTypeHardLPDistribution EventTypeHardRepay = types.EventTypeHardRepay EventTypeHardWithdrawal = types.EventTypeHardWithdrawal ModuleAccountName = types.ModuleAccountName ModuleName = types.ModuleName QuerierRoute = types.QuerierRoute QueryGetBorrows = types.QueryGetBorrows QueryGetDeposits = types.QueryGetDeposits QueryGetModuleAccounts = types.QueryGetModuleAccounts QueryGetParams = types.QueryGetParams QueryGetTotalBorrowed = types.QueryGetTotalBorrowed QueryGetTotalDeposited = types.QueryGetTotalDeposited RouterKey = types.RouterKey StoreKey = types.StoreKey )
Variables ¶
var ( // function aliases APYToSPY = keeper.APYToSPY SPYToEstimatedAPY = keeper.SPYToEstimatedAPY CalculateBorrowInterestFactor = keeper.CalculateBorrowInterestFactor CalculateBorrowRate = keeper.CalculateBorrowRate CalculateSupplyInterestFactor = keeper.CalculateSupplyInterestFactor CalculateUtilizationRatio = keeper.CalculateUtilizationRatio NewKeeper = keeper.NewKeeper NewQuerier = keeper.NewQuerier DefaultGenesisState = types.DefaultGenesisState DefaultParams = types.DefaultParams DepositTypeIteratorKey = types.DepositTypeIteratorKey GetTotalVestingPeriodLength = types.GetTotalVestingPeriodLength NewBorrow = types.NewBorrow NewBorrowInterestFactor = types.NewBorrowInterestFactor NewBorrowLimit = types.NewBorrowLimit NewDeposit = types.NewDeposit NewGenesisAccumulationTime = types.NewGenesisAccumulationTime NewGenesisState = types.NewGenesisState NewInterestRateModel = types.NewInterestRateModel NewMoneyMarket = types.NewMoneyMarket NewMsgBorrow = types.NewMsgBorrow NewMsgDeposit = types.NewMsgDeposit NewMsgLiquidate = types.NewMsgLiquidate NewMsgRepay = types.NewMsgRepay NewMsgWithdraw = types.NewMsgWithdraw NewMultiHARDHooks = types.NewMultiHARDHooks NewParams = types.NewParams NewPeriod = types.NewPeriod NewQueryAccountParams = types.NewQueryAccountParams NewQueryBorrowsParams = types.NewQueryBorrowsParams NewQueryDepositsParams = types.NewQueryDepositsParams NewQueryTotalBorrowedParams = types.NewQueryTotalBorrowedParams NewQueryTotalDepositedParams = types.NewQueryTotalDepositedParams NewSupplyInterestFactor = types.NewSupplyInterestFactor NewValuationMap = types.NewValuationMap ParamKeyTable = types.ParamKeyTable RegisterCodec = types.RegisterCodec // variable aliases BorrowInterestFactorPrefix = types.BorrowInterestFactorPrefix BorrowedCoinsPrefix = types.BorrowedCoinsPrefix BorrowsKeyPrefix = types.BorrowsKeyPrefix DefaultAccumulationTimes = types.DefaultAccumulationTimes DefaultBorrows = types.DefaultBorrows DefaultDeposits = types.DefaultDeposits DefaultMoneyMarkets = types.DefaultMoneyMarkets DefaultTotalBorrowed = types.DefaultTotalBorrowed DefaultTotalReserves = types.DefaultTotalReserves DefaultTotalSupplied = types.DefaultTotalSupplied DepositsKeyPrefix = types.DepositsKeyPrefix ErrAccountNotFound = types.ErrAccountNotFound ErrBorrowEmptyCoins = types.ErrBorrowEmptyCoins ErrBorrowExceedsAvailableBalance = types.ErrBorrowExceedsAvailableBalance ErrExceedsProtocolBorrowableBalance = types.ErrExceedsProtocolBorrowableBalance ErrBorrowNotFound = types.ErrBorrowNotFound ErrBorrowNotLiquidatable = types.ErrBorrowNotLiquidatable ErrBorrowedCoinsNotFound = types.ErrBorrowedCoinsNotFound ErrDepositNotFound = types.ErrDepositNotFound ErrDepositsNotFound = types.ErrDepositsNotFound ErrGreaterThanAssetBorrowLimit = types.ErrGreaterThanAssetBorrowLimit ErrInsufficientBalanceForBorrow = types.ErrInsufficientBalanceForBorrow ErrInsufficientBalanceForRepay = types.ErrInsufficientBalanceForRepay ErrInsufficientCoins = types.ErrInsufficientCoins ErrInsufficientLoanToValue = types.ErrInsufficientLoanToValue ErrInsufficientModAccountBalance = types.ErrInsufficientModAccountBalance ErrInvalidAccountType = types.ErrInvalidAccountType ErrInvalidDepositDenom = types.ErrInvalidDepositDenom ErrInvalidReceiver = types.ErrInvalidReceiver ErrInvalidRepaymentDenom = types.ErrInvalidRepaymentDenom ErrInvalidWithdrawAmount = types.ErrInvalidWithdrawAmount ErrInvalidWithdrawDenom = types.ErrInvalidWithdrawDenom ErrMarketNotFound = types.ErrMarketNotFound ErrMoneyMarketNotFound = types.ErrMoneyMarketNotFound ErrNegativeBorrowedCoins = types.ErrNegativeBorrowedCoins ErrNegativeSuppliedCoins = types.ErrNegativeSuppliedCoins ErrPreviousAccrualTimeNotFound = types.ErrPreviousAccrualTimeNotFound ErrPriceNotFound = types.ErrPriceNotFound ErrSuppliedCoinsNotFound = types.ErrSuppliedCoinsNotFound ErrReservesExceedCash = types.ErrReservesExceedCash GovDenom = types.GovDenom KeyMoneyMarkets = types.KeyMoneyMarkets ModuleCdc = types.ModuleCdc MoneyMarketsPrefix = types.MoneyMarketsPrefix PreviousAccrualTimePrefix = types.PreviousAccrualTimePrefix SuppliedCoinsPrefix = types.SuppliedCoinsPrefix SupplyInterestFactorPrefix = types.SupplyInterestFactorPrefix TotalReservesPrefix = types.TotalReservesPrefix )
Functions ¶
func BeginBlocker ¶
BeginBlocker updates interest rates and attempts liquidations
func InitGenesis ¶
func InitGenesis(ctx sdk.Context, k Keeper, supplyKeeper types.SupplyKeeper, gs GenesisState)
InitGenesis initializes the store state from a genesis state.
func NewHandler ¶
NewHandler creates an sdk.Handler for hard messages
Types ¶
type AccountKeeper ¶
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, supplyKeeper types.SupplyKeeper, pricefeedKeeper types.PricefeedKeeper) AppModule
NewAppModule creates a new AppModule object
func (AppModule) BeginBlock ¶
func (am AppModule) BeginBlock(ctx sdk.Context, _ 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 returns no sdk.Querier.
func (AppModule) QuerierRoute ¶
QuerierRoute module querier route name
func (AppModule) RegisterInvariants ¶
func (AppModule) RegisterInvariants(_ sdk.InvariantRegistry)
RegisterInvariants register module invariants
func (AppModule) WeightedOperations ¶
func (am AppModule) WeightedOperations(simState module.SimulationState) []sim.WeightedOperation
WeightedOperations returns the all the hard 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 ¶
func (AppModuleBasic) GenerateGenesisState(simState *module.SimulationState)
GenerateGenesisState creates a randomized GenState of the hard module
func (AppModuleBasic) GetQueryCmd ¶
func (AppModuleBasic) GetQueryCmd(cdc *codec.Codec) *cobra.Command
GetQueryCmd returns no root query command for the hard module.
func (AppModuleBasic) GetTxCmd ¶
func (AppModuleBasic) GetTxCmd(cdc *codec.Codec) *cobra.Command
GetTxCmd returns the root tx command for the hard module.
func (AppModuleBasic) ProposalContents ¶
func (AppModuleBasic) ProposalContents(_ module.SimulationState) []sim.WeightedProposalContent
ProposalContents doesn't return any content functions for governance proposals.
func (AppModuleBasic) RandomizedParams ¶
func (AppModuleBasic) RandomizedParams(r *rand.Rand) []sim.ParamChange
RandomizedParams returns nil because hard 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 REST routes for the hard module.
func (AppModuleBasic) RegisterStoreDecoder ¶
func (AppModuleBasic) RegisterStoreDecoder(sdr sdk.StoreDecoderRegistry)
RegisterStoreDecoder registers a decoder for hard module's types
func (AppModuleBasic) ValidateGenesis ¶
func (AppModuleBasic) ValidateGenesis(bz json.RawMessage) error
ValidateGenesis module validate genesis
type AuctionKeeper ¶
type AuctionKeeper = types.AuctionKeeper
type BorrowInterestFactor ¶
type BorrowInterestFactor = types.BorrowInterestFactor
type BorrowInterestFactors ¶
type BorrowInterestFactors = types.BorrowInterestFactors
type BorrowLimit ¶
type BorrowLimit = types.BorrowLimit
type GenesisAccumulationTime ¶
type GenesisAccumulationTime = types.GenesisAccumulationTime
type GenesisAccumulationTimes ¶
type GenesisAccumulationTimes = types.GenesisAccumulationTimes
type GenesisState ¶
type GenesisState = types.GenesisState
func ExportGenesis ¶
func ExportGenesis(ctx sdk.Context, k Keeper) GenesisState
ExportGenesis export genesis state for hard module
type InterestRateModel ¶
type InterestRateModel = types.InterestRateModel
type InterestRateModels ¶
type InterestRateModels = types.InterestRateModels
type MoneyMarket ¶
type MoneyMarket = types.MoneyMarket
type MoneyMarkets ¶
type MoneyMarkets = types.MoneyMarkets
type MsgDeposit ¶
type MsgDeposit = types.MsgDeposit
type MsgLiquidate ¶
type MsgLiquidate = types.MsgLiquidate
type MsgWithdraw ¶
type MsgWithdraw = types.MsgWithdraw
type MultiHARDHooks ¶
type MultiHARDHooks = types.MultiHARDHooks
type PricefeedKeeper ¶
type PricefeedKeeper = types.PricefeedKeeper
type QueryAccountParams ¶
type QueryAccountParams = types.QueryAccountParams
type QueryBorrowsParams ¶
type QueryBorrowsParams = types.QueryBorrowsParams
type QueryDepositsParams ¶
type QueryDepositsParams = types.QueryDepositsParams
type QueryTotalBorrowedParams ¶
type QueryTotalBorrowedParams = types.QueryTotalBorrowedParams
type QueryTotalDepositedParams ¶
type QueryTotalDepositedParams = types.QueryTotalDepositedParams
type StakingKeeper ¶
type StakingKeeper = types.StakingKeeper
type SupplyInterestFactor ¶
type SupplyInterestFactor = types.SupplyInterestFactor
type SupplyInterestFactors ¶
type SupplyInterestFactors = types.SupplyInterestFactors
type SupplyKeeper ¶
type SupplyKeeper = types.SupplyKeeper
type ValuationMap ¶
type ValuationMap = types.ValuationMap