app

package
v0.0.0-...-81ad42b Latest Latest
Warning

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

Go to latest
Published: Sep 22, 2020 License: GPL-3.0 Imports: 37 Imported by: 0

Documentation

Index

Constants

View Source
const (
	AppName          = "BandApp"
	Bech32MainPrefix = "band"
	Bip44CoinType    = 494
)

Variables

View Source
var (
	// DefaultCLIHome is the default home directories for bandcli.
	DefaultCLIHome = os.ExpandEnv("$HOME/.bandcli")
	// DefaultNodeHome is the default home directories for bandd.
	DefaultNodeHome = os.ExpandEnv("$HOME/.bandd")
	// ModuleBasics is in charge of setting up basic, non-dependant module elements.
	ModuleBasics = module.NewBasicManager(
		genutil.AppModuleBasic{},
		auth.AppModuleBasic{},
		bank.AppModuleBasic{},
		supply.AppModuleBasic{},
		staking.AppModuleBasic{},
		mint.AppModuleBasic{},
		distr.AppModuleBasic{},
		gov.NewAppModuleBasic(paramsclient.ProposalHandler, distr.ProposalHandler, upgradeclient.ProposalHandler),
		params.AppModuleBasic{},
		crisis.AppModuleBasic{},
		slashing.AppModuleBasic{},
		upgrade.AppModuleBasic{},
		evidence.AppModuleBasic{},
		oracle.AppModuleBasic{},
	)
)

Functions

func GetMaccPerms

func GetMaccPerms() map[string][]string

GetMaccPerms returns a mapping of the application's module account permissions.

func MakeCodec

func MakeCodec() *codec.Codec

MakeCodec returns BandChain codec.

func SetBech32AddressPrefixesAndBip44CoinType

func SetBech32AddressPrefixesAndBip44CoinType(config *sdk.Config)

SetBech32AddressPrefixesAndBip44CoinType sets the global Bech32 prefixes and HD wallet coin type.

Types

type BandApp

type BandApp struct {
	*bam.BaseApp

	// Module keepers, publicly accessible to facilate testing and extending (see emitter).
	AccountKeeper  auth.AccountKeeper
	BankKeeper     bank.Keeper
	SupplyKeeper   supply.Keeper
	StakingKeeper  staking.Keeper
	SlashingKeeper slashing.Keeper
	MintKeeper     mint.Keeper
	DistrKeeper    distr.Keeper
	GovKeeper      gov.Keeper
	CrisisKeeper   crisis.Keeper
	ParamsKeeper   params.Keeper
	UpgradeKeeper  upgrade.Keeper
	EvidenceKeeper evidence.Keeper
	OracleKeeper   oracle.Keeper
	// Deliver context, set during InitGenesis/BeginBlock and cleared during Commit. It allows
	// anyone with access to BandApp to read/mutate consensus state anytime. USE WITH CARE!
	DeliverContext sdk.Context
	// contains filtered or unexported fields
}

BandApp is the application of BandChain, extended base ABCI application.

func NewBandApp

func NewBandApp(
	logger log.Logger, db dbm.DB, traceStore io.Writer, loadLatest bool,
	invCheckPeriod uint, skipUpgradeHeights map[int64]bool, home string,
	disableFeelessReports bool, baseAppOptions ...func(*bam.BaseApp),
) *BandApp

NewBandApp returns a reference to an initialized BandApp.

func (*BandApp) BeginBlocker

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

BeginBlocker application updates every begin block.

func (*BandApp) BlacklistedAccAddrs

func (app *BandApp) BlacklistedAccAddrs() map[string]bool

BlacklistedAccAddrs returns all the app's module account addresses black listed for receiving tokens.

func (*BandApp) Codec

func (app *BandApp) Codec() *codec.Codec

Codec returns the application's sealed codec.

func (*BandApp) Commit

func (app *BandApp) Commit() (res abci.ResponseCommit)

Commit overrides the default BaseApp's ABCI commit by adding DeliverContext clearing.

func (*BandApp) EndBlocker

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

EndBlocker application updates every end block.

func (*BandApp) ExportAppStateAndValidators

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

ExportAppStateAndValidators export the state of band for a genesis file

func (*BandApp) InitChainer

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

InitChainer application update at chain initialization

func (*BandApp) LoadHeight

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

LoadHeight loads a particular height

func (*BandApp) ModuleAccountAddrs

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

ModuleAccountAddrs returns all the app's module account addresses.

func (*BandApp) Name

func (app *BandApp) Name() string

Name returns the name of the App.

type GenesisState

type GenesisState map[string]json.RawMessage

GenesisState defines a type alias for the Band genesis application state.

func NewDefaultGenesisState

func NewDefaultGenesisState() GenesisState

NewDefaultGenesisState generates the default state for the application.

Jump to

Keyboard shortcuts

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