app

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Sep 16, 2020 License: Apache-2.0 Imports: 46 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Bech32MainPrefix = "str"
)

Variables

View Source
var (
	// default home directories for expected binaries
	DefaultCLIHome  = os.ExpandEnv("$HOME/.strcli")
	DefaultNodeHome = os.ExpandEnv("$HOME/.strd")

	// ModuleBasics The module BasicManager is in charge of setting up basic,
	// non-dependant module elements, such as codec registration
	// and genesis verification.
	ModuleBasics = module.NewBasicManager(
		genutil.AppModuleBasic{},
		auth.AppModuleBasic{},
		bank.AppModuleBasic{},
		staking.AppModuleBasic{},
		mint.AppModuleBasic{},
		distr.AppModuleBasic{},
		gov.NewAppModuleBasic(append(wasmclient.ProposalHandlers, paramsclient.ProposalHandler, distr.ProposalHandler, upgradeclient.ProposalHandler)...),
		params.AppModuleBasic{},
		crisis.AppModuleBasic{},
		slashing.AppModuleBasic{},
		supply.AppModuleBasic{},
		upgrade.AppModuleBasic{},
		evidence.AppModuleBasic{},
		togglerouter.AppModuleBasic{},
		wasm.AppModuleBasic{},
	)
)

Functions

func ExportStateToJSON

func ExportStateToJSON(app *StraightedgeApp, path string) error

ExportStateToJSON util function to export the app state to JSON

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 creates the application codec. The codec is sealed before it is returned.

func RegisterCodec

func RegisterCodec(cdc *codec.Codec)

Register application required codecs

func SetBech32AddressPrefixes

func SetBech32AddressPrefixes(config *sdk.Config)

Types

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.

type StraightedgeApp

type StraightedgeApp struct {
	*bam.BaseApp
	// contains filtered or unexported fields
}

StraightedgeApp extended ABCI application

func NewStraightedgeApp

func NewStraightedgeApp(
	logger log.Logger, db dbm.DB, traceStore io.Writer, loadLatest bool,
	invCheckPeriod uint, enabledProposals []wasm.ProposalType, skipUpgradeHeights map[int64]bool,
	baseAppOptions ...func(*bam.BaseApp),
) *StraightedgeApp

NewStraightedgeApp returns a reference to an initialized StraightedgeApp.

func (*StraightedgeApp) BeginBlocker

BeginBlocker application updates every begin block

func (*StraightedgeApp) Codec

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

Codec returns the application's sealed codec.

func (*StraightedgeApp) EndBlocker

EndBlocker application updates every end block

func (*StraightedgeApp) ExportAppStateAndValidators

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

export the state of the app for a genesis file

func (*StraightedgeApp) InitChainer

InitChainer application update at chain initialization

func (*StraightedgeApp) LoadHeight

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

LoadHeight loads a particular height

func (*StraightedgeApp) ModuleAccountAddrs

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

ModuleAccountAddrs returns all the app's module account addresses.

type WasmWrapper

type WasmWrapper struct {
	Wasm wasm.WasmConfig `mapstructure:"wasm"`
}

WasmWrapper allows us to use namespacing in the config file This is only used for parsing in the app, x/wasm expects WasmConfig

Jump to

Keyboard shortcuts

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