sim

package
v0.0.0-...-4fa03f3 Latest Latest
Warning

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

Go to latest
Published: Nov 21, 2019 License: MIT Imports: 23 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// DefaultCLIHome is the default home directories for the application CLI
	DefaultCLIHome = os.ExpandEnv("$HOME/.lycli")

	// DefaultNodeHome sets the folder where the applcation data and configuration will be stored
	DefaultNodeHome = os.ExpandEnv("$HOME/.lyd")

	// ModuleBasics is in charge of setting up basic module elemnets
	ModuleBasics = module.NewBasicManager(
		genaccounts.AppModuleBasic{},
		genutil.AppModuleBasic{},
		auth.AppModuleBasic{},
		bank.AppModuleBasic{},
		staking.AppModuleBasic{},
		distr.AppModuleBasic{},
		params.AppModuleBasic{},
		slashing.AppModuleBasic{},
		supply.AppModuleBasic{},

		longy.AppModule{},
	)
)

nolint: dupl

Functions

func MakeCodec

func MakeCodec() *codec.Codec

MakeCodec generates the necessary codecs for Amino

Types

type GenesisState

type GenesisState map[string]json.RawMessage

GenesisState The genesis state of the blockchain is represented here as a map of raw json messages key'd by a identifier string. The identifier is used to determine which module genesis information belongs to so it may be appropriately routed during init chain. Within this application default genesis information is retrieved from the ModuleBasicManager which populates json from each BasicModule object provided to it during init.

func NewDefaultGenesisState

func NewDefaultGenesisState() GenesisState

NewDefaultGenesisState generates the default state for the application.

type LongyApp

type LongyApp struct {
	*bam.BaseApp

	// Keepers
	AccountKeeper auth.AccountKeeper
	BankKeeper    bank.Keeper

	LongyKeeper longy.Keeper
	// contains filtered or unexported fields
}

LongyApp is our app structure

func CreateTestApp

func CreateTestApp(isCheckTx bool) (*LongyApp, sdk.Context)

CreateTestApp sets up a new test app

func NewLongyApp

func NewLongyApp(
	logger log.Logger, db dbm.DB, traceStore io.Writer, loadLatest bool,
	invCheckPeriod uint, baseAppOptions ...func(*bam.BaseApp),
) *LongyApp

NewLongyApp is a constructor function for LongyApp nolint: dupl

func (*LongyApp) BeginBlocker

func (app *LongyApp) BeginBlocker(ctx sdk.Context, req abci.RequestBeginBlock) abci.ResponseBeginBlock

BeginBlocker performs begin block functionality for all modules. nolint: gocritic

func (*LongyApp) EndBlocker

func (app *LongyApp) EndBlocker(ctx sdk.Context, req abci.RequestEndBlock) abci.ResponseEndBlock

EndBlocker performs end block functionality for all modules nolint: gocritic

func (*LongyApp) ExportAppStateAndValidators

func (app *LongyApp) ExportAppStateAndValidators(forZeroHeight bool, jailWhiteList []string,
) (appState json.RawMessage, validators []tmtypes.GenesisValidator, err error)

ExportAppStateAndValidators returns the app state for export

func (*LongyApp) InitChainer

func (app *LongyApp) InitChainer(ctx sdk.Context, req abci.RequestInitChain) abci.ResponseInitChain

InitChainer initializes the chain from the genesis state nolint: gocritic

func (*LongyApp) LoadHeight

func (app *LongyApp) LoadHeight(height int64) error

LoadHeight loads the app version

func (*LongyApp) ModuleAccountAddrs

func (app *LongyApp) ModuleAccountAddrs() map[string]bool

ModuleAccountAddrs returns all the app's module account addresses.

Jump to

Keyboard shortcuts

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