Documentation
¶
Index ¶
- Variables
- func DefaultConfig() network.Config
- func MakeEncodingConfig() params.EncodingConfig
- func NewAnteHandler(options HandlerOptions) (sdk.AnteHandler, error)
- func NewAppConstructor(encodingCfg params.EncodingConfig) network.AppConstructor
- func QueryBalanceExec(clientCtx client.Context, address string, denom string, extraArgs ...string) (testutil.BufferWriter, error)
- func RegisterSwaggerAPI(ctx client.Context, rtr *mux.Router)
- type BitsongApp
- func (app *BitsongApp) AppCodec() codec.Codec
- func (app *BitsongApp) BeginBlocker(ctx sdk.Context, req abci.RequestBeginBlock) abci.ResponseBeginBlock
- func (app *BitsongApp) EndBlocker(ctx sdk.Context, req abci.RequestEndBlock) abci.ResponseEndBlock
- func (app *BitsongApp) ExportAppStateAndValidators(forZeroHeight bool, jailAllowedAddrs []string) (servertypes.ExportedApp, error)
- func (app *BitsongApp) GetKey(storeKey string) *sdk.KVStoreKey
- func (app *BitsongApp) GetMemKey(storeKey string) *sdk.MemoryStoreKey
- func (app *BitsongApp) GetSubspace(moduleName string) paramstypes.Subspace
- func (app *BitsongApp) GetTKey(storeKey string) *sdk.TransientStoreKey
- func (app *BitsongApp) InitChainer(ctx sdk.Context, req abci.RequestInitChain) abci.ResponseInitChain
- func (app *BitsongApp) InterfaceRegistry() types.InterfaceRegistry
- func (app *BitsongApp) LegacyAmino() *codec.LegacyAmino
- func (app *BitsongApp) LoadHeight(height int64) error
- func (app *BitsongApp) ModuleAccountAddrs() map[string]bool
- func (app *BitsongApp) Name() string
- func (app *BitsongApp) RegisterAPIRoutes(apiSvr *api.Server, apiConfig config.APIConfig)
- func (app *BitsongApp) RegisterTendermintService(clientCtx client.Context)
- func (app *BitsongApp) RegisterTxService(clientCtx client.Context)
- func (app *BitsongApp) SimulationManager() *module.SimulationManager
- type CosmosApp
- type GenesisState
- type HandlerOptions
- type MinValCommissionDecorator
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{}, distr.AppModuleBasic{}, gov.NewAppModuleBasic( paramsclient.ProposalHandler, distrclient.ProposalHandler, upgradeclient.ProposalHandler, upgradeclient.CancelProposalHandler, ibcclientclient.UpdateClientProposalHandler, ibcclientclient.UpgradeProposalHandler, fantokenclient.ProposalHandler, merkledropclient.ProposalHandler, ), params.AppModuleBasic{}, crisis.AppModuleBasic{}, slashing.AppModuleBasic{}, feegrantmodule.AppModuleBasic{}, authzmodule.AppModuleBasic{}, ibc.AppModuleBasic{}, upgrade.AppModuleBasic{}, evidence.AppModuleBasic{}, transfer.AppModuleBasic{}, vesting.AppModuleBasic{}, router.AppModuleBasic{}, fantoken.AppModuleBasic{}, merkledrop.AppModuleBasic{}, ) )
Functions ¶
func DefaultConfig ¶ added in v0.11.0
DefaultConfig returns a default configuration suitable for nearly all testing requirements.
func MakeEncodingConfig ¶ added in v0.8.0
func MakeEncodingConfig() params.EncodingConfig
MakeEncodingConfig creates an EncodingConfig for testing
func NewAnteHandler ¶ added in v0.10.0
func NewAnteHandler(options HandlerOptions) (sdk.AnteHandler, error)
func NewAppConstructor ¶ added in v0.11.0
func NewAppConstructor(encodingCfg params.EncodingConfig) network.AppConstructor
func QueryBalanceExec ¶ added in v0.8.0
Types ¶
type BitsongApp ¶ added in v0.11.0
type BitsongApp struct { *baseapp.BaseApp // keepers AccountKeeper authkeeper.AccountKeeper BankKeeper bankkeeper.Keeper 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 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 AuthzKeeper authzkeeper.Keeper RouterKeeper routerkeeper.Keeper // make scoped keepers public for test purposes ScopedIBCKeeper capabilitykeeper.ScopedKeeper ScopedTransferKeeper capabilitykeeper.ScopedKeeper FanTokenKeeper fantokenkeeper.Keeper MerkledropKeeper merkledropkeeper.Keeper // contains filtered or unexported fields }
BitsongApp 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 NewBitsongApp ¶
func NewBitsongApp( logger log.Logger, db dbm.DB, traceStore io.Writer, loadLatest bool, skipUpgradeHeights map[int64]bool, homePath string, invCheckPeriod uint, encodingConfig appparams.EncodingConfig, appOpts servertypes.AppOptions, baseAppOptions ...func(*baseapp.BaseApp), ) *BitsongApp
NewBitsongApp returns a reference to an initialized BitsongApp.
func Setup ¶ added in v0.8.0
func Setup(isCheckTx bool) *BitsongApp
Setup initializes a new BitsongApp
func (*BitsongApp) AppCodec ¶ added in v0.11.0
func (app *BitsongApp) AppCodec() codec.Codec
AppCodec returns Gaia'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 (*BitsongApp) BeginBlocker ¶ added in v0.11.0
func (app *BitsongApp) BeginBlocker(ctx sdk.Context, req abci.RequestBeginBlock) abci.ResponseBeginBlock
BeginBlocker application updates every begin block
func (*BitsongApp) EndBlocker ¶ added in v0.11.0
func (app *BitsongApp) EndBlocker(ctx sdk.Context, req abci.RequestEndBlock) abci.ResponseEndBlock
EndBlocker application updates every end block
func (*BitsongApp) ExportAppStateAndValidators ¶ added in v0.11.0
func (app *BitsongApp) ExportAppStateAndValidators( forZeroHeight bool, jailAllowedAddrs []string, ) (servertypes.ExportedApp, error)
ExportAppStateAndValidators exports the state of the application for a genesis file.
func (*BitsongApp) GetKey ¶ added in v0.11.0
func (app *BitsongApp) 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 (*BitsongApp) GetMemKey ¶ added in v0.11.0
func (app *BitsongApp) GetMemKey(storeKey string) *sdk.MemoryStoreKey
GetMemKey returns the MemStoreKey for the provided mem key.
NOTE: This is solely used for testing purposes.
func (*BitsongApp) GetSubspace ¶ added in v0.11.0
func (app *BitsongApp) 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 (*BitsongApp) GetTKey ¶ added in v0.11.0
func (app *BitsongApp) 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 (*BitsongApp) InitChainer ¶ added in v0.11.0
func (app *BitsongApp) InitChainer(ctx sdk.Context, req abci.RequestInitChain) abci.ResponseInitChain
InitChainer application update at chain initialization
func (*BitsongApp) InterfaceRegistry ¶ added in v0.11.0
func (app *BitsongApp) InterfaceRegistry() types.InterfaceRegistry
InterfaceRegistry returns Gaia's InterfaceRegistry
func (*BitsongApp) LegacyAmino ¶ added in v0.11.0
func (app *BitsongApp) 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 (*BitsongApp) LoadHeight ¶ added in v0.11.0
func (app *BitsongApp) LoadHeight(height int64) error
LoadHeight loads a particular height
func (*BitsongApp) ModuleAccountAddrs ¶ added in v0.11.0
func (app *BitsongApp) ModuleAccountAddrs() map[string]bool
ModuleAccountAddrs returns all the app's module account addresses.
func (*BitsongApp) Name ¶ added in v0.11.0
func (app *BitsongApp) Name() string
Name returns the name of the App
func (*BitsongApp) RegisterAPIRoutes ¶ added in v0.11.0
func (app *BitsongApp) RegisterAPIRoutes(apiSvr *api.Server, apiConfig config.APIConfig)
RegisterAPIRoutes registers all application module routes with the provided API server.
func (*BitsongApp) RegisterTendermintService ¶ added in v0.11.0
func (app *BitsongApp) RegisterTendermintService(clientCtx client.Context)
RegisterTendermintService implements the Application.RegisterTendermintService method.
func (*BitsongApp) RegisterTxService ¶ added in v0.11.0
func (app *BitsongApp) RegisterTxService(clientCtx client.Context)
RegisterTxService implements the Application.RegisterTxService method.
func (*BitsongApp) SimulationManager ¶ added in v0.11.0
func (app *BitsongApp) SimulationManager() *module.SimulationManager
SimulationManager implements the SimulationApp interface
type CosmosApp ¶ added in v0.8.0
type CosmosApp interface { // Name The assigned name of the app. Name() string // LegacyAmino The application types codec. // NOTE: This shoult be sealed before being returned. LegacyAmino() *codec.LegacyAmino // BeginBlocker Application updates every begin block. BeginBlocker(ctx sdk.Context, req abci.RequestBeginBlock) abci.ResponseBeginBlock // EndBlocker Application updates every end block. EndBlocker(ctx sdk.Context, req abci.RequestEndBlock) abci.ResponseEndBlock // InitChainer Application update at chain (i.e app) initialization. InitChainer(ctx sdk.Context, req abci.RequestInitChain) abci.ResponseInitChain // LoadHeight Loads the app at a given height. LoadHeight(height int64) error // ExportAppStateAndValidators Exports the state of the application for a genesis file. ExportAppStateAndValidators( forZeroHeight bool, jailAllowedAddrs []string, ) (types.ExportedApp, error) // ModuleAccountAddrs All the registered module account addreses. ModuleAccountAddrs() map[string]bool }
CosmosApp implements the common methods for a Cosmos SDK-based application specific blockchain.
type GenesisState ¶ added in v0.5.0
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 NewDefaultGenesisState ¶ added in v0.5.0
func NewDefaultGenesisState() GenesisState
NewDefaultGenesisState generates the default state for the application.
type HandlerOptions ¶ added in v0.10.0
type HandlerOptions struct { ante.HandlerOptions IBCkeeper *ibckeeper.Keeper }
HandlerOptions extend the SDK's AnteHandler options by requiring the IBC channel keeper.
type MinValCommissionDecorator ¶ added in v0.10.0
type MinValCommissionDecorator struct{}
func NewMinValCommissionDecorator ¶ added in v0.10.0
func NewMinValCommissionDecorator() MinValCommissionDecorator