app

package
v3.2.0 Latest Latest
Warning

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

Go to latest
Published: Feb 5, 2025 License: MIT Imports: 81 Imported by: 0

Documentation

Index

Constants

View Source
const (
	NodeDir = ".thornode"
)
View Source
const (
	TestApp = "testApp"
)

Variables

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

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

View Source
var Upgrades = []upgrades.Upgrade{

	standard.NewUpgrade("3.2.0"),
}

Upgrades list of chain upgrades

Functions

func BlockedAddresses

func BlockedAddresses() map[string]bool

BlockedAddresses returns all the app's blocked account addresses.

func GetMaccPerms

func GetMaccPerms() map[string][]string

GetMaccPerms returns a copy of the module account permissions

NOTE: This is solely to be used for testing purposes.

func MakeEncodingConfig

func MakeEncodingConfig() params.EncodingConfig

MakeEncodingConfig creates a new EncodingConfig with all modules registered. For testing only

func NewAnteHandler

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

NewAnteHandler constructor

func NewTestAppOptionsWithFlagHome

func NewTestAppOptionsWithFlagHome(homePath string) servertypes.AppOptions

func RegisterSwaggerAPI

func RegisterSwaggerAPI(rtr *mux.Router, swaggerEnabled bool) error

RegisterSwaggerAPI provides a common function which registers swagger route with API Server

Types

type GenesisState

type GenesisState map[string]json.RawMessage

GenesisState of the blockchain is represented here as a map of raw json messages key'd by a identifier string. The identifier is used to determine which module genesis information belongs to so it may be appropriately routed during init chain. Within this application default genesis information is retrieved from the ModuleBasicManager which populates json from each BasicModule object provided to it during init.

type HandlerOptions

type HandlerOptions struct {
	ante.HandlerOptions

	TXCounterStoreService corestoretypes.KVStoreService

	BypassMinFeeMsgTypes []string

	THORChainKeeper keeper.Keeper
}

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

type MsgServiceRouter

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

MsgServiceRouter extends baseapp's MsgServiceRouter to support custom routing

func NewMsgServiceRouter

func NewMsgServiceRouter(bAppMsr *baseapp.MsgServiceRouter) *MsgServiceRouter

func (*MsgServiceRouter) AddCustomRoute

func (msr *MsgServiceRouter) AddCustomRoute(serviceName string, handler interface{})

func (*MsgServiceRouter) RegisterService

func (msr *MsgServiceRouter) RegisterService(sd *grpc.ServiceDesc, handler interface{})

type THORChainApp

type THORChainApp struct {
	*baseapp.BaseApp

	// keepers
	AccountKeeper         authkeeper.AccountKeeper
	BankKeeper            bankkeeper.BaseKeeper
	StakingKeeper         *stakingkeeper.Keeper
	MintKeeper            mintkeeper.Keeper
	UpgradeKeeper         *upgradekeeper.Keeper
	ParamsKeeper          paramskeeper.Keeper
	ConsensusParamsKeeper consensusparamkeeper.Keeper

	ThorchainKeeper thorchainkeeper.Keeper

	// the module manager
	ModuleManager      *module.Manager
	BasicModuleManager module.BasicManager
	// contains filtered or unexported fields
}

ChainApp extended ABCI application

func NewChainApp

func NewChainApp(
	logger log.Logger,
	db dbm.DB,
	traceStore io.Writer,
	loadLatest bool,
	appOpts servertypes.AppOptions,
	baseAppOptions ...func(*baseapp.BaseApp),
) *THORChainApp

NewChainApp returns a reference to an initialized ChainApp.

func (*THORChainApp) AppCodec

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

AppCodec returns app 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 (*THORChainApp) AutoCliOpts

func (app *THORChainApp) AutoCliOpts() autocli.AppOptions

AutoCliOpts returns the autocli options for the app.

func (*THORChainApp) BeginBlocker

func (app *THORChainApp) BeginBlocker(ctx sdk.Context) (sdk.BeginBlock, error)

BeginBlocker application updates every begin block

func (*THORChainApp) Configurator

func (a *THORChainApp) Configurator() module.Configurator

func (*THORChainApp) DefaultGenesis

func (a *THORChainApp) DefaultGenesis() map[string]json.RawMessage

DefaultGenesis returns a default genesis from the registered AppModuleBasic's.

func (*THORChainApp) EndBlocker

func (app *THORChainApp) EndBlocker(ctx sdk.Context) (sdk.EndBlock, error)

EndBlocker application updates every end block

func (*THORChainApp) ExportAppStateAndValidators

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

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

func (*THORChainApp) FinalizeBlock

func (*THORChainApp) GetKey

func (app *THORChainApp) GetKey(storeKey string) *storetypes.KVStoreKey

GetKey returns the KVStoreKey for the provided store key.

NOTE: This is solely to be used for testing purposes.

func (*THORChainApp) GetStoreKeys

func (app *THORChainApp) GetStoreKeys() []storetypes.StoreKey

GetStoreKeys returns all the stored store keys.

func (*THORChainApp) GetSubspace

func (app *THORChainApp) GetSubspace(moduleName string) paramstypes.Subspace

GetSubspace returns a param subspace for a given module name.

NOTE: This is solely to be used for testing purposes.

func (*THORChainApp) GetTKey

func (app *THORChainApp) GetTKey(storeKey string) *storetypes.TransientStoreKey

GetTKey returns the TransientStoreKey for the provided store key.

NOTE: This is solely to be used for testing purposes.

func (*THORChainApp) InitChainer

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

InitChainer application update at chain initialization

func (*THORChainApp) InterfaceRegistry

func (app *THORChainApp) InterfaceRegistry() types.InterfaceRegistry

InterfaceRegistry returns ChainApp's InterfaceRegistry

func (*THORChainApp) LegacyAmino

func (app *THORChainApp) 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 (*THORChainApp) LoadHeight

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

LoadHeight loads a particular height

func (*THORChainApp) MsgServiceRouter

func (app *THORChainApp) MsgServiceRouter() *MsgServiceRouter

MsgServiceRouter returns the MsgServiceRouter.

func (*THORChainApp) Name

func (app *THORChainApp) Name() string

Name returns the name of the App

func (*THORChainApp) PreBlocker

func (app *THORChainApp) PreBlocker(ctx sdk.Context, req *abci.RequestFinalizeBlock) (*sdk.ResponsePreBlock, error)

PreBlocker application updates every pre block

func (*THORChainApp) RegisterAPIRoutes

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

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

func (*THORChainApp) RegisterNodeService

func (app *THORChainApp) RegisterNodeService(clientCtx client.Context, cfg config.Config)

func (*THORChainApp) RegisterTendermintService

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

RegisterTendermintService implements the Application.RegisterTendermintService method.

func (*THORChainApp) RegisterTxService

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

RegisterTxService implements the Application.RegisterTxService method.

func (*THORChainApp) RegisterUpgradeHandlers

func (app *THORChainApp) RegisterUpgradeHandlers()

RegisterUpgradeHandlers registers the chain upgrade handlers

func (*THORChainApp) SetInterfaceRegistry

func (app *THORChainApp) SetInterfaceRegistry(registry types.InterfaceRegistry)

SetInterfaceRegistry sets the InterfaceRegistry.

func (*THORChainApp) SimulationManager

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

SimulationManager implements the SimulationApp interface

func (*THORChainApp) TxConfig

func (app *THORChainApp) TxConfig() client.TxConfig

TxConfig returns ChainApp's TxConfig

Directories

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

Jump to

Keyboard shortcuts

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