hard

package
v0.14.2 Latest Latest
Warning

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

Go to latest
Published: Jun 7, 2021 License: Apache-2.0 Imports: 17 Imported by: 3

Documentation

Index

Constants

View Source
const (
	AttributeKeyBorrow       = types.AttributeKeyBorrow
	AttributeKeyBorrowCoins  = types.AttributeKeyBorrowCoins
	AttributeKeyBorrower     = types.AttributeKeyBorrower
	AttributeKeyDeposit      = types.AttributeKeyDeposit
	AttributeKeyDepositCoins = types.AttributeKeyDepositCoins
	AttributeKeyDepositDenom = types.AttributeKeyDepositDenom
	AttributeKeyDepositor    = types.AttributeKeyDepositor
	AttributeKeyRepayCoins   = types.AttributeKeyRepayCoins
	AttributeKeySender       = types.AttributeKeySender
	AttributeValueCategory   = types.AttributeValueCategory
	DefaultParamspace        = types.DefaultParamspace
	EventTypeHardLiquidation = types.EventTypeHardLiquidation
	EventTypeHardBorrow      = types.EventTypeHardBorrow
	EventTypeHardDeposit     = types.EventTypeHardDeposit
	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

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

func BeginBlocker(ctx sdk.Context, k Keeper)

BeginBlocker updates interest rates

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

func NewHandler(k Keeper) sdk.Handler

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

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) Name

func (AppModule) Name() string

Name module name

func (AppModule) NewHandler

func (am AppModule) NewHandler() sdk.Handler

NewHandler module handler

func (AppModule) NewQuerierHandler

func (am AppModule) NewQuerierHandler() sdk.Querier

NewQuerierHandler returns no sdk.Querier.

func (AppModule) QuerierRoute

func (AppModule) QuerierRoute() string

QuerierRoute module querier route name

func (AppModule) RegisterInvariants

func (AppModule) RegisterInvariants(_ sdk.InvariantRegistry)

RegisterInvariants register module invariants

func (AppModule) Route

func (AppModule) Route() string

Route module message route name

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) Name

func (AppModuleBasic) Name() string

Name get module name

func (AppModuleBasic) ProposalContents

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 Borrow

type Borrow = types.Borrow

type BorrowInterestFactor

type BorrowInterestFactor = types.BorrowInterestFactor

type BorrowInterestFactors

type BorrowInterestFactors = types.BorrowInterestFactors

type BorrowLimit

type BorrowLimit = types.BorrowLimit

type Borrows

type Borrows = types.Borrows

type Deposit

type Deposit = types.Deposit

type Deposits

type Deposits = types.Deposits

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 HARDHooks

type HARDHooks = types.HARDHooks

type InterestRateModel

type InterestRateModel = types.InterestRateModel

type InterestRateModels

type InterestRateModels = types.InterestRateModels

type Keeper

type Keeper = keeper.Keeper

type LiqData

type LiqData = keeper.LiqData

type MoneyMarket

type MoneyMarket = types.MoneyMarket

type MoneyMarkets

type MoneyMarkets = types.MoneyMarkets

type MsgBorrow

type MsgBorrow = types.MsgBorrow

type MsgDeposit

type MsgDeposit = types.MsgDeposit

type MsgLiquidate

type MsgLiquidate = types.MsgLiquidate

type MsgRepay

type MsgRepay = types.MsgRepay

type MsgWithdraw

type MsgWithdraw = types.MsgWithdraw

type MultiHARDHooks

type MultiHARDHooks = types.MultiHARDHooks

type Params

type Params = types.Params

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

Directories

Path Synopsis
client
cli
legacy

Jump to

Keyboard shortcuts

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