csdt

package
v0.0.2-0...-13a971e Latest Latest
Warning

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

Go to latest
Published: Dec 13, 2019 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ModuleName        = types.ModuleName
	RouterKey         = types.RouterKey
	QuerierRoute      = types.QuerierRoute
	DefaultParamspace = types.DefaultParamspace
	StoreKey          = types.StoreKey
	StableDenom       = types.StableDenom
)

Variables

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

func NewHandler(keeper keeper.Keeper) sdk.Handler

Handle all csdt messages.

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

func NewAppModule(keeper Keeper) AppModule

NewAppModule creates a new AppModule object

func (AppModule) BeginBlock

func (AppModule) BeginBlock(_ sdk.Context, _ abci.RequestBeginBlock)

BeginBlock performs a no-op.

func (AppModule) EndBlock

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

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

func (AppModuleBasic) Name() string

Name get module name

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 CSDT

type CSDT = types.CSDT

type CSDTs

type CSDTs = types.CSDTs

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

type Keeper

type Keeper = keeper.Keeper

type Params

type Params = types.Params

Directories

Path Synopsis
cli
internal
types
Package CSDT manages the storage of Collateralized Stable Debt Tokens.
Package CSDT manages the storage of Collateralized Stable Debt Tokens.

Jump to

Keyboard shortcuts

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