app

package
v0.0.0-...-50c319b Latest Latest
Warning

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

Go to latest
Published: May 19, 2023 License: Apache-2.0 Imports: 122 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	NodeDir = ".furyad"

	BinaryVersion = "v0.41.2"

	// If EnabledSpecificProposals is "", and this is "true", then enable all x/wasm proposals.
	// If EnabledSpecificProposals is "", and this is not "true", then disable all x/wasm proposals.
	ProposalsEnabled = "true"
	// If set to non-empty string it must be comma-separated list of values that are all a subset
	// of "EnableAllProposals" (takes precedence over ProposalsEnabled)
	// https://github.com/furyunderverse/furya/blob/02a54d33ff2c064f3539ae12d75d027d9c665f05/x/wasm/internal/types/proposal.go#L28-L34
	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("$PWD/") + NodeDir

	// Bech32PrefixAccAddr defines the Bech32 prefix of an account's address
	Bech32PrefixAccAddr = appconfig.Bech32Prefix
	// Bech32PrefixAccPub defines the Bech32 prefix of an account's public key
	Bech32PrefixAccPub = appconfig.Bech32Prefix + sdk.PrefixPublic
	// Bech32PrefixValAddr defines the Bech32 prefix of a validator's operator address
	Bech32PrefixValAddr = appconfig.Bech32Prefix + sdk.PrefixValidator + sdk.PrefixOperator
	// Bech32PrefixValPub defines the Bech32 prefix of a validator's operator public key
	Bech32PrefixValPub = appconfig.Bech32Prefix + sdk.PrefixValidator + sdk.PrefixOperator + sdk.PrefixPublic
	// Bech32PrefixConsAddr defines the Bech32 prefix of a consensus node address
	Bech32PrefixConsAddr = appconfig.Bech32Prefix + sdk.PrefixValidator + sdk.PrefixConsensus
	// Bech32PrefixConsPub defines the Bech32 prefix of a consensus node public key
	Bech32PrefixConsPub = appconfig.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() []wasm.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() appparams.EncodingConfig

MakeEncodingConfig creates an EncodingConfig for gravity.

func NewAnteHandler

func NewAnteHandler(options HandlerOptions) (sdk.AnteHandler, error)

NewAnteHandler returns an AnteHandler that checks and increments sequence numbers, checks signatures & account numbers, and deducts fees from the first signer.

func RegisterSwaggerAPI

func RegisterSwaggerAPI(_ client.Context, rtr *mux.Router)

RegisterSwaggerAPI registers swagger route with API Server

Types

type EmptyAppOptions

type EmptyAppOptions struct{}

EmptyAppOptions is a stub implementing AppOptions

func (EmptyAppOptions) Get

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

Get implements AppOptions

type FuryunderverseApp

type FuryunderverseApp struct {
	*baseapp.BaseApp
	// contains filtered or unexported fields
}

FuryunderverseApp extended ABCI application

func NewFuryunderverseApp

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

NewFuryunderverseApp returns a reference to an initialized FuryunderverseApp.

func (*FuryunderverseApp) BeginBlocker

application updates every begin block

func (*FuryunderverseApp) BlockedAddrs

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

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

func (*FuryunderverseApp) EndBlocker

EndBlocker application updates every end block

func (*FuryunderverseApp) ExportAppStateAndValidators

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

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

func (*FuryunderverseApp) InitChainer

InitChainer application update at chain initialization

func (*FuryunderverseApp) LegacyAmino

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

LegacyAmino returns SimApp's 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 (*FuryunderverseApp) LoadHeight

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

LoadHeight loads a particular height

func (*FuryunderverseApp) ModuleAccountAddrs

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

ModuleAccountAddrs returns all the app's module account addresses.

func (*FuryunderverseApp) Name

func (app *FuryunderverseApp) Name() string

Name returns the name of the App

func (*FuryunderverseApp) RegisterAPIRoutes

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

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

func (*FuryunderverseApp) RegisterNodeService

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

func (*FuryunderverseApp) RegisterTendermintService

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

RegisterTendermintService implements the Application.RegisterTendermintService method.

func (*FuryunderverseApp) RegisterTxService

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

RegisterTxService implements the Application.RegisterTxService method.

func (*FuryunderverseApp) SimulationManager

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

SimulationManager implements the SimulationApp interface

type GenesisState

type GenesisState map[string]json.RawMessage

GenesisState default state for the application

func NewDefaultGenesisState

func NewDefaultGenesisState(cdc codec.Codec) GenesisState

NewDefaultGenesisState generates the default state for the application.

type HandlerOptions

type HandlerOptions struct {
	ante.HandlerOptions

	IBCKeeper         *keeper.Keeper
	TxCounterStoreKey sdk.StoreKey
	WasmConfig        wasmTypes.WasmConfig
	Cdc               codec.BinaryCodec
}

HandlerOptions extends the SDK's AnteHandler options by requiring the IBC channel keeper.

type MinCommissionDecorator

type MinCommissionDecorator struct {
	// contains filtered or unexported fields
}

func NewMinCommissionDecorator

func NewMinCommissionDecorator(cdc codec.BinaryCodec) MinCommissionDecorator

func (MinCommissionDecorator) AnteHandle

func (min MinCommissionDecorator) AnteHandle(
	ctx sdk.Context, tx sdk.Tx,
	simulate bool, next sdk.AnteHandler) (newCtx sdk.Context, err error)

type TestSupport

type TestSupport struct {
	// contains filtered or unexported fields
}

func NewTestSupport

func NewTestSupport(t *testing.T, app *FuryunderverseApp) *TestSupport

func (TestSupport) AppCodec

func (s TestSupport) AppCodec() codec.Codec

func (TestSupport) BankKeeper

func (s TestSupport) BankKeeper() bankkeeper.Keeper

func (TestSupport) IBCKeeper

func (s TestSupport) IBCKeeper() ibckeeper.Keeper

func (TestSupport) StakingKeeper

func (s TestSupport) StakingKeeper() stakingkeeper.Keeper

func (TestSupport) TransferKeeper

func (s TestSupport) TransferKeeper() ibctransferkeeper.Keeper

func (TestSupport) WasmKeeper

func (s TestSupport) WasmKeeper() wasm.Keeper

Directories

Path Synopsis
Package params defines the simulation parameters in the simapp.
Package params defines the simulation parameters in the simapp.

Jump to

Keyboard shortcuts

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