app

package
v0.6.0-rc.7-hotfix Latest Latest
Warning

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

Go to latest
Published: Aug 28, 2024 License: LGPL-3.0 Imports: 147 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Name = "settlus"
)

Variables

View Source
var DefaultConsensusParams = &tmproto.ConsensusParams{
	Block: &tmproto.BlockParams{
		MaxBytes: 200000,
		MaxGas:   -1,
	},
	Evidence: &tmproto.EvidenceParams{
		MaxAgeNumBlocks: 302400,
		MaxAgeDuration:  504 * time.Hour,
		MaxBytes:        10000,
	},
	Validator: &tmproto.ValidatorParams{
		PubKeyTypes: []string{
			tmtypes.ABCIPubKeyTypeEd25519,
		},
	},
}

DefaultConsensusParams defines the default Tendermint consensus params used in Settlus testing.

View Source
var DefaultNodeHome string

DefaultNodeHome default home directories for the application daemon

module account permissions

Functions

func GenesisStateWithValSet

func GenesisStateWithValSet(app *SettlusApp, genesisState simapp.GenesisState,
	valSet *tmtypes.ValidatorSet, genAccs []authtypes.GenesisAccount,
	balances ...banktypes.Balance,
) simapp.GenesisState

func MakeEncodingConfig

func MakeEncodingConfig() simappparams.EncodingConfig

MakeEncodingConfig creates an EncodingConfig for testing

func NewDefaultGenesisState

func NewDefaultGenesisState() simapp.GenesisState

NewDefaultGenesisState generates the default state for the application.

func ObservabilityViews

func ObservabilityViews() (views []*view.View)

Types

type AppKeepers

type AppKeepers struct {

	// SDK Keepers
	AccountKeeper         authkeeper.AccountKeeper
	AuthzKeeper           authzkeeper.Keeper
	BankKeeper            bankkeeper.Keeper
	CapabilityKeeper      *capabilitykeeper.Keeper
	CrisisKeeper          *crisiskeeper.Keeper
	DistrKeeper           distrkeeper.Keeper
	StakingKeeper         *stakingkeeper.Keeper
	SlashingKeeper        slashingkeeper.Keeper
	MintKeeper            mintkeeper.Keeper
	GovKeeper             *govkeeper.Keeper
	UpgradeKeeper         *upgradekeeper.Keeper
	ParamsKeeper          paramskeeper.Keeper
	FeeGrantKeeper        feegrantkeeper.Keeper
	EvidenceKeeper        evidencekeeper.Keeper
	TransferKeeper        transferkeeper.Keeper
	ConsensusParamsKeeper consensusparamkeeper.Keeper

	// IBC Keepers
	IBCKeeper *ibckeeper.Keeper // IBC Keeper must be a pointer in the app, so we can SetRouter on it correctly
	// make scoped keepers public for test purposes
	ScopedIBCKeeper      capabilitykeeper.ScopedKeeper
	ScopedTransferKeeper capabilitykeeper.ScopedKeeper

	// this line is used by starport scaffolding # stargate/app/keeperDeclaration
	// Evmos keepers
	EvmKeeper       *evmkeeper.Keeper
	FeeMarketKeeper feemarketkeeper.Keeper
	Erc20Keeper     erc20keeper.Keeper

	// Settlus keepers
	SettlementKeeper *settlementmodulekeeper.SettlementKeeper
	OracleKeeper     *oraclemodulekeeper.Keeper
	// contains filtered or unexported fields
}

func NewAppKeeper

func NewAppKeeper(
	appCodec codec.Codec,
	bApp *baseapp.BaseApp,
	legacyAmino *codec.LegacyAmino,
	maccPerms map[string][]string,
	blockedAddress map[string]bool,
	skipUpgradeHeights map[int64]bool,
	homePath string,
	invCheckPeriod uint,
	logger log.Logger,
	appOpts servertypes.AppOptions,
) AppKeepers

func (*AppKeepers) GenerateKeys

func (appKeepers *AppKeepers) GenerateKeys()

func (*AppKeepers) GetKVStoreKey

func (appKeepers *AppKeepers) GetKVStoreKey() map[string]*storetypes.KVStoreKey

func (*AppKeepers) GetKey

func (appKeepers *AppKeepers) 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 (*AppKeepers) GetMemKey

func (appKeepers *AppKeepers) GetMemKey(storeKey string) *storetypes.MemoryStoreKey

GetMemKey returns the MemStoreKey for the provided mem key.

NOTE: This is solely used for testing purposes.

func (*AppKeepers) GetMemoryStoreKey

func (appKeepers *AppKeepers) GetMemoryStoreKey() map[string]*storetypes.MemoryStoreKey

func (*AppKeepers) GetSubspace

func (appKeepers *AppKeepers) GetSubspace(moduleName string) paramstypes.Subspace

GetSubspace returns a param subspace for a given module name.

func (*AppKeepers) GetTKey

func (appKeepers *AppKeepers) 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 (*AppKeepers) GetTransientStoreKey

func (appKeepers *AppKeepers) GetTransientStoreKey() map[string]*storetypes.TransientStoreKey

type SettlusApp

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

SettlusApp extends an ABCI application, but with most of its parameters exported. They are exported for convenience in creating helper functions, as object capabilities aren't needed for testing.

func NewSettlus

func NewSettlus(
	logger log.Logger,
	db dbm.DB,
	traceStore io.Writer,
	loadLatest bool,
	skipUpgradeHeights map[int64]bool,
	homePath string,
	invCheckPeriod uint,
	encodingConfig simappparams.EncodingConfig,
	appOpts servertypes.AppOptions,
	baseAppOptions ...func(*baseapp.BaseApp),
) *SettlusApp

NewSettlus returns a reference to an initialized blockchain app

func Setup

func Setup(
	isCheckTx bool,
	feemarketGenesis *feemarkettypes.GenesisState,
	chainID string,
) *SettlusApp

Setup initializes a new App. A Nop logger is set in App.

func (*SettlusApp) AppCodec

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

AppCodec returns Settlus's 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 (*SettlusApp) BeginBlocker

func (app *SettlusApp) BeginBlocker(ctx sdk.Context, req abci.RequestBeginBlock) abci.ResponseBeginBlock

BeginBlocker runs the Tendermint ABCI BeginBlock logic. It executes state changes at the beginning of the new block for every registered module. If there is a registered fork at the current height, BeginBlocker will schedule the upgrade plan and perform the state migration (if any).

func (*SettlusApp) BlockedModuleAccountAddrs

func (app *SettlusApp) BlockedModuleAccountAddrs() map[string]bool

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

func (*SettlusApp) DeliverTx

func (app *SettlusApp) DeliverTx(req abci.RequestDeliverTx) (res abci.ResponseDeliverTx)

The DeliverTx method is intentionally decomposed to calculate the transactions per second.

func (*SettlusApp) EndBlocker

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

EndBlocker updates every end block

func (*SettlusApp) ExportAppStateAndValidators

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

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

func (*SettlusApp) GetBaseApp

func (app *SettlusApp) GetBaseApp() *baseapp.BaseApp

GetBaseApp implements the TestingApp interface.

func (*SettlusApp) GetIBCKeeper

func (app *SettlusApp) GetIBCKeeper() *ibckeeper.Keeper

GetIBCKeeper implements the TestingApp interface.

func (*SettlusApp) GetKey

func (app *SettlusApp) 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 (*SettlusApp) GetMemKey

func (app *SettlusApp) GetMemKey(storeKey string) *storetypes.MemoryStoreKey

GetMemKey returns the MemStoreKey for the provided mem key.

NOTE: This is solely used for testing purposes.

func (*SettlusApp) GetScopedIBCKeeper

func (app *SettlusApp) GetScopedIBCKeeper() capabilitykeeper.ScopedKeeper

GetScopedIBCKeeper implements the TestingApp interface.

func (*SettlusApp) GetStakingKeeper

func (app *SettlusApp) GetStakingKeeper() ibctestingtypes.StakingKeeper

GetStakingKeeper implements the TestingApp interface.

func (*SettlusApp) GetSubspace

func (app *SettlusApp) 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 (*SettlusApp) GetTKey

func (app *SettlusApp) 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 (*SettlusApp) GetTxConfig

func (app *SettlusApp) GetTxConfig() client.TxConfig

GetTxConfig implements the TestingApp interface.

func (*SettlusApp) InitChainer

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

InitChainer updates at chain initialization

func (*SettlusApp) InterfaceRegistry

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

InterfaceRegistry returns Settlus's InterfaceRegistry

func (*SettlusApp) LegacyAmino

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

LegacyAmino returns Settlus'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 (*SettlusApp) LoadHeight

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

LoadHeight loads state at a particular height

func (*SettlusApp) ModuleAccountAddrs

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

ModuleAccountAddrs returns all the app's module account addresses.

func (*SettlusApp) Name

func (app *SettlusApp) Name() string

Name returns the name of the App

func (*SettlusApp) RegisterAPIRoutes

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

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

func (*SettlusApp) RegisterNodeService

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

RegisterNodeService registers the node gRPC service on the provided application gRPC query router.

func (*SettlusApp) RegisterTendermintService

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

RegisterTendermintService implements the Application.RegisterTendermintService method.

func (*SettlusApp) RegisterTxService

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

func (*SettlusApp) SimulationManager

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

SimulationManager implements the SimulationApp interface

Directories

Path Synopsis
upgrades
v1

Jump to

Keyboard shortcuts

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