Documentation ¶
Index ¶
- Constants
- Variables
- func ExportStateToJSON(app *App, path string) error
- func GetMaccPerms() map[string][]string
- func MakeCodec() *codec.Codec
- func SetBech32AddressPrefixes(config *sdk.Config)
- type App
- func (app *App) BeginBlocker(ctx sdk.Context, req abci.RequestBeginBlock) abci.ResponseBeginBlock
- func (app *App) Codec() *codec.Codec
- func (app *App) EndBlocker(ctx sdk.Context, req abci.RequestEndBlock) abci.ResponseEndBlock
- func (app *App) ExportAppStateAndValidators(forZeroHeight bool, jailWhiteList []string) (appState json.RawMessage, validators []tmtypes.GenesisValidator, err error)
- func (app *App) InitChainer(ctx sdk.Context, req abci.RequestInitChain) abci.ResponseInitChain
- func (app *App) LoadHeight(height int64) error
- func (app *App) ModuleAccountAddrs() map[string]bool
- type GenesisState
Constants ¶
View Source
const (
Bech32MainPrefix = "ncp"
)
Variables ¶
View Source
var ( // default home directories for expected binaries DefaultCLIHome = os.ExpandEnv("$HOME/.ncpcli") DefaultNodeHome = os.ExpandEnv("$HOME/.ncpd") // ModuleBasics manages simple versions of full app modules. It's used for things such as codec registration and genesis file verification. ModuleBasics = module.NewBasicManager( genutil.AppModuleBasic{}, auth.AppModuleBasic{}, validatorvesting.AppModuleBasic{}, bank.AppModuleBasic{}, staking.AppModuleBasic{}, mint.AppModuleBasic{}, distr.AppModuleBasic{}, gov.NewAppModuleBasic(paramsclient.ProposalHandler, distr.ProposalHandler), params.AppModuleBasic{}, crisis.AppModuleBasic{}, slashing.AppModuleBasic{}, supply.AppModuleBasic{}, ) )
Functions ¶
func ExportStateToJSON ¶
ExportStateToJSON util function to export the app state to JSON
func GetMaccPerms ¶
GetMaccPerms returns a mapping of the application's module account permissions.
Types ¶
type App ¶
Extended ABCI application
func NewApp ¶
func NewApp(logger log.Logger, db dbm.DB, traceStore io.Writer, loadLatest bool, invCheckPeriod uint, baseAppOptions ...func(*bam.BaseApp)) *App
NewApp returns a reference to an initialized App.
func (*App) BeginBlocker ¶
func (app *App) BeginBlocker(ctx sdk.Context, req abci.RequestBeginBlock) abci.ResponseBeginBlock
application updates every end block
func (*App) EndBlocker ¶
func (app *App) EndBlocker(ctx sdk.Context, req abci.RequestEndBlock) abci.ResponseEndBlock
application updates every end block
func (*App) ExportAppStateAndValidators ¶
func (app *App) ExportAppStateAndValidators(forZeroHeight bool, jailWhiteList []string) ( appState json.RawMessage, validators []tmtypes.GenesisValidator, err error)
export the state of the app for a genesis file
func (*App) InitChainer ¶
func (app *App) InitChainer(ctx sdk.Context, req abci.RequestInitChain) abci.ResponseInitChain
custom logic for app initialization
func (*App) ModuleAccountAddrs ¶
ModuleAccountAddrs returns all the app's module account addresses.
type GenesisState ¶
type GenesisState map[string]json.RawMessage
GenesisState represents the genesis state of the blockchain. It is a map from module names to module genesis states.
func NewDefaultGenesisState ¶
func NewDefaultGenesisState() GenesisState
NewDefaultGenesisState generates the default state for the application.
Click to show internal directories.
Click to hide internal directories.