app

package
v30.0.0 Latest Latest
Warning

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

Go to latest
Published: Nov 18, 2025 License: Apache-2.0 Imports: 233 Imported by: 0

Documentation

Index

Constants

View Source
const (
	AccountAddressPrefix = "stride"
	Name                 = "stride"
)
View Source
const Bech32Prefix = "stride"

Variables

View Source
var (
	// DefaultNodeHome default home directories for the application daemon
	DefaultNodeHome string
)

Functions

func GetMaccPerms

func GetMaccPerms() map[string][]string

GetMaccPerms returns a copy of the module account permissions

func InitStrideIBCTestingApp

func InitStrideIBCTestingApp(initValPowers []types.ValidatorUpdate) func() (ibctesting.TestingApp, map[string]json.RawMessage)

Initializes a new Stride App casted as a TestingApp for IBC support

func IsModuleWhiteList

func IsModuleWhiteList(typeUrl string) bool

This is used for non-legacy gov transactions Returning true cause all txs are whitelisted

func IsProposalWhitelisted

func IsProposalWhitelisted(content govv1beta1.Content) bool

This is used for legacy gov transactions Returning true cause all txs are whitelisted

func NewAnteHandler

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

func SetupConfig

func SetupConfig()

Types

type EncodingConfig

type EncodingConfig struct {
	InterfaceRegistry types.InterfaceRegistry
	Codec             codec.Codec
	TxConfig          client.TxConfig
	Amino             *codec.LegacyAmino
}

This data structure (EncodingConfig) is heavily inspired by Quicksilver. https://github.com/ingenuity-build/quicksilver/blob/main/app/encoding.go

func MakeEncodingConfig

func MakeEncodingConfig() EncodingConfig

MakeEncodingConfig creates an EncodingConfig for an amino based test configuration.

type GenesisState

type GenesisState map[string]json.RawMessage

The genesis state 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.

func GenesisStateWithConsumerValSet

func GenesisStateWithConsumerValSet(app *StrideApp) GenesisState

Iniitalize default genesis state as a consumer chain with 1 validator

type HandlerOptions

type HandlerOptions struct {
	ante.HandlerOptions

	IBCKeeper         *ibckeeper.Keeper
	ConsumerKeeper    ccvconsumerkeeper.Keeper
	WasmConfig        *wasmtypes.NodeConfig
	WasmKeeper        *wasmkeeper.Keeper
	TXCounterStoreKey corestoretypes.KVStoreService
}

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

type StrideApp

type StrideApp struct {
	*baseapp.BaseApp

	// Dependency keepers
	// Note: IBC Keeper must be a pointer in the app, so we can SetRouter on it correctly
	VestingKeeper         evmosvestingkeeper.Keeper
	AccountKeeper         authkeeper.AccountKeeper
	BankKeeper            bankkeeper.Keeper
	CapabilityKeeper      *capabilitykeeper.Keeper
	StakingKeeper         stakingkeeper.Keeper
	SlashingKeeper        slashingkeeper.Keeper
	MintKeeper            mintkeeper.Keeper
	DistrKeeper           distrkeeper.Keeper
	GovKeeper             govkeeper.Keeper
	ConsensusParamsKeeper consensusparamkeeper.Keeper
	CrisisKeeper          *crisiskeeper.Keeper
	UpgradeKeeper         *upgradekeeper.Keeper
	ParamsKeeper          paramskeeper.Keeper
	IBCKeeper             *ibckeeper.Keeper
	EvidenceKeeper        evidencekeeper.Keeper
	TransferKeeper        ibctransferkeeper.Keeper
	FeeGrantKeeper        feegrantkeeper.Keeper
	ICAControllerKeeper   icacontrollerkeeper.Keeper
	ICAHostKeeper         icahostkeeper.Keeper
	ConsumerKeeper        ccvconsumerkeeper.Keeper
	AutopilotKeeper       autopilotkeeper.Keeper
	PacketForwardKeeper   *packetforwardkeeper.Keeper
	WasmKeeper            wasmkeeper.Keeper
	ContractKeeper        *wasmkeeper.PermissionedKeeper
	IBCHooksKeeper        ibchookskeeper.Keeper
	WasmClientKeeper      ibcwasmkeeper.Keeper

	// Middleware for IBCHooks
	Ics20WasmHooks   *ibchooks.WasmHooks
	HooksICS4Wrapper ibchooks.ICS4Middleware

	// Scoped keepers (for ICA)
	// TODO: See if we can get rid of these
	ScopedIBCKeeper           capabilitykeeper.ScopedKeeper
	ScopedTransferKeeper      capabilitykeeper.ScopedKeeper
	ScopedICAControllerKeeper capabilitykeeper.ScopedKeeper
	ScopedICAHostKeeper       capabilitykeeper.ScopedKeeper
	ScopedCCVConsumerKeeper   capabilitykeeper.ScopedKeeper
	ScopedWasmKeeper          capabilitykeeper.ScopedKeeper

	// Stride keepers
	StakeibcKeeper        stakeibcmodulekeeper.Keeper
	EpochsKeeper          epochsmodulekeeper.Keeper
	InterchainqueryKeeper interchainquerykeeper.Keeper
	ScopedRecordsKeeper   capabilitykeeper.ScopedKeeper
	RecordsKeeper         recordsmodulekeeper.Keeper
	IcacallbacksKeeper    icacallbacksmodulekeeper.Keeper
	ScopedratelimitKeeper capabilitykeeper.ScopedKeeper
	RatelimitKeeper       ratelimitkeeper.Keeper
	ClaimKeeper           claimkeeper.Keeper
	ICAOracleKeeper       icaoraclekeeper.Keeper
	StaketiaKeeper        staketiakeeper.Keeper
	StakedymKeeper        stakedymkeeper.Keeper
	AirdropKeeper         airdropkeeper.Keeper
	ICQOracleKeeper       icqoraclekeeper.Keeper
	AuctionKeeper         auctionkeeper.Keeper
	StrdBurnerKeeper      strdburnerkeeper.Keeper

	// Module managers
	ModuleManager      *module.Manager
	BasicModuleManager module.BasicManager
	// contains filtered or unexported fields
}

StrideApp 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 InitStrideAppForTestnet

func InitStrideAppForTestnet(app *StrideApp, newValAddr bytes.HexBytes, newValPubKey crypto.PubKey, newOperatorAddress, upgradeToTrigger string) *StrideApp

Initialize a local testnet using mainnet state The Staking, Slashing, and Distribution changes are required - everything beyond that is custom

func InitStrideTestApp

func InitStrideTestApp(initChain bool) *StrideApp

Initializes a new StrideApp without IBC functionality

func NewStrideApp

func NewStrideApp(
	logger log.Logger,
	db dbm.DB,
	traceStore io.Writer,
	loadLatest bool,
	appOpts servertypes.AppOptions,
	wasmOpts []wasmkeeper.Option,
	baseAppOptions ...func(*baseapp.BaseApp),
) *StrideApp

RUN GOSEC New returns a reference to an initialized blockchain app

func (*StrideApp) AppCodec

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

AppCodec returns an 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 (*StrideApp) AutoCliOpts

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

AutoCliOpts returns the autocli options for the app.

func (*StrideApp) BeginBlocker

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

BeginBlocker application updates every begin block

func (*StrideApp) BlacklistedModuleAccountAddrs

func (app *StrideApp) BlacklistedModuleAccountAddrs() map[string]bool

ModuleAccountAddrs returns all the app's module account addresses.

func (*StrideApp) DefaultGenesis

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

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

func (*StrideApp) EndBlocker

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

EndBlocker application updates every end block

func (*StrideApp) ExportAppStateAndValidators

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

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

func (*StrideApp) GetBaseApp

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

GetBaseApp returns the base app of the application

func (*StrideApp) GetConsumerKeeper

func (app *StrideApp) GetConsumerKeeper() ccvconsumerkeeper.Keeper

ConsumerApp interface implementations for e2e tests GetConsumerKeeper implements the ConsumerApp interface.

func (*StrideApp) GetIBCKeeper

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

GetIBCKeeper implements the TestingApp interface.

func (*StrideApp) GetKey

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

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

GetMemKey returns the MemStoreKey for the provided mem key.

NOTE: This is solely used for testing purposes.

func (*StrideApp) GetScopedIBCKeeper

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

GetScopedIBCKeeper implements the TestingApp interface.

func (*StrideApp) GetStakingKeeper

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

GetStakingKeeper implements the TestingApp interface.

func (*StrideApp) GetStoreKeys

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

GetStoreKeys returns all the stored store keys.

func (*StrideApp) GetSubspace

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

func (app *StrideApp) 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 (*StrideApp) GetTransferKeeper

func (app *StrideApp) GetTransferKeeper() *ibctransferkeeper.Keeper

GetIBCKeeper implements the TestingApp interface.

func (*StrideApp) GetTxConfig

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

GetTxConfig implements the TestingApp interface.

func (*StrideApp) InitChainer

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

InitChainer application update at chain initialization

func (*StrideApp) InterfaceRegistry

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

InterfaceRegistry returns an InterfaceRegistry

func (*StrideApp) LegacyAmino

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

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

LoadHeight loads a particular height

func (*StrideApp) ModuleAccountAddrs

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

ModuleAccountAddrs returns all the app's module account addresses.

func (*StrideApp) Name

func (app *StrideApp) Name() string

Name returns the name of the App

func (*StrideApp) PreBlocker

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

PreBlocker application updates every pre block

func (*StrideApp) Precommitter

func (app *StrideApp) Precommitter(ctx sdk.Context)

Precommitter application updates before the commital of a block after all transactions have been delivered.

func (*StrideApp) PrepareCheckStater

func (app *StrideApp) PrepareCheckStater(ctx sdk.Context)

func (*StrideApp) RegisterAPIRoutes

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

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

func (*StrideApp) RegisterNodeService

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

RegisterNodeService registers the node gRPC Query service.

func (*StrideApp) RegisterTendermintService

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

RegisterTendermintService implements the Application.RegisterTendermintService method.

func (*StrideApp) RegisterTxService

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

RegisterTxService implements the Application.RegisterTxService method.

func (*StrideApp) SimulationManager

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

SimulationManager implements the SimulationApp interface

Directories

Path Synopsis
upgrades
v10
v11
v12
v13
v14
v15
v16
v17
v18
v19
v2
v20
v21
v22
v23
v24
v25
v26
v27
v28
v29
v3
v30
v4
v5
v6
v7
v8
v9

Jump to

Keyboard shortcuts

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