Documentation ¶
Index ¶
- Constants
- Variables
- func GetMaccPerms() map[string][]string
- func InitStrideIBCTestingApp() (ibctesting.TestingApp, map[string]json.RawMessage)
- func IsModuleWhiteList(typeUrl string) bool
- func IsProposalWhitelisted(content govv1beta1.Content) bool
- func NewAnteHandler(options HandlerOptions) (sdk.AnteHandler, error)
- func SetupConfig()
- type EncodingConfig
- type GenesisState
- type HandlerOptions
- type StrideApp
- func (app *StrideApp) AppCodec() codec.Codec
- func (app *StrideApp) BeginBlocker(ctx sdk.Context, req abci.RequestBeginBlock) abci.ResponseBeginBlock
- func (app *StrideApp) BlacklistedModuleAccountAddrs() map[string]bool
- func (app *StrideApp) EndBlocker(ctx sdk.Context, req abci.RequestEndBlock) abci.ResponseEndBlock
- func (app *StrideApp) ExportAppStateAndValidators(forZeroHeight bool, jailAllowedAddrs []string) (servertypes.ExportedApp, error)
- func (app *StrideApp) GetBaseApp() *baseapp.BaseApp
- func (app *StrideApp) GetConsumerKeeper() ccvconsumerkeeper.Keeper
- func (app *StrideApp) GetIBCKeeper() *ibckeeper.Keeper
- func (app *StrideApp) GetKey(storeKey string) *storetypes.KVStoreKey
- func (app *StrideApp) GetMemKey(storeKey string) *storetypes.MemoryStoreKey
- func (app *StrideApp) GetScopedIBCKeeper() capabilitykeeper.ScopedKeeper
- func (app *StrideApp) GetStakingKeeper() core.StakingKeeper
- func (app *StrideApp) GetSubspace(moduleName string) paramstypes.Subspace
- func (app *StrideApp) GetTKey(storeKey string) *storetypes.TransientStoreKey
- func (app *StrideApp) GetTransferKeeper() *ibctransferkeeper.Keeper
- func (app *StrideApp) GetTxConfig() client.TxConfig
- func (app *StrideApp) InitChainer(ctx sdk.Context, req abci.RequestInitChain) abci.ResponseInitChain
- func (app *StrideApp) InterfaceRegistry() types.InterfaceRegistry
- func (app *StrideApp) LegacyAmino() *codec.LegacyAmino
- func (app *StrideApp) LoadHeight(height int64) error
- func (app *StrideApp) ModuleAccountAddrs() map[string]bool
- func (app *StrideApp) Name() string
- func (app *StrideApp) RegisterAPIRoutes(apiSvr *api.Server, apiConfig config.APIConfig)
- func (app *StrideApp) RegisterNodeService(clientCtx client.Context)
- func (app *StrideApp) RegisterTendermintService(clientCtx client.Context)
- func (app *StrideApp) RegisterTxService(clientCtx client.Context)
- func (app *StrideApp) SimulationManager() *module.SimulationManager
Constants ¶
const ( AccountAddressPrefix = "stride" Name = "stride" )
const Bech32Prefix = "stride"
Variables ¶
var ( // DefaultNodeHome default home directories for the application daemon DefaultNodeHome string // ModuleBasics defines the module BasicManager is in charge of setting up basic, // non-dependant module elements, such as codec registration // and genesis verification. ModuleBasics = module.NewBasicManager( auth.AppModuleBasic{}, genutil.NewAppModuleBasic(genutiltypes.DefaultMessageValidator), bank.AppModuleBasic{}, capability.AppModuleBasic{}, ccvstaking.AppModuleBasic{}, mint.AppModuleBasic{}, ccvdistr.AppModuleBasic{}, gov.NewAppModuleBasic(getGovProposalHandlers()), params.AppModuleBasic{}, crisis.AppModuleBasic{}, slashing.AppModuleBasic{}, feegrantmodule.AppModuleBasic{}, ibc.AppModuleBasic{}, upgrade.AppModuleBasic{}, evidence.AppModuleBasic{}, transfer.AppModuleBasic{}, consensus.AppModuleBasic{}, vesting.AppModuleBasic{}, claimvesting.AppModuleBasic{}, stakeibcmodule.AppModuleBasic{}, epochsmodule.AppModuleBasic{}, interchainquery.AppModuleBasic{}, ica.AppModuleBasic{}, recordsmodule.AppModuleBasic{}, ratelimitmodule.AppModuleBasic{}, icacallbacksmodule.AppModuleBasic{}, claim.AppModuleBasic{}, ccvconsumer.AppModuleBasic{}, autopilot.AppModuleBasic{}, icaoracle.AppModuleBasic{}, tendermint.AppModuleBasic{}, evmosvesting.AppModuleBasic{}, ) )
var WhiteListModule = map[string]struct{}{
"/cosmos.gov.v1.MsgUpdateParams": {},
"/cosmos.bank.v1beta1.MsgUpdateParams": {},
"/cosmos.staking.v1beta1.MsgUpdateParams": {},
"/cosmos.distribution.v1beta1.MsgUpdateParams": {},
"/cosmos.mint.v1beta1.MsgUpdateParams": {},
"/cosmos.upgrade.v1beta1.MsgSoftwareUpgrade": {},
"/cosmos.upgrade.v1beta1.MsgCancelUpgrade": {},
"/stride.icaoracle.MsgToggleOracle": {},
"/stride.icaoracle.MsgRemoveOracle": {},
}
var WhitelistedParams = map[ccvgov.ParamChangeKey]struct{}{ {MsgType: banktypes.ModuleName, Key: string(banktypes.KeySendEnabled)}: {}, {MsgType: banktypes.ModuleName, Key: string(banktypes.KeyDefaultSendEnabled)}: {}, {MsgType: govtypes.ModuleName, Key: string(govv1.ParamStoreKeyDepositParams)}: {}, {MsgType: govtypes.ModuleName, Key: string(govv1.ParamStoreKeyVotingParams)}: {}, {MsgType: govtypes.ModuleName, Key: string(govv1.ParamStoreKeyTallyParams)}: {}, {MsgType: stakingtypes.ModuleName, Key: string(stakingtypes.KeyUnbondingTime)}: {}, {MsgType: stakingtypes.ModuleName, Key: string(stakingtypes.KeyMaxValidators)}: {}, {MsgType: stakingtypes.ModuleName, Key: string(stakingtypes.KeyMaxEntries)}: {}, {MsgType: stakingtypes.ModuleName, Key: string(stakingtypes.KeyHistoricalEntries)}: {}, {MsgType: stakingtypes.ModuleName, Key: string(stakingtypes.KeyBondDenom)}: {}, {MsgType: stakingtypes.ModuleName, Key: string(stakingtypes.KeyMinCommissionRate)}: {}, {MsgType: autopilottypes.ModuleName, Key: string(autopilottypes.KeyStakeibcActive)}: {}, {MsgType: autopilottypes.ModuleName, Key: string(autopilottypes.KeyClaimActive)}: {}, {MsgType: ccvconsumertypes.ModuleName, Key: string(ccvconsumertypes.KeyRewardDenoms)}: {}, {MsgType: ccvconsumertypes.ModuleName, Key: string(ccvconsumertypes.KeyEnabled)}: {}, {MsgType: ccvconsumertypes.ModuleName, Key: string(ccvconsumertypes.KeyBlocksPerDistributionTransmission)}: {}, {MsgType: ccvconsumertypes.ModuleName, Key: string(ccvconsumertypes.KeyDistributionTransmissionChannel)}: {}, {MsgType: ccvconsumertypes.ModuleName, Key: string(ccvconsumertypes.KeyProviderFeePoolAddrStr)}: {}, {MsgType: ccvconsumertypes.ModuleName, Key: string(ccvconsumertypes.KeyTransferTimeoutPeriod)}: {}, {MsgType: ccvconsumertypes.ModuleName, Key: string(ccvconsumertypes.KeyConsumerRedistributionFrac)}: {}, {MsgType: ccvconsumertypes.ModuleName, Key: string(ccvconsumertypes.KeyHistoricalEntries)}: {}, {MsgType: ccvconsumertypes.ModuleName, Key: string(ccvconsumertypes.KeyConsumerUnbondingPeriod)}: {}, {MsgType: ccvconsumertypes.ModuleName, Key: string(ccvconsumertypes.KeySoftOptOutThreshold)}: {}, {MsgType: ccvconsumertypes.ModuleName, Key: string(ccvconsumertypes.KeyProviderRewardDenoms)}: {}, {MsgType: distrtypes.ModuleName, Key: string(distrtypes.ParamStoreKeyCommunityTax)}: {}, {MsgType: distrtypes.ModuleName, Key: string(distrtypes.ParamStoreKeyWithdrawAddrEnabled)}: {}, {MsgType: minttypes.ModuleName, Key: string(minttypes.KeyMintDenom)}: {}, {MsgType: minttypes.ModuleName, Key: string(minttypes.KeyGenesisEpochProvisions)}: {}, {MsgType: minttypes.ModuleName, Key: string(minttypes.KeyEpochIdentifier)}: {}, {MsgType: minttypes.ModuleName, Key: string(minttypes.KeyReductionPeriodInEpochs)}: {}, {MsgType: minttypes.ModuleName, Key: string(minttypes.KeyReductionFactor)}: {}, {MsgType: minttypes.ModuleName, Key: string(minttypes.KeyPoolAllocationRatio)}: {}, {MsgType: minttypes.ModuleName, Key: string(minttypes.KeyDeveloperRewardsReceiver)}: {}, {MsgType: minttypes.ModuleName, Key: string(minttypes.KeyMintingRewardsDistributionStartEpoch)}: {}, {MsgType: ibctransfertypes.ModuleName, Key: string(ibctransfertypes.KeySendEnabled)}: {}, {MsgType: ibctransfertypes.ModuleName, Key: string(ibctransfertypes.KeyReceiveEnabled)}: {}, {MsgType: stakeibctypes.ModuleName, Key: string(stakeibctypes.KeyDepositInterval)}: {}, {MsgType: stakeibctypes.ModuleName, Key: string(stakeibctypes.KeyDelegateInterval)}: {}, {MsgType: stakeibctypes.ModuleName, Key: string(stakeibctypes.KeyRewardsInterval)}: {}, {MsgType: stakeibctypes.ModuleName, Key: string(stakeibctypes.KeyRedemptionRateInterval)}: {}, {MsgType: stakeibctypes.ModuleName, Key: string(stakeibctypes.KeyStrideCommission)}: {}, {MsgType: stakeibctypes.ModuleName, Key: string(stakeibctypes.KeyReinvestInterval)}: {}, {MsgType: stakeibctypes.ModuleName, Key: string(stakeibctypes.KeyICATimeoutNanos)}: {}, {MsgType: stakeibctypes.ModuleName, Key: string(stakeibctypes.KeyBufferSize)}: {}, {MsgType: stakeibctypes.ModuleName, Key: string(stakeibctypes.KeyIbcTimeoutBlocks)}: {}, {MsgType: stakeibctypes.ModuleName, Key: string(stakeibctypes.KeyFeeTransferTimeoutNanos)}: {}, {MsgType: stakeibctypes.ModuleName, Key: string(stakeibctypes.KeyMaxStakeICACallsPerEpoch)}: {}, {MsgType: stakeibctypes.ModuleName, Key: string(stakeibctypes.KeyDefaultMinRedemptionRateThreshold)}: {}, {MsgType: stakeibctypes.ModuleName, Key: string(stakeibctypes.KeyDefaultMaxRedemptionRateThreshold)}: {}, {MsgType: stakeibctypes.ModuleName, Key: string(stakeibctypes.KeyIBCTransferTimeoutNanos)}: {}, {MsgType: stakeibctypes.ModuleName, Key: string(stakeibctypes.KeyMaxRedemptionRates)}: {}, {MsgType: stakeibctypes.ModuleName, Key: string(stakeibctypes.KeyMinRedemptionRates)}: {}, {MsgType: icahosttypes.SubModuleName, Key: string(icahosttypes.KeyHostEnabled)}: {}, {MsgType: icahosttypes.SubModuleName, Key: string(icahosttypes.KeyAllowMessages)}: {}, }
Functions ¶
func GetMaccPerms ¶
GetMaccPerms returns a copy of the module account permissions
func InitStrideIBCTestingApp ¶
func InitStrideIBCTestingApp() (ibctesting.TestingApp, map[string]json.RawMessage)
Initializes a new Stride App casted as a TestingApp for IBC support
func IsModuleWhiteList ¶
func IsProposalWhitelisted ¶
func IsProposalWhitelisted(content govv1beta1.Content) bool
func NewAnteHandler ¶
func NewAnteHandler(options HandlerOptions) (sdk.AnteHandler, error)
func SetupConfig ¶
func SetupConfig()
Types ¶
type EncodingConfig ¶
type EncodingConfig struct { InterfaceRegistry types.InterfaceRegistry Marshaler 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 GenesisStateWithValSet ¶
func GenesisStateWithValSet(app *StrideApp) GenesisState
func NewDefaultGenesisState ¶
func NewDefaultGenesisState() GenesisState
NewDefaultGenesisState generates the default state for the application.
type HandlerOptions ¶
type HandlerOptions struct { ante.HandlerOptions IBCKeeper *ibckeeper.Keeper ConsumerKeeper ccvconsumerkeeper.Keeper }
HandlerOptions extend the SDK's AnteHandler options by requiring the IBC channel keeper.
type StrideApp ¶
type StrideApp struct { *baseapp.BaseApp // keepers 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 // IBC Keeper must be a pointer in the app, so we can SetRouter on it correctly EvidenceKeeper evidencekeeper.Keeper TransferKeeper ibctransferkeeper.Keeper FeeGrantKeeper feegrantkeeper.Keeper // MonitoringKeeper monitoringpkeeper.Keeper ICAControllerKeeper icacontrollerkeeper.Keeper ICAHostKeeper icahostkeeper.Keeper ConsumerKeeper ccvconsumerkeeper.Keeper AutopilotKeeper autopilotkeeper.Keeper // make scoped keepers public for test purposes ScopedIBCKeeper capabilitykeeper.ScopedKeeper ScopedTransferKeeper capabilitykeeper.ScopedKeeper // ScopedMonitoringKeeper capabilitykeeper.ScopedKeeper ScopedICAControllerKeeper capabilitykeeper.ScopedKeeper ScopedICAHostKeeper capabilitykeeper.ScopedKeeper ScopedCCVConsumerKeeper capabilitykeeper.ScopedKeeper StakeibcKeeper stakeibcmodulekeeper.Keeper EpochsKeeper epochsmodulekeeper.Keeper InterchainqueryKeeper interchainquerykeeper.Keeper ScopedRecordsKeeper capabilitykeeper.ScopedKeeper RecordsKeeper recordsmodulekeeper.Keeper IcacallbacksKeeper icacallbacksmodulekeeper.Keeper ScopedratelimitKeeper capabilitykeeper.ScopedKeeper RatelimitKeeper ratelimitmodulekeeper.Keeper ClaimKeeper claimkeeper.Keeper ICAOracleKeeper icaoraclekeeper.Keeper // 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 InitStrideTestApp ¶
Initializes a new StrideApp without IBC functionality
func NewStrideApp ¶
func NewStrideApp( logger log.Logger, db dbm.DB, traceStore io.Writer, loadLatest bool, skipUpgradeHeights map[int64]bool, homePath string, invCheckPeriod uint, encodingConfig EncodingConfig, appOpts servertypes.AppOptions, baseAppOptions ...func(*baseapp.BaseApp), ) *StrideApp
RUN GOSEC New returns a reference to an initialized blockchain app
func (*StrideApp) AppCodec ¶
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) BeginBlocker ¶
func (app *StrideApp) BeginBlocker(ctx sdk.Context, req abci.RequestBeginBlock) abci.ResponseBeginBlock
BeginBlocker application updates every begin block
func (*StrideApp) BlacklistedModuleAccountAddrs ¶
ModuleAccountAddrs returns all the app's module account addresses.
func (*StrideApp) EndBlocker ¶
func (app *StrideApp) EndBlocker(ctx sdk.Context, req abci.RequestEndBlock) abci.ResponseEndBlock
EndBlocker application updates every end block
func (*StrideApp) ExportAppStateAndValidators ¶
func (app *StrideApp) ExportAppStateAndValidators( forZeroHeight bool, jailAllowedAddrs []string, ) (servertypes.ExportedApp, error)
ExportAppStateAndValidators exports the state of the application for a genesis file.
func (*StrideApp) GetBaseApp ¶
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 ¶
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() core.StakingKeeper
GetStakingKeeper implements the TestingApp interface.
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 ¶
GetTxConfig implements the TestingApp interface.
func (*StrideApp) InitChainer ¶
func (app *StrideApp) InitChainer(ctx sdk.Context, req abci.RequestInitChain) abci.ResponseInitChain
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 ¶
LoadHeight loads a particular height
func (*StrideApp) ModuleAccountAddrs ¶
ModuleAccountAddrs returns all the app's module account addresses.
func (*StrideApp) RegisterAPIRoutes ¶
RegisterAPIRoutes registers all application module routes with the provided API server.
func (*StrideApp) RegisterNodeService ¶
RegisterNodeService registers the node gRPC Query service.
func (*StrideApp) RegisterTendermintService ¶
RegisterTendermintService implements the Application.RegisterTendermintService method.
func (*StrideApp) RegisterTxService ¶
RegisterTxService implements the Application.RegisterTxService method.
func (*StrideApp) SimulationManager ¶
func (app *StrideApp) SimulationManager() *module.SimulationManager
SimulationManager implements the SimulationApp interface