Documentation
¶
Index ¶
- Variables
- func MakeEncodingConfig() params.EncodingConfig
- func NewAnteHandler(options HandlerOptions) (sdk.AnteHandler, error)
- func RegisterSwaggerAPI(rtr *mux.Router)
- type GaiaApp
- func (app *GaiaApp) AppCodec() codec.Codec
- func (app *GaiaApp) BeginBlocker(ctx sdk.Context, req abciTypes.RequestBeginBlock) abciTypes.ResponseBeginBlock
- func (app *GaiaApp) EndBlocker(ctx sdk.Context, req abciTypes.RequestEndBlock) abciTypes.ResponseEndBlock
- func (app *GaiaApp) ExportAppStateAndValidators(forZeroHeight bool, jailAllowedAddrs []string) (serverTypes.ExportedApp, error)
- func (app *GaiaApp) GetKey(storeKey string) *sdk.KVStoreKey
- func (app *GaiaApp) GetMemKey(storeKey string) *sdk.MemoryStoreKey
- func (app *GaiaApp) GetSubspace(moduleName string) paramsTypes.Subspace
- func (app *GaiaApp) GetTKey(storeKey string) *sdk.TransientStoreKey
- func (app *GaiaApp) InitChainer(ctx sdk.Context, req abciTypes.RequestInitChain) abciTypes.ResponseInitChain
- func (app *GaiaApp) InterfaceRegistry() types.InterfaceRegistry
- func (app *GaiaApp) LegacyAmino() *codec.LegacyAmino
- func (app *GaiaApp) LoadHeight(height int64) error
- func (app *GaiaApp) ModuleAccountAddrs() map[string]bool
- func (app *GaiaApp) Name() string
- func (app *GaiaApp) RegisterAPIRoutes(apiSvr *api.Server, apiConfig config.APIConfig)
- func (app *GaiaApp) RegisterTendermintService(clientCtx client.Context)
- func (app *GaiaApp) RegisterTxService(clientCtx client.Context)
- func (app *GaiaApp) SimulationManager() *module.SimulationManager
- type GenesisState
- type HandlerOptions
- type SimGenesisAccount
Constants ¶
This section is empty.
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.AppModuleBasic{}, bank.AppModuleBasic{}, capability.AppModuleBasic{}, staking.AppModuleBasic{}, mint.AppModuleBasic{}, distribution.AppModuleBasic{}, gov.NewAppModuleBasic( paramsClient.ProposalHandler, distributionClient.ProposalHandler, upgradeClient.ProposalHandler, upgradeClient.CancelProposalHandler, ibcClientClient.UpdateClientProposalHandler, ibcClientClient.UpgradeProposalHandler, ), params.AppModuleBasic{}, crisis.AppModuleBasic{}, slashing.AppModuleBasic{}, feeGrantModule.AppModuleBasic{}, authzModule.AppModuleBasic{}, ibc.AppModuleBasic{}, upgrade.AppModuleBasic{}, evidence.AppModuleBasic{}, transfer.AppModuleBasic{}, vesting.AppModuleBasic{}, liquidity.AppModuleBasic{}, router.AppModuleBasic{}, ica.AppModuleBasic{}, ) )
Functions ¶
func MakeEncodingConfig ¶ added in v0.3.0
func MakeEncodingConfig() params.EncodingConfig
MakeEncodingConfig creates an EncodingConfig for testing
func NewAnteHandler ¶ added in v0.3.0
func NewAnteHandler(options HandlerOptions) (sdk.AnteHandler, error)
func RegisterSwaggerAPI ¶ added in v0.3.0
RegisterSwaggerAPI registers swagger route with API Server
Types ¶
type GaiaApp ¶ added in v0.3.0
type GaiaApp struct {
*baseapp.BaseApp
// keepers
AccountKeeper authKeeper.AccountKeeper
BankKeeper bankKeeper.Keeper
CapabilityKeeper *capabilityKeeper.Keeper
StakingKeeper stakingKeeper.Keeper
SlashingKeeper slashingKeeper.Keeper
MintKeeper mintKeeper.Keeper
DistributionKeeper distributionKeeper.Keeper
GovKeeper govKeeper.Keeper
CrisisKeeper crisisKeeper.Keeper
UpgradeKeeper upgradeKeeper.Keeper
ParamsKeeper paramsKeeper.Keeper
// IBC Keeper must be a pointer in the application, so we can SetRouter on it correctly
IBCKeeper *ibcKeeper.Keeper
ICAHostKeeper icaHostKeeper.Keeper
EvidenceKeeper evidenceKeeper.Keeper
TransferKeeper ibcTransferKeeper.Keeper
FeeGrantKeeper feeGrantKeeper.Keeper
AuthzKeeper authzKeeper.Keeper
LiquidityKeeper liquidityKeeper.Keeper
RouterKeeper routerKeeper.Keeper
// make scoped keepers public for test purposes
ScopedIBCKeeper capabilityKeeper.ScopedKeeper
ScopedTransferKeeper capabilityKeeper.ScopedKeeper
ScopedICAHostKeeper capabilityKeeper.ScopedKeeper
// contains filtered or unexported fields
}
GaiaApp 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 NewGaiaApp ¶ added in v0.3.0
func NewGaiaApp( logger log.Logger, db dbm.DB, traceStore io.Writer, loadLatest bool, skipUpgradeHeights map[int64]bool, homePath string, invCheckPeriod uint, encodingConfig applicationParameters.EncodingConfig, appOpts serverTypes.AppOptions, baseAppOptions ...func(*baseapp.BaseApp), ) *GaiaApp
NewGaiaApp returns a reference to an initialized Gaia.
func (*GaiaApp) AppCodec ¶ added in v0.3.0
AppCodec returns Gaia's application 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 (*GaiaApp) BeginBlocker ¶ added in v0.3.0
func (app *GaiaApp) BeginBlocker(ctx sdk.Context, req abciTypes.RequestBeginBlock) abciTypes.ResponseBeginBlock
BeginBlocker application updates every begin block
func (*GaiaApp) EndBlocker ¶ added in v0.3.0
func (app *GaiaApp) EndBlocker(ctx sdk.Context, req abciTypes.RequestEndBlock) abciTypes.ResponseEndBlock
EndBlocker application updates every end block
func (*GaiaApp) ExportAppStateAndValidators ¶ added in v0.3.0
func (app *GaiaApp) ExportAppStateAndValidators( forZeroHeight bool, jailAllowedAddrs []string, ) (serverTypes.ExportedApp, error)
ExportAppStateAndValidators exports the state of the application for a genesis file.
func (*GaiaApp) GetKey ¶ added in v0.3.0
func (app *GaiaApp) GetKey(storeKey string) *sdk.KVStoreKey
GetKey returns the KVStoreKey for the provided store key.
NOTE: This is solely to be used for testing purposes.
func (*GaiaApp) GetMemKey ¶ added in v0.3.0
func (app *GaiaApp) GetMemKey(storeKey string) *sdk.MemoryStoreKey
GetMemKey returns the MemStoreKey for the provided mem key.
NOTE: This is solely used for testing purposes.
func (*GaiaApp) GetSubspace ¶ added in v0.3.0
func (app *GaiaApp) 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 (*GaiaApp) GetTKey ¶ added in v0.3.0
func (app *GaiaApp) GetTKey(storeKey string) *sdk.TransientStoreKey
GetTKey returns the TransientStoreKey for the provided store key.
NOTE: This is solely to be used for testing purposes.
func (*GaiaApp) InitChainer ¶ added in v0.3.0
func (app *GaiaApp) InitChainer(ctx sdk.Context, req abciTypes.RequestInitChain) abciTypes.ResponseInitChain
InitChainer application update at chain initialization
func (*GaiaApp) InterfaceRegistry ¶ added in v0.3.0
func (app *GaiaApp) InterfaceRegistry() types.InterfaceRegistry
InterfaceRegistry returns Gaia's InterfaceRegistry
func (*GaiaApp) LegacyAmino ¶ added in v0.3.0
func (app *GaiaApp) LegacyAmino() *codec.LegacyAmino
LegacyAmino returns GaiaApp'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 (*GaiaApp) LoadHeight ¶ added in v0.3.0
LoadHeight loads a particular height
func (*GaiaApp) ModuleAccountAddrs ¶ added in v0.3.0
ModuleAccountAddrs returns all the application's module account addresses.
func (*GaiaApp) RegisterAPIRoutes ¶ added in v0.3.0
RegisterAPIRoutes registers all application module routes with the provided API server.
func (*GaiaApp) RegisterTendermintService ¶ added in v0.3.0
RegisterTendermintService implements the Application.RegisterTendermintService method.
func (*GaiaApp) RegisterTxService ¶ added in v0.3.0
RegisterTxService implements the Application.RegisterTxService method.
func (*GaiaApp) SimulationManager ¶ added in v0.3.0
func (app *GaiaApp) SimulationManager() *module.SimulationManager
SimulationManager implements the SimulationApp interface
type GenesisState ¶ added in v0.3.0
type GenesisState map[string]json.RawMessage
GenesisState The genesis state of the blockchain is represented here as a map of raw json messages keyed by an 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.
type HandlerOptions ¶ added in v0.3.0
type HandlerOptions struct {
ante.HandlerOptions
IBCKeeper *ibcKeeper.Keeper
}
HandlerOptions extend the SDK AnteHandler options by requiring the IBC channel keeper.
type SimGenesisAccount ¶ added in v0.3.0
type SimGenesisAccount 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
}
SimGenesisAccount defines a type that implements the GenesisAccount interface to be used for simulation accounts in the genesis state.
func (SimGenesisAccount) Validate ¶ added in v0.3.0
func (sga SimGenesisAccount) Validate() error
Validate checks for errors on the vesting and module account parameters