Documentation
¶
Index ¶
- Variables
- func AppConfig() depinject.Config
- func NewAppOptionsWithFlagHome(homePath string) servertypes.AppOptions
- func ProvideExchangeDummyCustomSigners() []signing.CustomGetSigner
- func ProvideMarkerKeeperStub() *markerkeeper.Keeper
- type AppOptionsMap
- type GenesisState
- type GroupCheckerFunc
- type GroupPolicyQuerier
- type SimApp
- func (app *SimApp) AppCodec() codec.Codec
- func (app *SimApp) ExportAppStateAndValidators(forZeroHeight bool, jailAllowedAddrs []string, modulesToExport []string) (servertypes.ExportedApp, error)
- func (app *SimApp) GetKey(storeKey string) *storetypes.KVStoreKey
- func (app *SimApp) GetMemKey(memKey string) *storetypes.MemoryStoreKey
- func (app *SimApp) GetSubspace(moduleName string) paramstypes.Subspace
- func (app *SimApp) LegacyAmino() *codec.LegacyAmino
- func (app *SimApp) RegisterLegacyModules() error
- func (app *SimApp) RegisterProvenanceModules() error
- func (app *SimApp) SimulationManager() *module.SimulationManager
Constants ¶
This section is empty.
Variables ¶
var AppConfigYAML []byte
var DefaultConsensusParams = &cmttmtypes.ConsensusParams{ Block: &cmttmtypes.BlockParams{ MaxBytes: 200000, MaxGas: 60_000_000, }, Evidence: &cmttmtypes.EvidenceParams{ MaxAgeNumBlocks: 302400, MaxAgeDuration: 504 * time.Hour, MaxBytes: 10000, }, Validator: &cmttmtypes.ValidatorParams{ PubKeyTypes: []string{ cmttypes.ABCIPubKeyTypeEd25519, }, }, }
DefaultConsensusParams defines the default consensus params used in SimApp testing.
var DefaultNodeHome string
Functions ¶
func NewAppOptionsWithFlagHome ¶
func NewAppOptionsWithFlagHome(homePath string) servertypes.AppOptions
func ProvideExchangeDummyCustomSigners ¶
func ProvideExchangeDummyCustomSigners() []signing.CustomGetSigner
ProvideExchangeDummyCustomSigners returns a slice of dummy CustomGetSigner functions for the exchange module. These are used to register placeholder signer functions for specific message types (e.g., MsgAcceptPaymentRequest, MsgCreatePaymentRequest) to satisfy the signing context validation during app initialization.
func ProvideMarkerKeeperStub ¶
func ProvideMarkerKeeperStub() *markerkeeper.Keeper
ProvideMarkerKeeperStub returns an empty markerkeeper.Keeper instance.
This stub is used to satisfy dependency injection requirements when wiring the Vault module in the app module configuration. It allows the Vault module to be included in the dependency graph even though the actual MarkerKeeper is initialized separately using the legacy Provenance wiring in SimApp.
This function should only be used during app setup and should not be relied on at runtime, as the returned keeper is not fully configured and will panic if used.
Types ¶
type AppOptionsMap ¶
type AppOptionsMap map[string]interface{}
func (AppOptionsMap) Get ¶
func (m AppOptionsMap) Get(key string) interface{}
type GenesisState ¶
type GenesisState map[string]json.RawMessage
type GroupCheckerFunc ¶
type GroupCheckerFunc func(sdk.Context, sdk.AccAddress) bool
GroupCheckerFunc convenient type to match the GroupChecker interface.
func NewGroupCheckerFunc ¶
func NewGroupCheckerFunc(querier GroupPolicyQuerier) GroupCheckerFunc
NewGroupCheckerFunc creates a new GroupChecker function for checking if an account is in a group.
func (GroupCheckerFunc) IsGroupAddress ¶
func (t GroupCheckerFunc) IsGroupAddress(ctx sdk.Context, account sdk.AccAddress) bool
IsGroupAddress checks if the account is a group address.
type GroupPolicyQuerier ¶
type GroupPolicyQuerier interface {
GroupPolicyInfo(goCtx context.Context, request *group.QueryGroupPolicyInfoRequest) (*group.QueryGroupPolicyInfoResponse, error)
}
GroupPolicyQuerier provides functionality to query group policies.
type SimApp ¶
type SimApp struct {
*runtime.App
// Cosmos Modules
AccountKeeper authkeeper.AccountKeeper
BankKeeper bankkeeper.Keeper
ConsensusKeeper consensuskeeper.Keeper
CrisisKeeper *crisiskeeper.Keeper
ParamsKeeper paramskeeper.Keeper
StakingKeeper *stakingkeeper.Keeper
UpgradeKeeper *upgradekeeper.Keeper
AuthzKeeper authzkeeper.Keeper
FeegrantKeeper feegrantkeeper.Keeper
GroupKeeper groupkeeper.Keeper
// TODO We want to set this up
GovKeeper *govkeeper.Keeper
DistributionKeeper *distributionkeeper.Keeper
// IBC Modules
CapabilityKeeper *capabilitykeeper.Keeper
IBCKeeper *ibckeeper.Keeper
// Provenance Modules
NameKeeper namekeeper.Keeper
AttributeKeeper attributekeeper.Keeper
MarkerKeeper markerkeeper.Keeper
// ExchangeKeeper exchangekeeper.Keeper
// Custom Modules
VaultKeeper *vaultkeeper.Keeper
// contains filtered or unexported fields
}
SimApp 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 NewSimApp ¶
func NewSimApp( logger log.Logger, db dbm.DB, traceStore io.Writer, loadLatest bool, appOpts servertypes.AppOptions, baseAppOptions ...func(*baseapp.BaseApp), ) (*SimApp, error)
NewSimApp returns a reference to an initialized SimApp.
func SetupWithGenesisValSet ¶
func SetupWithGenesisValSet(t *testing.T, chainID string, valSet *cmttypes.ValidatorSet, genAccs []authtypes.GenesisAccount, balances ...banktypes.Balance) *SimApp
SetupWithGenesisValSet initializes a new App with a validator set and genesis accounts that also act as delegators. For simplicity, each validator is bonded with a delegation of one consensus engine unit in the default token of the app from first genesis account. A Nop logger is set in App.
func (*SimApp) ExportAppStateAndValidators ¶
func (app *SimApp) ExportAppStateAndValidators( forZeroHeight bool, jailAllowedAddrs []string, modulesToExport []string, ) (servertypes.ExportedApp, error)
ExportAppStateAndValidators exports the state of the application for a genesis file.
func (*SimApp) GetKey ¶
func (app *SimApp) GetKey(storeKey string) *storetypes.KVStoreKey
func (*SimApp) GetMemKey ¶
func (app *SimApp) GetMemKey(memKey string) *storetypes.MemoryStoreKey
func (*SimApp) GetSubspace ¶
func (app *SimApp) GetSubspace(moduleName string) paramstypes.Subspace
func (*SimApp) LegacyAmino ¶
func (app *SimApp) LegacyAmino() *codec.LegacyAmino
func (*SimApp) RegisterLegacyModules ¶
func (*SimApp) RegisterProvenanceModules ¶
RegisterProvenanceModules sets up and registers the Provenance modules used by the SimApp, including name, attribute, marker, and vault modules.
It performs the following actions:
- Registers the KV store keys required by the modules.
- Initializes the NameKeeper, AttributeKeeper, and MarkerKeeper using the legacy Provenance wiring pattern.
- Injects the MarkerKeeper into the VaultKeeper to fulfill its dependency.
- Registers the modules with the app for inclusion in BeginBlocker, EndBlocker, InitGenesis, etc.
This function is typically called during app initialization to ensure all Provenance modules are correctly configured and available.
Returns an error if store registration fails.
func (*SimApp) SimulationManager ¶
func (app *SimApp) SimulationManager() *module.SimulationManager