Documentation ¶
Index ¶
- Constants
- Variables
- func InitGenesis(ctx sdk.Context, k keeper.Keeper, data GenesisState)
- func NewHandler(keeper keeper.Keeper) sdk.Handler
- func ValidateGenesis(data GenesisState) error
- type AppModule
- func (AppModule) BeginBlock(_ sdk.Context, _ abci.RequestBeginBlock)
- func (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
- type AppModuleBasic
- func (AppModuleBasic) DefaultGenesis() json.RawMessage
- func (AppModuleBasic) GetQueryCmd(_ *codec.Codec) *cobra.Command
- func (AppModuleBasic) GetTxCmd(cdc *codec.Codec) *cobra.Command
- func (AppModuleBasic) Name() string
- func (AppModuleBasic) RegisterCodec(cdc *codec.Codec)
- func (AppModuleBasic) RegisterRESTRoutes(ctx context.CLIContext, rtr *mux.Router)
- func (AppModuleBasic) ValidateGenesis(bz json.RawMessage) error
- type CSDT
- type CSDTs
- type CollateralParams
- type GenesisState
- type Keeper
- type Params
Constants ¶
const ( ModuleName = types.ModuleName RouterKey = types.RouterKey QuerierRoute = types.QuerierRoute DefaultParamspace = types.DefaultParamspace StoreKey = types.StoreKey StableDenom = types.StableDenom )
Variables ¶
var ( ModuleCdc = types.ModuleCdc NewKeeper = keeper.NewKeeper RegisterCodec = types.RegisterCodec )
Functions ¶
func InitGenesis ¶
func InitGenesis(ctx sdk.Context, k keeper.Keeper, data GenesisState)
InitGenesis sets the genesis state in the keeper.
func ValidateGenesis ¶
func ValidateGenesis(data GenesisState) error
ValidateGenesis performs basic validation of genesis data returning an error for any failed validation criteria.
Types ¶
type AppModule ¶
type AppModule struct { AppModuleBasic // contains filtered or unexported fields }
AppModule app module type
func NewAppModule ¶
NewAppModule creates a new AppModule object
func (AppModule) BeginBlock ¶
func (AppModule) BeginBlock(_ sdk.Context, _ abci.RequestBeginBlock)
BeginBlock performs a no-op.
func (AppModule) EndBlock ¶
func (AppModule) EndBlock(_ sdk.Context, _ abci.RequestEndBlock) []abci.ValidatorUpdate
Fees should be accrued here, need a global fee that can be used for buybacks or liquidation
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
type AppModuleBasic ¶
type AppModuleBasic struct{}
AppModuleBasic app module basics object
func (AppModuleBasic) DefaultGenesis ¶
func (AppModuleBasic) DefaultGenesis() json.RawMessage
DefaultGenesis default genesis state
func (AppModuleBasic) GetQueryCmd ¶
func (AppModuleBasic) GetQueryCmd(_ *codec.Codec) *cobra.Command
GetQueryCmd returns no root query command for the bank module.
func (AppModuleBasic) GetTxCmd ¶
func (AppModuleBasic) GetTxCmd(cdc *codec.Codec) *cobra.Command
GetTxCmd returns the root tx command for the bank module.
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 bank module.
func (AppModuleBasic) ValidateGenesis ¶
func (AppModuleBasic) ValidateGenesis(bz json.RawMessage) error
ValidateGenesis module validate genesis
type CollateralParams ¶
type CollateralParams = types.CollateralParams
type GenesisState ¶
type GenesisState struct { Params types.Params `json:"params"` GlobalDebt sdk.Int `json:"global_debt"` CSDTs types.CSDTs `json:"csdts" yaml:"csdts"` }
GenesisState is the state that must be provided at genesis.
func DefaultGenesisState ¶
func DefaultGenesisState() GenesisState
DefaultGenesisState returns a default genesis state
func ExportGenesis ¶
func ExportGenesis(ctx sdk.Context, k keeper.Keeper) GenesisState
ExportGenesis returns a GenesisState for a given context and keeper.
func NewGenesisState ¶
func NewGenesisState(params types.Params, globalDebt sdk.Int) GenesisState