Documentation ¶
Index ¶
- Constants
- Variables
- func BlockedAddresses() map[string]bool
- func GetMaccPerms() map[string][]string
- func GetPoAAdmin() string
- func MakeEncodingConfig(tb testing.TB) params.EncodingConfig
- func NewAnteHandler(options HandlerOptions) (sdk.AnteHandler, error)
- func NewTestNetworkFixture() network.TestFixture
- func RandomAccountAddress() sdk.AccAddress
- type EmptyAppOptions
- type EmptyBaseAppOptions
- type GenesisState
- type HandlerOptions
- type ManifestApp
- func (app *ManifestApp) AppCodec() codec.Codec
- func (app *ManifestApp) AutoCliOpts() autocli.AppOptions
- func (app *ManifestApp) BeginBlocker(ctx sdk.Context) (sdk.BeginBlock, error)
- func (app *ManifestApp) Configurator() module.Configurator
- func (app *ManifestApp) DefaultGenesis() map[string]json.RawMessage
- func (app *ManifestApp) EndBlocker(ctx sdk.Context) (sdk.EndBlock, error)
- func (app *ManifestApp) ExportAppStateAndValidators(forZeroHeight bool, jailAllowedAddrs, modulesToExport []string) (servertypes.ExportedApp, error)
- func (app *ManifestApp) GetKey(storeKey string) *storetypes.KVStoreKey
- func (app *ManifestApp) GetMemKey(storeKey string) *storetypes.MemoryStoreKey
- func (app *ManifestApp) GetStoreKeys() []storetypes.StoreKey
- func (app *ManifestApp) GetSubspace(moduleName string) paramstypes.Subspace
- func (app *ManifestApp) GetTKey(storeKey string) *storetypes.TransientStoreKey
- func (app *ManifestApp) InitChainer(ctx sdk.Context, req *abci.RequestInitChain) (*abci.ResponseInitChain, error)
- func (app *ManifestApp) InterfaceRegistry() types.InterfaceRegistry
- func (app *ManifestApp) LegacyAmino() *codec.LegacyAmino
- func (app *ManifestApp) LoadHeight(height int64) error
- func (app *ManifestApp) Name() string
- func (app *ManifestApp) PreBlocker(ctx sdk.Context, _ *abci.RequestFinalizeBlock) (*sdk.ResponsePreBlock, error)
- func (app *ManifestApp) ProcessProposalHandler(_ sdk.Context, _ *abci.RequestProcessProposal) (*abci.ResponseProcessProposal, error)
- func (app *ManifestApp) RegisterAPIRoutes(apiSvr *api.Server, apiConfig config.APIConfig)
- func (app *ManifestApp) RegisterNodeService(clientCtx client.Context, cfg config.Config)
- func (app *ManifestApp) RegisterTendermintService(clientCtx client.Context)
- func (app *ManifestApp) RegisterTxService(clientCtx client.Context)
- func (app *ManifestApp) RegisterUpgradeHandlers()
- func (app *ManifestApp) SimulationManager() *module.SimulationManager
- func (app *ManifestApp) TxConfig() client.TxConfig
- type RateMinMax
Constants ¶
const (
SimAppChainID = "testing"
)
SimAppChainID hardcoded chainID for simulation
Variables ¶
var ( AppName = "manifest" Bech32Prefix = "manifest" DefaultNodeHome = ".manifest" DefaultCommissionRateMinMax = RateMinMax{ Floor: sdkmath.LegacyZeroDec(), Ceil: sdkmath.LegacyZeroDec(), } )
We pull these out so we can set them with LDFLAGS in the Makefile
var ( // Bech32PrefixAccAddr defines the Bech32 prefix of an account's address Bech32PrefixAccAddr = Bech32Prefix // Bech32PrefixAccPub defines the Bech32 prefix of an account's public key Bech32PrefixAccPub = Bech32Prefix + sdk.PrefixPublic // Bech32PrefixValAddr defines the Bech32 prefix of a validator's operator address Bech32PrefixValAddr = Bech32Prefix + sdk.PrefixValidator + sdk.PrefixOperator // Bech32PrefixValPub defines the Bech32 prefix of a validator's operator public key Bech32PrefixValPub = Bech32Prefix + sdk.PrefixValidator + sdk.PrefixOperator + sdk.PrefixPublic // Bech32PrefixConsAddr defines the Bech32 prefix of a consensus node address Bech32PrefixConsAddr = Bech32Prefix + sdk.PrefixValidator + sdk.PrefixConsensus // Bech32PrefixConsPub defines the Bech32 prefix of a consensus node public key Bech32PrefixConsPub = Bech32Prefix + sdk.PrefixValidator + sdk.PrefixConsensus + sdk.PrefixPublic )
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
var DefaultConsensusParams = &tmproto.ConsensusParams{ Block: &tmproto.BlockParams{ MaxBytes: 200000, MaxGas: 2000000, }, Evidence: &tmproto.EvidenceParams{ MaxAgeNumBlocks: 302400, MaxAgeDuration: 504 * time.Hour, MaxBytes: 10000, }, Validator: &tmproto.ValidatorParams{ PubKeyTypes: []string{ tmtypes.ABCIPubKeyTypeEd25519, }, }, Version: &tmproto.VersionParams{ App: 0, }, Abci: &tmproto.ABCIParams{ VoteExtensionsEnableHeight: 1, }, }
DefaultConsensusParams defines the default Tendermint consensus params used in app testing.
var Upgrades []upgrades.Upgrade
Upgrades list of chain upgrades
Functions ¶
func BlockedAddresses ¶
BlockedAddresses returns all the app's blocked account addresses.
func GetMaccPerms ¶
GetMaccPerms returns a copy of the module account permissions
NOTE: This is solely to be used for testing purposes.
func GetPoAAdmin ¶
func GetPoAAdmin() string
GetPoAAdmin returns the address of the PoA admin. The default PoA admin is the governance module account.
func MakeEncodingConfig ¶
func MakeEncodingConfig(tb testing.TB) params.EncodingConfig
MakeEncodingConfig creates a new EncodingConfig with all modules registered. For testing only
func NewAnteHandler ¶
func NewAnteHandler(options HandlerOptions) (sdk.AnteHandler, error)
func NewTestNetworkFixture ¶
func NewTestNetworkFixture() network.TestFixture
NewTestNetworkFixture returns a new app AppConstructor for network simulation tests
func RandomAccountAddress ¶
func RandomAccountAddress() sdk.AccAddress
Types ¶
type EmptyAppOptions ¶
type EmptyAppOptions struct{}
func (EmptyAppOptions) Get ¶
func (EmptyAppOptions) Get(_ string) interface{}
type EmptyBaseAppOptions ¶
type EmptyBaseAppOptions struct{}
EmptyBaseAppOptions is a stub implementing AppOptions
func (EmptyBaseAppOptions) Get ¶
func (ao EmptyBaseAppOptions) Get(_ string) interface{}
Get implements AppOptions
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.
func NewDefaultGenesisState ¶
func NewDefaultGenesisState(t *testing.T) GenesisState
NewDefaultGenesisState generates the default state for the application. Deprecated: use wasmApp.DefaultGenesis() instead
type HandlerOptions ¶
type HandlerOptions struct { ante.HandlerOptions IBCKeeper *keeper.Keeper CircuitKeeper *circuitkeeper.Keeper RateMinMax RateMinMax }
HandlerOptions extend the SDK's AnteHandler options by requiring the IBC channel keeper.
type ManifestApp ¶
type ManifestApp struct { *baseapp.BaseApp // keepers AccountKeeper authkeeper.AccountKeeper BankKeeper bankkeeper.BaseKeeper CapabilityKeeper *capabilitykeeper.Keeper StakingKeeper *stakingkeeper.Keeper SlashingKeeper slashingkeeper.Keeper MintKeeper mintkeeper.Keeper DistrKeeper distrkeeper.Keeper GovKeeper govkeeper.Keeper CrisisKeeper *crisiskeeper.Keeper UpgradeKeeper *upgradekeeper.Keeper ParamsKeeper paramskeeper.Keeper AuthzKeeper authzkeeper.Keeper EvidenceKeeper evidencekeeper.Keeper FeeGrantKeeper feegrantkeeper.Keeper GroupKeeper groupkeeper.Keeper ConsensusParamsKeeper consensusparamkeeper.Keeper CircuitKeeper circuitkeeper.Keeper IBCKeeper *ibckeeper.Keeper // IBC Keeper must be a pointer in the app, so we can SetRouter on it correctly IBCFeeKeeper ibcfeekeeper.Keeper ICAControllerKeeper icacontrollerkeeper.Keeper ICAHostKeeper icahostkeeper.Keeper TransferKeeper ibctransferkeeper.Keeper ScopedIBCKeeper capabilitykeeper.ScopedKeeper ScopedICAHostKeeper capabilitykeeper.ScopedKeeper ScopedICAControllerKeeper capabilitykeeper.ScopedKeeper ScopedTransferKeeper capabilitykeeper.ScopedKeeper ScopedIBCFeeKeeper capabilitykeeper.ScopedKeeper TokenFactoryKeeper tokenfactorykeeper.Keeper POAKeeper poakeeper.Keeper ManifestKeeper manifestkeeper.Keeper // the module manager ModuleManager *module.Manager BasicModuleManager module.BasicManager // contains filtered or unexported fields }
ManifestApp extended ABCI application
func NewApp ¶
func NewApp( logger log.Logger, db dbm.DB, traceStore io.Writer, loadLatest bool, commissionRateMinMax RateMinMax, appOpts servertypes.AppOptions, baseAppOptions ...func(*baseapp.BaseApp), ) *ManifestApp
NewApp returns a reference to an initialized App.
func SetupWithGenesisValSet ¶
func SetupWithGenesisValSet(t *testing.T, valSet *tmtypes.ValidatorSet, genAccs []authtypes.GenesisAccount, balances ...banktypes.Balance) (sdk.Context, *ManifestApp)
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 (*ManifestApp) AppCodec ¶
func (app *ManifestApp) 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 (*ManifestApp) AutoCliOpts ¶
func (app *ManifestApp) AutoCliOpts() autocli.AppOptions
AutoCliOpts returns the autocli options for the app.
func (*ManifestApp) BeginBlocker ¶
func (app *ManifestApp) BeginBlocker(ctx sdk.Context) (sdk.BeginBlock, error)
BeginBlocker application updates every begin block
func (*ManifestApp) Configurator ¶
func (app *ManifestApp) Configurator() module.Configurator
func (*ManifestApp) DefaultGenesis ¶
func (app *ManifestApp) DefaultGenesis() map[string]json.RawMessage
DefaultGenesis returns a default genesis from the registered AppModuleBasic's.
func (*ManifestApp) EndBlocker ¶
EndBlocker application updates every end block
func (*ManifestApp) ExportAppStateAndValidators ¶
func (app *ManifestApp) ExportAppStateAndValidators(forZeroHeight bool, jailAllowedAddrs, modulesToExport []string) (servertypes.ExportedApp, error)
ExportAppStateAndValidators exports the state of the application for a genesis file.
func (*ManifestApp) GetKey ¶
func (app *ManifestApp) 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 (*ManifestApp) GetMemKey ¶
func (app *ManifestApp) GetMemKey(storeKey string) *storetypes.MemoryStoreKey
GetMemKey returns the MemStoreKey for the provided mem key.
NOTE: This is solely used for testing purposes.
func (*ManifestApp) GetStoreKeys ¶
func (app *ManifestApp) GetStoreKeys() []storetypes.StoreKey
GetStoreKeys returns all the stored store keys.
func (*ManifestApp) GetSubspace ¶
func (app *ManifestApp) 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 (*ManifestApp) GetTKey ¶
func (app *ManifestApp) 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 (*ManifestApp) InitChainer ¶
func (app *ManifestApp) InitChainer(ctx sdk.Context, req *abci.RequestInitChain) (*abci.ResponseInitChain, error)
InitChainer application update at chain initialization
func (*ManifestApp) InterfaceRegistry ¶
func (app *ManifestApp) InterfaceRegistry() types.InterfaceRegistry
InterfaceRegistry returns App's InterfaceRegistry
func (*ManifestApp) LegacyAmino ¶
func (app *ManifestApp) 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 (*ManifestApp) LoadHeight ¶
func (app *ManifestApp) LoadHeight(height int64) error
LoadHeight loads a particular height
func (*ManifestApp) PreBlocker ¶
func (app *ManifestApp) PreBlocker(ctx sdk.Context, _ *abci.RequestFinalizeBlock) (*sdk.ResponsePreBlock, error)
PreBlocker application updates every pre block
func (*ManifestApp) ProcessProposalHandler ¶
func (app *ManifestApp) ProcessProposalHandler(_ sdk.Context, _ *abci.RequestProcessProposal) (*abci.ResponseProcessProposal, error)
func (*ManifestApp) RegisterAPIRoutes ¶
func (app *ManifestApp) RegisterAPIRoutes(apiSvr *api.Server, apiConfig config.APIConfig)
RegisterAPIRoutes registers all application module routes with the provided API server.
func (*ManifestApp) RegisterNodeService ¶
func (app *ManifestApp) RegisterNodeService(clientCtx client.Context, cfg config.Config)
func (*ManifestApp) RegisterTendermintService ¶
func (app *ManifestApp) RegisterTendermintService(clientCtx client.Context)
RegisterTendermintService implements the Application.RegisterTendermintService method.
func (*ManifestApp) RegisterTxService ¶
func (app *ManifestApp) RegisterTxService(clientCtx client.Context)
RegisterTxService implements the Application.RegisterTxService method.
func (*ManifestApp) RegisterUpgradeHandlers ¶
func (app *ManifestApp) RegisterUpgradeHandlers()
RegisterUpgradeHandlers registers the chain upgrade handlers
func (*ManifestApp) SimulationManager ¶
func (app *ManifestApp) SimulationManager() *module.SimulationManager
SimulationManager implements the SimulationApp interface
func (*ManifestApp) TxConfig ¶
func (app *ManifestApp) TxConfig() client.TxConfig
TxConfig returns App's TxConfig