appplus

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Mar 8, 2023 License: Apache-2.0 Imports: 113 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	NodeDir      = ".wasmplusd"
	Bech32Prefix = "link"

	ProposalsEnabled = "false"

	EnableSpecificProposals = ""
)

We pull these out, so we can set them with LDFLAGS in the Makefile

View Source
var (
	// DefaultNodeHome default home directories for wasmd
	DefaultNodeHome = os.ExpandEnv("$HOME/") + NodeDir

	// Bech32PrefixAccAddr defines the Bech32 prefix of an account's address
	Bech32PrefixAccAddr = Bech32Prefix
	// Bech32PrefixAccPub defines the Bech32 prefix of an account's public key
	Bech32PrefixAccPub = Bech32Prefix + sdk.PrefixPublic
	// Bech32PrefixValAddr defines the Bech32 prefix of a validator's operator address
	Bech32PrefixValAddr = Bech32Prefix + sdk.PrefixValidator + sdk.PrefixOperator
	// Bech32PrefixValPub defines the Bech32 prefix of a validator's operator public key
	Bech32PrefixValPub = Bech32Prefix + sdk.PrefixValidator + sdk.PrefixOperator + sdk.PrefixPublic
	// Bech32PrefixConsAddr defines the Bech32 prefix of a consensus node address
	Bech32PrefixConsAddr = Bech32Prefix + sdk.PrefixValidator + sdk.PrefixConsensus
	// Bech32PrefixConsPub defines the Bech32 prefix of a consensus node public key
	Bech32PrefixConsPub = Bech32Prefix + sdk.PrefixValidator + sdk.PrefixConsensus + sdk.PrefixPublic
)

These constants are derived from the above variables. These are the ones we will want to use in the code, based on any overrides above

Functions

func GetEnabledProposals

func GetEnabledProposals() []wasmtypes.ProposalType

GetEnabledProposals parses the ProposalsEnabled / EnableSpecificProposals values to produce a list of enabled proposals to pass into wasmd app.

func GetMaccPerms

func GetMaccPerms() map[string][]string

GetMaccPerms returns a copy of the module account permissions

func MakeEncodingConfig

func MakeEncodingConfig() params.EncodingConfig

MakeEncodingConfig creates a new EncodingConfig with all modules registered

func NewDefaultGenesisState

func NewDefaultGenesisState() wasmapp.GenesisState

NewDefaultGenesisState generates the default state for the application.

func RegisterSwaggerAPI

func RegisterSwaggerAPI(rtr *mux.Router)

RegisterSwaggerAPI registers swagger route with API Server

Types

type EmptyBaseAppOptions

type EmptyBaseAppOptions struct{}

EmptyBaseAppOptions is a stub implementing AppOptions

func (EmptyBaseAppOptions) Get

func (ao EmptyBaseAppOptions) Get(o string) interface{}

Get implements AppOptions

type WasmPlusApp

type WasmPlusApp struct {
	*baseapp.BaseApp

	// keepers
	AccountKeeper       authkeeper.AccountKeeper
	BankKeeper          bankkeeper.Keeper
	CapabilityKeeper    *capabilitykeeper.Keeper
	StakingKeeper       stakingkeeper.Keeper
	SlashingKeeper      slashingkeeper.Keeper
	MintKeeper          mintkeeper.Keeper
	DistrKeeper         distrkeeper.Keeper
	GovKeeper           govkeeper.Keeper
	CrisisKeeper        crisiskeeper.Keeper
	UpgradeKeeper       upgradekeeper.Keeper
	ParamsKeeper        paramskeeper.Keeper
	EvidenceKeeper      evidencekeeper.Keeper
	IBCKeeper           *ibckeeper.Keeper // IBC Keeper must be a pointer in the app, so we can SetRouter on it correctly
	ICAControllerKeeper icacontrollerkeeper.Keeper
	ICAHostKeeper       icahostkeeper.Keeper
	TransferKeeper      ibctransferkeeper.Keeper
	FeeGrantKeeper      feegrantkeeper.Keeper
	AuthzKeeper         authzkeeper.Keeper
	WasmKeeper          wasmpluskeeper.Keeper

	ScopedIBCKeeper           capabilitykeeper.ScopedKeeper
	ScopedICAHostKeeper       capabilitykeeper.ScopedKeeper
	ScopedICAControllerKeeper capabilitykeeper.ScopedKeeper
	ScopedTransferKeeper      capabilitykeeper.ScopedKeeper
	ScopedWasmKeeper          capabilitykeeper.ScopedKeeper

	// make IBC modules public for test purposes
	// these modules are never directly routed to by the IBC Router
	ICAAuthModule ibcmock.IBCModule
	// contains filtered or unexported fields
}

WasmPlusApp extended ABCI application

func NewWasmApp

func NewWasmApp(
	logger log.Logger,
	db dbm.DB,
	traceStore io.Writer,
	loadLatest bool,
	skipUpgradeHeights map[int64]bool,
	homePath string,
	invCheckPeriod uint,
	encodingConfig wasmappparams.EncodingConfig,
	enabledProposals []wasmtypes.ProposalType,
	appOpts servertypes.AppOptions,
	wasmOpts []wasmkeeper.Option,
	baseAppOptions ...func(*baseapp.BaseApp),
) *WasmPlusApp

NewWasmApp returns a reference to an initialized WasmPlusApp.

func Setup

func Setup(isCheckTx bool, opts ...wasm.Option) *WasmPlusApp

Setup initializes a new WasmApp with DefaultNodeHome for integration tests

func (*WasmPlusApp) AppCodec

func (app *WasmPlusApp) AppCodec() codec.Codec

func (*WasmPlusApp) BeginBlocker

BeginBlocker application updates every begin block

func (*WasmPlusApp) BlockedAddrs

func (app *WasmPlusApp) BlockedAddrs() map[string]bool

BlockedAddrs returns all the app's module account addresses that are not allowed to receive external tokens.

func (*WasmPlusApp) EndBlocker

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

EndBlocker application updates every end block

func (*WasmPlusApp) ExportAppStateAndValidators

func (app *WasmPlusApp) ExportAppStateAndValidators(
	forZeroHeight bool, jailAllowedAddrs []string,
) (servertypes.ExportedApp, error)

ExportAppStateAndValidators exports the state of the application for a genesis file.

func (*WasmPlusApp) InitChainer

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

InitChainer application update at chain initialization

func (*WasmPlusApp) LegacyAmino

func (app *WasmPlusApp) LegacyAmino() *codec.LegacyAmino

LegacyAmino returns legacy amino codec.

NOTE: This is solely to be used for testing purposes as it may be desirable for modules to register their own custom testing types.

func (*WasmPlusApp) LoadHeight

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

LoadHeight loads a particular height

func (*WasmPlusApp) ModuleAccountAddrs

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

ModuleAccountAddrs returns all the app's module account addresses.

func (*WasmPlusApp) ModuleConfigurator

func (app *WasmPlusApp) ModuleConfigurator() module.Configurator

ModuleConfigurator returns instance

func (*WasmPlusApp) ModuleManager

func (app *WasmPlusApp) ModuleManager() module.Manager

ModuleManager returns instance

func (*WasmPlusApp) Name

func (app *WasmPlusApp) Name() string

Name returns the name of the App

func (*WasmPlusApp) RegisterAPIRoutes

func (app *WasmPlusApp) RegisterAPIRoutes(apiSvr *api.Server, apiConfig config.APIConfig)

RegisterAPIRoutes registers all application module routes with the provided API server.

func (*WasmPlusApp) RegisterNodeService

func (app *WasmPlusApp) RegisterNodeService(clientCtx client.Context)

func (*WasmPlusApp) RegisterTendermintService

func (app *WasmPlusApp) RegisterTendermintService(clientCtx client.Context)

RegisterTendermintService implements the Application.RegisterTendermintService method.

func (*WasmPlusApp) RegisterTxService

func (app *WasmPlusApp) RegisterTxService(clientCtx client.Context)

RegisterTxService implements the Application.RegisterTxService method.

func (*WasmPlusApp) SimulationManager

func (app *WasmPlusApp) SimulationManager() *module.SimulationManager

SimulationManager implements the SimulationApp interface

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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