Documentation ¶
Index ¶
- Constants
- Variables
- func AppConfig() depinject.Config
- func BlockedAddresses() map[string]bool
- func GetMaccPerms() map[string][]string
- type App
- func (app *App) AppCodec() codec.Codec
- func (app *App) ExportAppStateAndValidators(forZeroHeight bool, jailAllowedAddrs, modulesToExport []string) (servertypes.ExportedApp, error)
- func (app *App) GetKey(storeKey string) *storetypes.KVStoreKey
- func (app *App) GetMemKey(storeKey string) *storetypes.MemoryStoreKey
- func (app *App) LegacyAmino() *codec.LegacyAmino
- func (app *App) RegisterAPIRoutes(apiSvr *api.Server, apiConfig config.APIConfig)
- func (app *App) SimulationManager() *module.SimulationManager
- type GenesisAccount
- type GenesisState
Constants ¶
const ( AccountAddressPrefix = "cosmos" Name = "testapp" )
Variables ¶
var ( // DefaultNodeHome default home directories for the application daemon DefaultNodeHome string )
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.
Types ¶
type App ¶
type App struct { *runtime.App // keepers AccountKeeper authkeeper.AccountKeeper BankKeeper bankkeeper.Keeper StakingKeeper *stakingkeeper.Keeper RollupKeeper *rollupkeeper.Keeper // contains filtered or unexported fields }
App 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 New ¶
func New( logger log.Logger, db dbm.DB, traceStore io.Writer, loadLatest bool, appOpts servertypes.AppOptions, baseAppOptions ...func(*baseapp.BaseApp), ) (*App, error)
New returns a reference to an initialized App.
func (*App) AppCodec ¶
AppCodec returns App'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 (*App) ExportAppStateAndValidators ¶
func (app *App) ExportAppStateAndValidators(forZeroHeight bool, jailAllowedAddrs, modulesToExport []string) (servertypes.ExportedApp, error)
ExportAppStateAndValidators exports the state of the application for a genesis file.
func (*App) GetKey ¶
func (app *App) GetKey(storeKey string) *storetypes.KVStoreKey
GetKey returns the KVStoreKey for the provided store key.
func (*App) GetMemKey ¶
func (app *App) GetMemKey(storeKey string) *storetypes.MemoryStoreKey
GetMemKey returns the MemoryStoreKey for the provided store key.
func (*App) LegacyAmino ¶
func (app *App) LegacyAmino() *codec.LegacyAmino
LegacyAmino returns App'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 (*App) RegisterAPIRoutes ¶
RegisterAPIRoutes registers all application module routes with the provided API server.
func (*App) SimulationManager ¶
func (app *App) SimulationManager() *module.SimulationManager
SimulationManager implements the SimulationApp interface.
type GenesisAccount ¶
type GenesisAccount struct { *authtypes.BaseAccount // vesting account fields OriginalVesting sdk.Coins `json:"original_vesting" yaml:"original_vesting"` // total vesting coins upon initialization DelegatedFree sdk.Coins `json:"delegated_free" yaml:"delegated_free"` // delegated vested coins at time of delegation DelegatedVesting sdk.Coins `json:"delegated_vesting" yaml:"delegated_vesting"` // delegated vesting coins at time of delegation StartTime int64 `json:"start_time" yaml:"start_time"` // vesting start time (UNIX Epoch time) EndTime int64 `json:"end_time" yaml:"end_time"` // vesting end time (UNIX Epoch time) // module account fields ModuleName string `json:"module_name" yaml:"module_name"` // name of the module account ModulePermissions []string `json:"module_permissions" yaml:"module_permissions"` // permissions of module account }
GenesisAccount defines a type that implements the GenesisAccount interface to be used for simulation accounts in the genesis state.
func (GenesisAccount) Validate ¶
func (sga GenesisAccount) Validate() error
Validate checks for errors on the vesting and module account parameters
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.